Added mono-2.0 template. Patches from pkgsrc, thanks!
--HG-- extra : convert_revision : 6adafdffed0e60747feb7cc84f5b3f0f4926e034
This commit is contained in:
parent
4833911e22
commit
c2a0231719
4 changed files with 241 additions and 0 deletions
BIN
dependencies/build-depends.db
vendored
BIN
dependencies/build-depends.db
vendored
Binary file not shown.
183
templates/mono-fix-build.diff
Normal file
183
templates/mono-fix-build.diff
Normal file
|
@ -0,0 +1,183 @@
|
||||||
|
Jumbo patch containing all patches from pkgsrc, thanks!
|
||||||
|
|
||||||
|
$NetBSD: patch-af,v 1.10 2008/04/19 18:42:10 kefren Exp $
|
||||||
|
--- mono/metadata/Makefile.in.orig 2008-03-11 01:37:56.000000000 +0200
|
||||||
|
+++ mono/metadata/Makefile.in 2008-03-18 15:35:22.000000000 +0200
|
||||||
|
@@ -65,7 +65,7 @@
|
||||||
|
libmonoruntime_static_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||||
|
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||||
|
$(libmonoruntime_static_la_LDFLAGS) $(LDFLAGS) -o $@
|
||||||
|
-libmonoruntime_la_LIBADD =
|
||||||
|
+libmonoruntime_la_LIBADD = $(ICU_LIBS)
|
||||||
|
am_libmonoruntime_la_OBJECTS = reflection.lo object.lo icall.lo \
|
||||||
|
decimal.lo boehm-gc.lo null-gc.lo sgen-gc.lo gc.lo \
|
||||||
|
method-builder.lo marshal.lo mono-mlist.lo monitor.lo \
|
||||||
|
$NetBSD: patch-cf,v 1.3 2008/10/10 22:02:43 kefren Exp $
|
||||||
|
--- mono/metadata/class.c.orig 2008-10-10 23:57:39.000000000 +0300
|
||||||
|
+++ mono/metadata/class.c 2008-10-10 23:58:35.000000000 +0300
|
||||||
|
@@ -7445,7 +7445,10 @@
|
||||||
|
gboolean
|
||||||
|
mono_class_generic_sharing_enabled (MonoClass *class)
|
||||||
|
{
|
||||||
|
-#if defined(__i386__) || defined(__x86_64__)
|
||||||
|
+#if defined(__NetBSD__) && defined(__x86_64__)
|
||||||
|
+/* https://bugzilla.novell.com/show_bug.cgi?id=434457 */
|
||||||
|
+ static gboolean supported = FALSE;
|
||||||
|
+#elif defined(__i386__) || defined(__x86_64__)
|
||||||
|
static gboolean supported = TRUE;
|
||||||
|
#else
|
||||||
|
/* Not supported by the JIT backends */
|
||||||
|
$NetBSD: patch-cd,v 1.1 2008/02/13 14:16:43 kefren Exp $
|
||||||
|
--- mono/mini/exceptions-amd64.c.orig 2008-02-05 23:56:30.000000000 +0200
|
||||||
|
+++ mono/mini/exceptions-amd64.c 2008-02-05 23:53:28.000000000 +0200
|
||||||
|
@@ -682,7 +682,7 @@ mono_arch_handle_exception (void *sigctx
|
||||||
|
static inline guint64*
|
||||||
|
gregs_from_ucontext (ucontext_t *ctx)
|
||||||
|
{
|
||||||
|
-#ifdef __FreeBSD__
|
||||||
|
+#if defined (__FreeBSD__) || defined (__NetBSD__)
|
||||||
|
guint64 *gregs = (guint64 *) &ctx->uc_mcontext;
|
||||||
|
#else
|
||||||
|
guint64 *gregs = (guint64 *) &ctx->uc_mcontext.gregs;
|
||||||
|
$NetBSD: patch-cc,v 1.1 2008/02/13 14:16:43 kefren Exp $
|
||||||
|
--- mono/mini/mini-amd64.h.orig 2008-02-05 23:55:50.000000000 +0200
|
||||||
|
+++ mono/mini/mini-amd64.h 2008-02-05 23:51:38.000000000 +0200
|
||||||
|
@@ -220,7 +220,7 @@ typedef struct {
|
||||||
|
|
||||||
|
#endif /* PLATFORM_WIN32 */
|
||||||
|
|
||||||
|
-#ifdef __FreeBSD__
|
||||||
|
+#if defined (__FreeBSD__) || defined (__NetBSD__)
|
||||||
|
|
||||||
|
#define REG_RAX 7
|
||||||
|
#define REG_RCX 4
|
||||||
|
$NetBSD: patch-ak,v 1.8 2008/02/13 14:16:43 kefren Exp $
|
||||||
|
--- libgc/pthread_support.c.orig 2007-11-09 00:07:02.000000000 +0200
|
||||||
|
+++ libgc/pthread_support.c 2008-02-05 14:01:40.000000000 +0200
|
||||||
|
@@ -1160,6 +1160,22 @@ void GC_end_blocking(void) {
|
||||||
|
#define __d10_sleep sleep
|
||||||
|
#endif /* GC_DGUX386_THREADS */
|
||||||
|
|
||||||
|
+#undef nanosleep
|
||||||
|
+#undef usleep
|
||||||
|
+#undef sleep
|
||||||
|
+
|
||||||
|
+/* A wrapper for the standard C nanosleep function */
|
||||||
|
+int WRAP_FUNC(nanosleep) (const struct timespec *rqtp, struct timespec *rmtp)
|
||||||
|
+{
|
||||||
|
+ int result;
|
||||||
|
+
|
||||||
|
+ GC_start_blocking();
|
||||||
|
+ result = REAL_FUNC(nanosleep)(rqtp, rmtp);
|
||||||
|
+ GC_end_blocking();
|
||||||
|
+
|
||||||
|
+ return result;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
/* A wrapper for the standard C sleep function */
|
||||||
|
int WRAP_FUNC(sleep) (unsigned int seconds)
|
||||||
|
{
|
||||||
|
$NetBSD: patch-be,v 1.1 2007/08/03 07:46:54 taca Exp $
|
||||||
|
|
||||||
|
--- mono-1.1.13.8.1/support/sys-mman.corig 2006-04-11 07:21:37.000000000 +0900
|
||||||
|
+++ support/sys-mman.c 2007-08-03 22:04:18.000000000 +0900
|
||||||
|
@@ -96,8 +96,13 @@
|
||||||
|
if (Mono_Posix_FromMremapFlags (flags, &_flags) == -1)
|
||||||
|
return MAP_FAILED;
|
||||||
|
|
||||||
|
+#if defined(__NetBSD__)
|
||||||
|
+ return mremap (old_address, (size_t) old_size, old_address, (size_t) new_size,
|
||||||
|
+ (unsigned long) _flags);
|
||||||
|
+#else
|
||||||
|
return mremap (old_address, (size_t) old_size, (size_t) new_size,
|
||||||
|
(unsigned long) _flags);
|
||||||
|
+#endif
|
||||||
|
}
|
||||||
|
#endif /* def HAVE_MREMAP */
|
||||||
|
|
||||||
|
$NetBSD: patch-bf,v 1.2 2008/02/13 14:16:43 kefren Exp $
|
||||||
|
--- support/map.c.orig 2008-02-05 14:14:43.000000000 +0200
|
||||||
|
+++ support/map.c 2008-02-05 14:16:06.000000000 +0200
|
||||||
|
@@ -3011,13 +3011,21 @@ int Mono_Posix_ToMountFlags (guint64 x,
|
||||||
|
|
||||||
|
int Mono_Posix_FromMremapFlags (guint64 x, guint64 *r)
|
||||||
|
{
|
||||||
|
+#ifdef __NetBSD__
|
||||||
|
+ *r = MAP_FIXED;
|
||||||
|
+#else
|
||||||
|
*r = 0;
|
||||||
|
+#endif
|
||||||
|
if ((x & Mono_Posix_MremapFlags_MREMAP_MAYMOVE) == Mono_Posix_MremapFlags_MREMAP_MAYMOVE)
|
||||||
|
+#ifdef __NetBSD__
|
||||||
|
+ *r &= ~MAP_FIXED;
|
||||||
|
+#else
|
||||||
|
#ifdef MREMAP_MAYMOVE
|
||||||
|
*r |= MREMAP_MAYMOVE;
|
||||||
|
#else /* def MREMAP_MAYMOVE */
|
||||||
|
{errno = EINVAL; return -1;}
|
||||||
|
#endif /* ndef MREMAP_MAYMOVE */
|
||||||
|
+#endif /* __NetBSD__ */
|
||||||
|
if (x == 0)
|
||||||
|
return 0;
|
||||||
|
return 0;
|
||||||
|
$NetBSD: patch-bg,v 1.1 2008/02/13 14:16:43 kefren Exp $
|
||||||
|
--- mono/metadata/socket-io.c.orig 2008-02-07 08:37:02.000000000 +0200
|
||||||
|
+++ mono/metadata/socket-io.c 2008-02-07 08:37:17.000000000 +0200
|
||||||
|
@@ -2751,7 +2751,7 @@
|
||||||
|
struct sockaddr_in6 saddr6;
|
||||||
|
struct addrinfo *info = NULL, hints;
|
||||||
|
gint32 family;
|
||||||
|
- char hostname[1024] = {0};
|
||||||
|
+ char hostname[NI_MAXHOST] = {0};
|
||||||
|
int flags = 0;
|
||||||
|
#else
|
||||||
|
struct in_addr inaddr;
|
||||||
|
$NetBSD: patch-bh,v 1.1 2008/02/13 14:16:43 kefren Exp $
|
||||||
|
--- mcs/class/Managed.Windows.Forms/build-csproj.orig 2008-02-07 08:44:48.000000000 +0200
|
||||||
|
+++ mcs/class/Managed.Windows.Forms/build-csproj 2008-02-07 08:44:59.000000000 +0200
|
||||||
|
@@ -177,7 +177,7 @@
|
||||||
|
{
|
||||||
|
cat $Resource | while read SRC; do
|
||||||
|
SRC=`echo $SRC | $tr '/' '\\\\'`
|
||||||
|
-SRC=`echo $SRC | sed 's/-resource://' | gawk -F , '{print " RelPath = \"" $1 "\"\n CustomToolNameSpace = \"" $2 "\""}' | fgrep -v \"\"`
|
||||||
|
+SRC=`echo $SRC | sed 's/-resource://' | awk -F , '{print " RelPath = \"" $1 "\"\n CustomToolNameSpace = \"" $2 "\""}' | fgrep -v \"\"`
|
||||||
|
|
||||||
|
cat << EOT
|
||||||
|
<File
|
||||||
|
$NetBSD: patch-bi,v 1.1 2008/02/13 14:16:43 kefren Exp $
|
||||||
|
--- mono/metadata/filewatcher.c.orig 2008-02-07 08:47:39.000000000 +0200
|
||||||
|
+++ mono/metadata/filewatcher.c 2008-02-07 08:52:21.000000000 +0200
|
||||||
|
@@ -44,9 +44,6 @@
|
||||||
|
gint
|
||||||
|
ves_icall_System_IO_FSW_SupportsFSW (void)
|
||||||
|
{
|
||||||
|
-#if HAVE_KQUEUE
|
||||||
|
- return 3;
|
||||||
|
-#else
|
||||||
|
MonoDl *fam_module;
|
||||||
|
int lib_used = 4; /* gamin */
|
||||||
|
int inotify_instance;
|
||||||
|
@@ -70,15 +67,22 @@
|
||||||
|
}
|
||||||
|
|
||||||
|
if (fam_module == NULL)
|
||||||
|
+#if HAVE_KQUEUE
|
||||||
|
+ return 3;
|
||||||
|
+#else
|
||||||
|
return 0;
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
err = mono_dl_symbol (fam_module, "FAMNextEvent", (gpointer *) &FAMNextEvent);
|
||||||
|
g_free (err);
|
||||||
|
if (FAMNextEvent == NULL)
|
||||||
|
+#if HAVE_KQUEUE
|
||||||
|
+ return 3;
|
||||||
|
+#else
|
||||||
|
return 0;
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
return lib_used;
|
||||||
|
-#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Almost copied from fam.h. Weird, I know */
|
31
templates/mono-runstuff-before-configure.sh
Normal file
31
templates/mono-runstuff-before-configure.sh
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
#
|
||||||
|
# Replaces hardcoded shebang files in some scripts.
|
||||||
|
#
|
||||||
|
# Perl files with hardcoded shebang path.
|
||||||
|
mono_perl_files="mcs/errors/do-tests.pl mcs/tools/scan-tests.pl
|
||||||
|
msvc/create-windef.pl mono/benchmark/test-driver mono/cil/make-opcodes-def.pl
|
||||||
|
mono/metadata/make-bundle.pl mono/mini/genmdesc.pl mono/tests/stress-runner.pl"
|
||||||
|
#
|
||||||
|
# Bash files with hardcoded shebang path.
|
||||||
|
#
|
||||||
|
mono_bash_files="mono/arch/arm/dpiops.sh mono/arch/arm/fpaops.sh
|
||||||
|
mono/arch/arm/vfpops.sh mono/tests/make_imt_test.sh
|
||||||
|
scripts/mono-find-provides.in scripts/mono-find-requires.in
|
||||||
|
scripts/mono-test-install web/mono-build-w32.sh
|
||||||
|
mcs/class/Mono.WebBrowser/build-csproj2k5
|
||||||
|
mcs/class/Managed.Windows.Forms/build-csproj
|
||||||
|
mcs/class/Managed.Windows.Forms/build-csproj2k5
|
||||||
|
mcs/class/Mono.Cairo/Samples/gtk/compile.sh
|
||||||
|
mcs/class/Mono.Cairo/Samples/png/compile.sh
|
||||||
|
mcs/class/Mono.Cairo/Samples/win32/compile.sh
|
||||||
|
mcs/class/Mono.Cairo/Samples/x11/compile.sh mcs/tools/tinderbox/tinderbox.sh"
|
||||||
|
|
||||||
|
. $XBPS_TMPLHELPDIR/replace-interpreter.sh
|
||||||
|
|
||||||
|
for f in ${mono_bash_files}; do
|
||||||
|
replace_interpreter bash $f
|
||||||
|
done
|
||||||
|
|
||||||
|
for f in ${mono_perl_files}; do
|
||||||
|
replace_interpreter perl $f
|
||||||
|
done
|
27
templates/mono.tmpl
Executable file
27
templates/mono.tmpl
Executable file
|
@ -0,0 +1,27 @@
|
||||||
|
# Template build file for 'mono'.
|
||||||
|
pkgname=mono
|
||||||
|
version=2.0
|
||||||
|
patch_files="$pkgname-fix-build.diff"
|
||||||
|
distfiles="http://ftp.novell.com/pub/mono/sources/mono/$pkgname-$version@.tar.bz2"
|
||||||
|
tar_override_cmd="$XBPS_MASTERDIR/bin/gtar"
|
||||||
|
build_style=gnu_configure
|
||||||
|
configure_args="--with-icu=yes --with-preview=yes --with-libgdiplus=installed
|
||||||
|
--enable-big-arrays --with-tls=__thread --with-large-heap=yes
|
||||||
|
--with-moonlight=no"
|
||||||
|
make_cmd="$XBPS_MASTERDIR/bin/gmake"
|
||||||
|
pkgconfig_override="cecil.pc dotnet.pc dotnet35.pc mint.pc
|
||||||
|
mono-cairo.pc mono.pc smcs.pc mono-nunit.pc"
|
||||||
|
short_desc="Open source implementation of the .NET Development Framework"
|
||||||
|
maintainer="Juan RP <xtraeme@gmail.com>"
|
||||||
|
checksum=a80be8a222bcffd402ecc727c87d20c30b750031
|
||||||
|
long_desc="
|
||||||
|
The Mono Project is an open development initiative sponsored by Ximian
|
||||||
|
that is working to develop an open source, Unix version of the Microsoft
|
||||||
|
.NET development platform. Its objective is to enable Unix developers to
|
||||||
|
build and deploy cross-platform .NET Applications. The project will
|
||||||
|
implement various technologies developed by Microsoft that have now been
|
||||||
|
submitted to the ECMA for standardization."
|
||||||
|
|
||||||
|
run_stuff_before_build_cmd="
|
||||||
|
$rm_cmd -f $wrksrc/libgc/libtool
|
||||||
|
$ln_cmd -sf $wrksrc/libtool $wrksrc/libgc/libtool"
|
Loading…
Reference in a new issue