From nobody@FreeBSD.org  Sat Nov  7 15:31:31 2009
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 372F7106568F
	for <freebsd-gnats-submit@FreeBSD.org>; Sat,  7 Nov 2009 15:31:31 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 267048FC16
	for <freebsd-gnats-submit@FreeBSD.org>; Sat,  7 Nov 2009 15:31:31 +0000 (UTC)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id nA7FVU3c052525
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 7 Nov 2009 15:31:30 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id nA7FVU8U052524;
	Sat, 7 Nov 2009 15:31:30 GMT
	(envelope-from nobody)
Message-Id: <200911071531.nA7FVU8U052524@www.freebsd.org>
Date: Sat, 7 Nov 2009 15:31:30 GMT
From: Justin Hibbits <chmeeedalf@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Patches for PowerPC support in mono
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         140362
>Category:       ports
>Synopsis:       lang/mono: Patches for PowerPC support in mono
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    mono
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Nov 07 15:40:00 UTC 2009
>Closed-Date:    Sun Dec 06 19:47:39 UTC 2009
>Last-Modified:  Sun Dec  6 19:50:01 UTC 2009
>Originator:     Justin Hibbits
>Release:        9-CURRENT
>Organization:
>Environment:
FreeBSD narn.knownspace 9.0-CURRENT FreeBSD 9.0-CURRENT #26 r198491M: Mon Oct 26 15:17:44 EDT 2009     root@narn.knownspace:/usr/obj/usr/src/sys/NARN  powerpc
>Description:
The attached patch adds PowerPC support to mono.  The patch is also
being sent upstream.  Only thing not included in the patches is changing
the ONLY_FOR_ARCHS line in the port Makefile.
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

--- configure.bak	2009-07-27 12:31:25.000000000 -0400
+++ configure	2009-11-07 10:17:11.000000000 -0500
@@ -2958,7 +2958,8 @@
 			LDFLAGS="$LDFLAGS $PTHREAD_LIBS"
 			libmono_ldflags="$PTHREAD_LIBS"
 		fi
-		CPPFLAGS="$CPPFLAGS -DPLATFORM_BSD"
+ 		CPPFLAGS="$CPPFLAGS -DPLATFORM_BSD -DPLATFORM_BSD6 -D_REENTRANT -DUSE_MMAP -DUSE_MUNMAP"
+ 		libmono_cflags="$libmono_cflags -D_REENTRANT"
 		need_link_unlink=yes
 
 cat >>confdefs.h <<\_ACEOF
@@ -2972,7 +2973,7 @@
 # TLS is only partially implemented on -CURRENT (compiler support
 # but NOT library support)
 #
-		with_tls=pthread
+#		with_tls=pthread
 		;;
 	*-*-*openbsd*)
 		platform_win32=no
@@ -39414,8 +39415,8 @@
 INTERP_SUPPORTED=no
 LIBC="libc.so.6"
 INTL="libc.so.6"
-SQLITE="libsqlite.so.0"
-SQLITE3="libsqlite3.so.0"
+SQLITE="libsqlite.so.8"
+SQLITE3="libsqlite3.so.8"
 X11="libX11.so"
 
 sizeof_register="SIZEOF_VOID_P"
@@ -39675,7 +39676,7 @@
 		jit_wanted=true
 		;;
 	macppc-*-openbsd* | powerpc*-*-linux* | powerpc-*-openbsd* | \
-        powerpc-*-sysv* | powerpc-*-darwin* | powerpc-*-netbsd* )
+        powerpc-*-sysv* | powerpc-*-darwin* | powerpc-*-netbsd* | powerpc-*-freebsd*)
 		if test "x$ac_cv_sizeof_void_p" = "x8"; then
 			TARGET=POWERPC64;
 			CPPFLAGS="$CPPFLAGS -D__mono_ppc__ -D__mono_ppc64__"
--- mono/mini/mini-ppc.h.orig	2009-07-15 14:50:01.000000000 -0400
+++ mono/mini/mini-ppc.h	2009-11-07 10:22:09.000000000 -0500
@@ -281,6 +281,14 @@
 	#define UCONTEXT_REG_FPRn(ctx, n) ((ctx)->uc_mcontext.__fpregs.__fpu_regs [(n)])
 	#define UCONTEXT_REG_NIP(ctx)     _UC_MACHINE_PC(ctx)
 	#define UCONTEXT_REG_LNK(ctx)     ((ctx)->uc_mcontext.__gregs [_REG_LR])
+#elif defined(__FreeBSD__)
+#include <ucontext.h>
+	typedef ucontext_t os_ucontext;
+
+	#define UCONTEXT_REG_Rn(ctx, n)   ((ctx)->uc_mcontext.mc_gpr [(n)])
+	#define UCONTEXT_REG_FPRn(ctx, n) ((ctx)->uc_mcontext.mc_fpreg [(n)])
+	#define UCONTEXT_REG_NIP(ctx)     ((ctx)->uc_mcontext.mc_srr0)
+	#define UCONTEXT_REG_LNK(ctx)     ((ctx)->uc_mcontext.mc_lr)
 #else
 #error Unknown OS
 #endif


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->mono 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Sun Nov 8 03:46:13 UTC 2009 
Responsible-Changed-Why:  
Fix synopsis and assign. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=140362 

From: Romain =?iso-8859-1?Q?Tarti=E8re?= <romain@blogreen.org>
To: bug-followup@FreeBSD.org, chmeeedalf@gmail.com
Cc:  
Subject: Re: ports/140362: lang/mono: Patches for PowerPC support in mono
Date: Mon, 9 Nov 2009 21:35:49 +0100

 --T4sUOijqQbZv57TR
 Content-Type: text/plain; charset=iso-8859-1
 Content-Disposition: inline
 Content-Transfer-Encoding: quoted-printable
 
 Hi Justin.
 
 I have just pushed your edited patches to the mono-2.4 branch in the
 BSD# repository:
 
 http://code.google.com/p/bsd-sharp/source/detail?r=3D697
 http://bsd-sharp.googlecode.com/svn/branches/bsd-sharp-releng-2.4/lang/mono/
 
 Can you please confirm that it's all okay (including the ONLY_FOR_ARCH
 fix) and confirm that the regression test suite (make tests) pass?
 
 Thanks!
 Romain, on behalf of the BSD# Team.
 
 --=20
 Romain Tarti=E8re <romain@blogreen.org>        http://romain.blogreen.org/
 pgp: 8DAB A124 0DA4 7024 F82A  E748 D8E9 A33F FF56 FF43 (ID: 0xFF56FF43)
 (plain text =3Dnon-HTML=3D PGP/GPG encrypted/signed e-mail much appreciated)
 
 --T4sUOijqQbZv57TR
 Content-Type: application/pgp-signature
 Content-Disposition: inline
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.13 (FreeBSD)
 
 iEYEARECAAYFAkr4fSUACgkQ2OmjP/9W/0MdiACfQ1YJ2yWUeVcGKyJhSNhq5h23
 ZsQAn1fhSeEsF0eq8tHDeSKwOmllZ8L6
 =4TTJ
 -----END PGP SIGNATURE-----
 
 --T4sUOijqQbZv57TR--

From: Justin Hibbits <chmeeedalf@gmail.com>
To: =?ISO-8859-1?Q?Romain_Tarti=E8re?= <romain@blogreen.org>
Cc: bug-followup@freebsd.org
Subject: Re: ports/140362: lang/mono: Patches for PowerPC support in mono
Date: Mon, 9 Nov 2009 20:34:31 -0500

 --000e0ce0b0f2d52baf0477fa4fe4
 Content-Type: text/plain; charset=ISO-8859-1
 Content-Transfer-Encoding: quoted-printable
 
 2009/11/9 Romain Tarti=E8re <romain@blogreen.org>
 
 > Hi Justin.
 >
 > I have just pushed your edited patches to the mono-2.4 branch in the
 > BSD# repository:
 >
 > http://code.google.com/p/bsd-sharp/source/detail?r=3D697
 >
 > http://bsd-sharp.googlecode.com/svn/branches/bsd-sharp-releng-2.4/lang/mo=
 no/
 >
 > Can you please confirm that it's all okay (including the ONLY_FOR_ARCH
 > fix) and confirm that the regression test suite (make tests) pass?
 >
 > Thanks!
 > Romain, on behalf of the BSD# Team.
 >
 > --
 > Romain Tarti=E8re <romain@blogreen.org>        http://romain.blogreen.org=
 /
 > pgp: 8DAB A124 0DA4 7024 F82A  E748 D8E9 A33F FF56 FF43 (ID: 0xFF56FF43)
 > (plain text =3Dnon-HTML=3D PGP/GPG encrypted/signed e-mail much appreciat=
 ed)
 >
 
 Hi Romain,
 
 The tests do pass, so the source patches are good.  Also, I was able to
 build f-spot with it.  Only one change is needed in your patch.  The
 ONLY_FOR_ARCH line in the Makefile should have 'powerpc' instead of 'ppc'.
 
 - Justin
 
 --000e0ce0b0f2d52baf0477fa4fe4
 Content-Type: text/html; charset=ISO-8859-1
 Content-Transfer-Encoding: quoted-printable
 
 2009/11/9 Romain Tarti=E8re <span dir=3D"ltr">&lt;<a href=3D"mailto:romain@=
 blogreen.org">romain@blogreen.org</a>&gt;</span><br><div class=3D"gmail_quo=
 te"><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-lef=
 t:1px #ccc solid;padding-left:1ex;">
 Hi Justin.<br>
 <br>
 I have just pushed your edited patches to the mono-2.4 branch in the<br>
 BSD# repository:<br>
 <br>
 <a href=3D"http://code.google.com/p/bsd-sharp/source/detail?r=3D697" target=
 =3D"_blank">http://code.google.com/p/bsd-sharp/source/detail?r=3D697</a><br=
 >
 <a href=3D"http://bsd-sharp.googlecode.com/svn/branches/bsd-sharp-releng-2.=
 4/lang/mono/" target=3D"_blank">http://bsd-sharp.googlecode.com/svn/branche=
 s/bsd-sharp-releng-2.4/lang/mono/</a><br>
 <br>
 Can you please confirm that it&#39;s all okay (including the ONLY_FOR_ARCH<=
 br>
 fix) and confirm that the regression test suite (make tests) pass?<br>
 <br>
 Thanks!<br>
 Romain, on behalf of the BSD# Team.<br>
 <font color=3D"#888888"><br>
 --<br>
 Romain Tarti=E8re &lt;<a href=3D"mailto:romain@blogreen.org">romain@blogree=
 n.org</a>&gt; =A0 =A0 =A0 =A0<a href=3D"http://romain.blogreen.org/" target=
 =3D"_blank">http://romain.blogreen.org/</a><br>
 pgp: 8DAB A124 0DA4 7024 F82A =A0E748 D8E9 A33F FF56 FF43 (ID: 0xFF56FF43)<=
 br>
 (plain text =3Dnon-HTML=3D PGP/GPG encrypted/signed e-mail much appreciated=
 )<br>
 </font></blockquote></div><br><div>Hi Romain,</div><div><br></div><div>The =
 tests do pass, so the source patches are good. =A0Also, I was able to build=
  f-spot with it. =A0Only one change is needed in your patch. =A0The ONLY_FO=
 R_ARCH line in the Makefile should have &#39;powerpc&#39; instead of &#39;p=
 pc&#39;.</div>
 <div><br></div><div>- Justin</div>
 
 --000e0ce0b0f2d52baf0477fa4fe4--

From: Romain =?iso-8859-1?Q?Tarti=E8re?= <mono@FreeBSD.org>
To: bug-followup@FreeBSD.org, chmeeedalf@gmail.com
Cc:  
Subject: Re: ports/140362: lang/mono: Patches for PowerPC support in mono
Date: Tue, 10 Nov 2009 03:12:55 +0100

 --ew6BAiZeqk4r7MaW
 Content-Type: text/plain; charset=iso-8859-1
 Content-Disposition: inline
 Content-Transfer-Encoding: 8bit
 
 Fine, here is the final patch ready for being applied to the FreeBSD
 ports tree.
 
 Romain, on behalf of the BSD# Team.
 
 -- 
 Romain Tartire <romain@blogreen.org>        http://romain.blogreen.org/
 pgp: 8DAB A124 0DA4 7024 F82A  E748 D8E9 A33F FF56 FF43 (ID: 0xFF56FF43)
 (plain text =non-HTML= PGP/GPG encrypted/signed e-mail much appreciated)
 
 --ew6BAiZeqk4r7MaW
 Content-Type: text/x-diff; charset=us-ascii
 Content-Disposition: attachment; filename="mono.diff"
 
 diff -ruN /var/cache/portshaker/freebsd/lang/mono/Makefile /tmp/mono/Makefile
 --- /var/cache/portshaker/freebsd/lang/mono/Makefile	2009-08-23 17:26:14.000000000 +0200
 +++ /tmp/mono/Makefile	2009-11-10 03:08:49.101964688 +0100
 @@ -42,7 +42,7 @@
  MAKE_ENV=	MONO_SHARED_DIR="${MONO_SHARED_DIR}" \
  		LC_ALL=C
  
 -ONLY_FOR_ARCHS=	i386 amd64
 +ONLY_FOR_ARCHS=	i386 amd64 powerpc
  
  MAN1=		al.1 cert2spc.1 certmgr.1 chktrust.1 cilc.1 csharp.1 disco.1 \
  		dtd2xsd.1 gacutil.1 genxs.1 httpcfg.1 ilasm.1 jay.1 macpack.1 \
 diff -ruN /var/cache/portshaker/freebsd/lang/mono/files/patch-configure /tmp/mono/files/patch-configure
 --- /var/cache/portshaker/freebsd/lang/mono/files/patch-configure	2009-07-17 14:33:54.000000000 +0200
 +++ /tmp/mono/files/patch-configure	2009-11-10 03:08:48.997351873 +0100
 @@ -22,7 +22,7 @@
   		;;
   	*-*-*openbsd*)
   		platform_win32=no
 -@@ -39146,8 +39147,8 @@
 +@@ -39414,8 +39415,8 @@
   INTERP_SUPPORTED=no
   LIBC="libc.so.6"
   INTL="libc.so.6"
 @@ -32,4 +32,13 @@
  +SQLITE3="libsqlite3.so.8"
   X11="libX11.so"
   
 - jit_wanted=false
 + sizeof_register="SIZEOF_VOID_P"
 +@@ -39675,7 +39676,7 @@
 + 		jit_wanted=true
 + 		;;
 + 	macppc-*-openbsd* | powerpc*-*-linux* | powerpc-*-openbsd* | \
 +-        powerpc-*-sysv* | powerpc-*-darwin* | powerpc-*-netbsd* )
 ++        powerpc-*-sysv* | powerpc-*-darwin* | powerpc-*-netbsd* | powerpc-*-freebsd* )
 + 		if test "x$ac_cv_sizeof_void_p" = "x8"; then
 + 			TARGET=POWERPC64;
 + 			CPPFLAGS="$CPPFLAGS -D__mono_ppc__ -D__mono_ppc64__"
 diff -ruN /var/cache/portshaker/freebsd/lang/mono/files/patch-mono_mini_mini-ppc.h /tmp/mono/files/patch-mono_mini_mini-ppc.h
 --- /var/cache/portshaker/freebsd/lang/mono/files/patch-mono_mini_mini-ppc.h	1970-01-01 01:00:00.000000000 +0100
 +++ /tmp/mono/files/patch-mono_mini_mini-ppc.h	2009-11-09 21:30:44.773758000 +0100
 @@ -0,0 +1,20 @@
 +
 +$FreeBSD$
 +
 +--- mono/mini/mini-ppc.h.orig
 ++++ mono/mini/mini-ppc.h
 +@@ -281,6 +281,14 @@
 + 	#define UCONTEXT_REG_FPRn(ctx, n) ((ctx)->uc_mcontext.__fpregs.__fpu_regs [(n)])
 + 	#define UCONTEXT_REG_NIP(ctx)     _UC_MACHINE_PC(ctx)
 + 	#define UCONTEXT_REG_LNK(ctx)     ((ctx)->uc_mcontext.__gregs [_REG_LR])
 ++#elif defined(__FreeBSD__)
 ++#include <ucontext.h>
 ++	typedef ucontext_t os_ucontext;
 ++
 ++	#define UCONTEXT_REG_Rn(ctx, n)   ((ctx)->uc_mcontext.mc_gpr [(n)])
 ++	#define UCONTEXT_REG_FPRn(ctx, n) ((ctx)->uc_mcontext.mc_fpreg [(n)])
 ++	#define UCONTEXT_REG_NIP(ctx)     ((ctx)->uc_mcontext.mc_srr0)
 ++	#define UCONTEXT_REG_LNK(ctx)     ((ctx)->uc_mcontext.mc_lr)
 + #else
 + #error Unknown OS
 + #endif
 
 --ew6BAiZeqk4r7MaW--

From: Justin Hibbits <chmeeedalf@gmail.com>
To: =?ISO-8859-1?Q?Romain_Tarti=E8re?= <mono@freebsd.org>
Cc: bug-followup@freebsd.org
Subject: Re: ports/140362: lang/mono: Patches for PowerPC support in mono
Date: Mon, 9 Nov 2009 21:15:26 -0500

 --001517402ba82967b30477fae249
 Content-Type: text/plain; charset=ISO-8859-1
 Content-Transfer-Encoding: quoted-printable
 
 2009/11/9 Romain Tarti=E8re <mono@freebsd.org>
 
 > Fine, here is the final patch ready for being applied to the FreeBSD
 > ports tree.
 >
 > Romain, on behalf of the BSD# Team.
 >
 > --
 > Romain Tarti=E8re <romain@blogreen.org>        http://romain.blogreen.org=
 /
 > pgp: 8DAB A124 0DA4 7024 F82A  E748 D8E9 A33F FF56 FF43 (ID: 0xFF56FF43)
 > (plain text =3Dnon-HTML=3D PGP/GPG encrypted/signed e-mail much appreciat=
 ed)
 >
 
 Looks good to me.
 
 Thanks,
 
 Justin
 
 --001517402ba82967b30477fae249
 Content-Type: text/html; charset=ISO-8859-1
 Content-Transfer-Encoding: quoted-printable
 
 <div class=3D"gmail_quote">2009/11/9 Romain Tarti=E8re <span dir=3D"ltr">&l=
 t;<a href=3D"mailto:mono@freebsd.org">mono@freebsd.org</a>&gt;</span><br><b=
 lockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px =
 #ccc solid;padding-left:1ex;">
 Fine, here is the final patch ready for being applied to the FreeBSD<br>
 ports tree.<br>
 <div><div></div><div class=3D"h5"><br>
 Romain, on behalf of the BSD# Team.<br>
 <br>
 --<br>
 Romain Tarti=E8re &lt;<a href=3D"mailto:romain@blogreen.org">romain@blogree=
 n.org</a>&gt; =A0 =A0 =A0 =A0<a href=3D"http://romain.blogreen.org/" target=
 =3D"_blank">http://romain.blogreen.org/</a><br>
 pgp: 8DAB A124 0DA4 7024 F82A =A0E748 D8E9 A33F FF56 FF43 (ID: 0xFF56FF43)<=
 br>
 (plain text =3Dnon-HTML=3D PGP/GPG encrypted/signed e-mail much appreciated=
 )<br>
 </div></div></blockquote></div><br><div>Looks good to me.</div><div><br></d=
 iv><div>Thanks,</div><div><br></div><div>Justin</div>
 
 --001517402ba82967b30477fae249--
State-Changed-From-To: open->closed 
State-Changed-By: glewis 
State-Changed-When: Sun Dec 6 19:47:38 UTC 2009 
State-Changed-Why:  
Committed. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=140362 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/140362: commit references a PR
Date: Sun,  6 Dec 2009 19:47:35 +0000 (UTC)

 glewis      2009-12-06 19:47:18 UTC
 
   FreeBSD ports repository
 
   Modified files:
     lang/mono            Makefile 
     lang/mono/files      patch-configure 
   Added files:
     lang/mono/files      patch-mono_mini_mini-ppc.h 
   Log:
   . Add PowerPC support.
   
   PR:             140362
   Submitted by:   Justin Hibbits <chmeeedalf@gmail.com>
   
   Revision  Changes    Path
   1.86      +1 -1      ports/lang/mono/Makefile
   1.16      +12 -3     ports/lang/mono/files/patch-configure
   1.1       +20 -0     ports/lang/mono/files/patch-mono_mini_mini-ppc.h (new)
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
