aboutsummaryrefslogtreecommitdiff
path: root/multimedia/moonlight
diff options
context:
space:
mode:
authorRomain Tartière <romain@FreeBSD.org>2010-06-01 12:41:30 +0000
committerRomain Tartière <romain@FreeBSD.org>2010-06-01 12:41:30 +0000
commit5c809510227e264f4ab23c92c1af146897974e8f (patch)
treebbc686a376c7c469beb062572a7062657211c4f3 /multimedia/moonlight
parent76fcccf45033fac91efa53e1624554b93abdfbc0 (diff)
downloadports-5c809510227e264f4ab23c92c1af146897974e8f.tar.gz
ports-5c809510227e264f4ab23c92c1af146897974e8f.zip
Notes
Diffstat (limited to 'multimedia/moonlight')
-rw-r--r--multimedia/moonlight/Makefile42
-rw-r--r--multimedia/moonlight/distinfo12
-rw-r--r--multimedia/moonlight/files/patch-class_System.Windows_Mono_NativeDependencyObjectHelper.cs21
-rw-r--r--multimedia/moonlight/files/patch-configure56
-rw-r--r--multimedia/moonlight/files/patch-m4_codecs.m416
-rw-r--r--multimedia/moonlight/files/patch-m4_firefox-xpi.m424
-rw-r--r--multimedia/moonlight/files/patch-plugin_plugin.cpp13
-rw-r--r--multimedia/moonlight/files/patch-src_application.cpp23
-rw-r--r--multimedia/moonlight/files/patch-src_bitmapimage.cpp15
-rw-r--r--multimedia/moonlight/files/patch-src_deployment.cpp28
-rw-r--r--multimedia/moonlight/files/patch-src_easing.cpp15
-rw-r--r--multimedia/moonlight/files/patch-src_file-downloader.cpp15
-rw-r--r--multimedia/moonlight/files/patch-src_pipeline-ui.cpp14
-rw-r--r--multimedia/moonlight/files/patch-src_pipeline.cpp71
-rw-r--r--multimedia/moonlight/files/patch-src_utils.cpp15
-rw-r--r--multimedia/moonlight/pkg-plist133
16 files changed, 453 insertions, 60 deletions
diff --git a/multimedia/moonlight/Makefile b/multimedia/moonlight/Makefile
index 1129e033dfa8..1de9de46e8c1 100644
--- a/multimedia/moonlight/Makefile
+++ b/multimedia/moonlight/Makefile
@@ -6,36 +6,51 @@
#
PORTNAME= moonlight
-PORTVERSION= 1.0.1
-PORTREVISION= 6
+PORTVERSION= 2.0
CATEGORIES= multimedia www
-MASTER_SITES= http://ftp.novell.com/pub/mono/sources/moon/
-DISTNAME= moon-${PORTVERSION}
+MASTER_SITES= http://ftp.novell.com/pub/mono/sources/moon/${PORTVERSION}/
+DISTFILES= ${DISTNAME}${EXTRACT_SUFX} \
+ mono-${MONO_VERSION}${EXTRACT_SUFX} \
+ mono-basic-${MONO_BASIC_VERSION}${EXTRACT_SUFX}
MAINTAINER= mono@FreeBSD.org
COMMENT= OpenSource Implementation of Silverlight
+BUILD_DEPENDS= bash:${PORTSDIR}/shells/bash
LIB_DEPENDS= avcodec.1:${PORTSDIR}/multimedia/ffmpeg \
execinfo.1:${PORTSDIR}/devel/libexecinfo
+USE_BISON= build
USE_GECKO= libxul
USE_BZIP2= yes
GNU_CONFIGURE= yes
+USE_GMAKE= yes
+USE_GNOME= gnomedesktopsharp20
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
LDFLAGS="-L${LOCALBASE}/lib"
CONFIGURE_ARGS= --with-cairo=system \
--with-debug=yes \
--with-ff2=no \
- --with-ff3=yes
+ --with-ff3=yes \
+ --with-mcspath=${MONODIR}/mcs/ \
+ --with-mono-basic-path=${MONOBASICDIR}/
+
+MONO_VERSION= 2.6
+MONO_BASIC_VERSION=2.6
+
+MONODIR= ${WRKDIR}/mono-${MONO_VERSION}
+MONOBASICDIR= ${WRKDIR}/mono-basic-${MONO_BASIC_VERSION}
USE_WEBPLUGINS= gecko19
-WEBPLUGINS_DIR= ${PREFIX}/lib/moon/plugin
+WEBPLUGINS_DIR= ${PREFIX}/lib/moonlight/plugin
WEBPLUGINS_FILES= libmoonloader.so \
libmoonplugin.so \
libmoonplugin-ff3bridge.so
OPTIONS= PULSEAUDIO "Build with PA (needed for sound support)" on
+MAN1= mopen.1 mxap.1 respack.1 sockpol.1 svg2xaml.1 xamlg.1
+
.include <bsd.port.pre.mk>
.include "${PORTSDIR}/www/firefox/Makefile.webplugins"
@@ -63,22 +78,19 @@ PLIST_FILES= ${WEBPLUGINS_DIR}/${PKGNAME}-freebsd-${OSREL}.xpi
.endif
post-patch:
- @${REINPLACE_CMD} -e '/TEST_SUBDIR =/d' \
- ${WRKSRC}/Makefile.in
+ @${REINPLACE_CMD} -e 's|^#!/bin/bash|#!/usr/bin/env bash|' \
+ ${MONODIR}/mcs/class/Mono.WebBrowser/build-csproj2k5
@${REINPLACE_CMD} -e '/<malloc.h>/d' \
- ${WRKSRC}/src/animation.cpp \
${WRKSRC}/src/runtime.cpp \
- ${WRKSRC}/src/xaml.cpp \
- ${WRKSRC}/src/xap.cpp \
- ${WRKSRC}/src/value.cpp
- @${REINPLACE_CMD} -e 's|CODEC_URL|""|' \
- ${WRKSRC}/src/pipeline-ui.cpp
+ ${WRKSRC}/src/xaml.cpp
@${REINPLACE_CMD} -e 's|\(^LIBS\) =|\1 = -lexecinfo|' \
- -e 's|/proc/|/compat/linux/proc/| ' \
${WRKSRC}/src/Makefile.in
@${REINPLACE_CMD} -e 's|-ldl||' \
${WRKSRC}/plugin/Makefile.in
+pre-configure:
+ @( cd ${MONODIR} && ./configure --with-profile2=no --with-moonlight=yes --with-profile4=no --with-monotouch=no --with-mcs-docs=no && ${GMAKE} )
+
.if defined(WITH_XPI_PLUGIN_ONLY)
do-install:
${INSTALL_DATA} ${WRKSRC}/plugin/install/novell-moonlight.xpi \
diff --git a/multimedia/moonlight/distinfo b/multimedia/moonlight/distinfo
index 39ef9d71ad50..21435eba2340 100644
--- a/multimedia/moonlight/distinfo
+++ b/multimedia/moonlight/distinfo
@@ -1,3 +1,9 @@
-MD5 (moon-1.0.1.tar.bz2) = 48fafb26a48f15c30fd2d52b2add5660
-SHA256 (moon-1.0.1.tar.bz2) = da3ea10ea85cba126952a6a27f1cdd3e2c83f6e20fe3942819201e6beb80b9b7
-SIZE (moon-1.0.1.tar.bz2) = 8812587
+MD5 (moonlight-2.0.tar.bz2) = a3d35a2f92168baa11eabe2be26f5726
+SHA256 (moonlight-2.0.tar.bz2) = 7c437386e5d155e1673796b8dd20a85b523581426dcea78504ee0bc7e135102c
+SIZE (moonlight-2.0.tar.bz2) = 8108206
+MD5 (mono-2.6.tar.bz2) = 5c71c97fd789c5fc023de00deb3b1fed
+SHA256 (mono-2.6.tar.bz2) = 32f377fb52109bec6e79f500db8f7c4e284d9a788e605580b6b597b0174565ab
+SIZE (mono-2.6.tar.bz2) = 27645056
+MD5 (mono-basic-2.6.tar.bz2) = 225104257d7831f0f1c330269c26023e
+SHA256 (mono-basic-2.6.tar.bz2) = 1491256de6bc793e0d4e2f5cf382cdd3b431edf34e9c56cd79b0771278f114c6
+SIZE (mono-basic-2.6.tar.bz2) = 1211592
diff --git a/multimedia/moonlight/files/patch-class_System.Windows_Mono_NativeDependencyObjectHelper.cs b/multimedia/moonlight/files/patch-class_System.Windows_Mono_NativeDependencyObjectHelper.cs
new file mode 100644
index 000000000000..5d782e4e47f5
--- /dev/null
+++ b/multimedia/moonlight/files/patch-class_System.Windows_Mono_NativeDependencyObjectHelper.cs
@@ -0,0 +1,21 @@
+
+$FreeBSD$
+
+--- class/System.Windows/Mono/NativeDependencyObjectHelper.cs.orig
++++ class/System.Windows/Mono/NativeDependencyObjectHelper.cs
+@@ -177,7 +177,6 @@
+ throw new ExecutionEngineException ("multiple mappings registered for the same unmanaged peer");
+ #endif
+ Console.WriteLine ("multiple mappings registered for the same unmanaged peer 0x{0:x}, type = {1}", native, wrapper.GetType());
+- Console.WriteLine (Environment.StackTrace);
+ return false;
+ }
+
+@@ -229,7 +228,6 @@
+ INativeEventObjectWrapper wrapper = CreateObject (k, ptr) as INativeEventObjectWrapper;
+ if (wrapper == null){
+ Report.Warning ("System.Windows: Returning a null object, did not know how to construct {0}", k);
+- Report.Warning (Environment.StackTrace);
+ }
+
+ return wrapper;
diff --git a/multimedia/moonlight/files/patch-configure b/multimedia/moonlight/files/patch-configure
index 84cdf9a97800..7eb717b40229 100644
--- a/multimedia/moonlight/files/patch-configure
+++ b/multimedia/moonlight/files/patch-configure
@@ -1,23 +1,35 @@
---- configure.orig 2009-01-13 19:53:23.000000000 +0000
-+++ configure 2009-02-24 17:52:38.000000000 +0000
-@@ -23676,6 +23676,9 @@
- *linux* )
- TARGET_PLATFORM="Linux"
- ;;
-+ *freebsd* )
-+ TARGET_PLATFORM="FreeBSD"
-+ ;;
- * )
- { { echo "$as_me:$LINENO: error: Target os $target_os is unknown.
- Please add the appropriate string to configure.ac.
-@@ -24223,6 +24226,10 @@
- OSTYPE=linux
- CODECS_OS_SUPPORTED="yes"
- ;;
-+ *freebsd*)
-+ OSTYPE=freebsd
-+ CODECS_OS_SUPPORTED="no"
-+ ;;
- esac
+
+$FreeBSD$
+
+--- configure.orig
++++ configure
+@@ -17940,6 +17940,10 @@
+ MOONLIGHT_CODEC_OSTYPE=linux
+ CODECS_OS_SUPPORTED="yes"
+ ;;
++ *-*-*freebsd*)
++ MOONLIGHT_CODEC_OSTYPE=freebsd
++ CODECS_OS_SUPPORTED="yes"
++ ;;
+ esac
- if test ${ARCH} = unknown; then
+ if test ${MOONLIGHT_CODEC_ARCH} = unknown; then
+@@ -20603,6 +20607,9 @@
+ *linux*)
+ TARGET_PLATFORM="Linux"
+ ;;
++ *freebsd*)
++ TARGET_PLATFORM="FreeBSD"
++ ;;
+ *)
+ { { $as_echo "$as_me:$LINENO: error: Target os $target_os is unknown.
+ Please add the appropriate string to configure.ac.
+@@ -20619,7 +20626,7 @@
+ TARGET_PLATFORM="$TARGET_PLATFORM"_x86-gcc3
+ INSTALL_ARCH=i586
+ ;;
+- x86_64)
++ x86_64|amd64)
+ TARGET_PLATFORM="$TARGET_PLATFORM"_x86_64-gcc3
+ INSTALL_ARCH=x86_64
+ ;;
diff --git a/multimedia/moonlight/files/patch-m4_codecs.m4 b/multimedia/moonlight/files/patch-m4_codecs.m4
new file mode 100644
index 000000000000..43814be520a1
--- /dev/null
+++ b/multimedia/moonlight/files/patch-m4_codecs.m4
@@ -0,0 +1,16 @@
+
+$FreeBSD$
+
+--- m4/codecs.m4.orig
++++ m4/codecs.m4
+@@ -25,6 +25,10 @@
+ MOONLIGHT_CODEC_OSTYPE=linux
+ CODECS_OS_SUPPORTED="yes"
+ ;;
++ *-*-*freebsd*)
++ MOONLIGHT_CODEC_OSTYPE=freebsd
++ CODECS_OS_SUPPORTED="yes"
++ ;;
+ esac
+
+ if test ${MOONLIGHT_CODEC_ARCH} = unknown; then
diff --git a/multimedia/moonlight/files/patch-m4_firefox-xpi.m4 b/multimedia/moonlight/files/patch-m4_firefox-xpi.m4
new file mode 100644
index 000000000000..688d3404d69f
--- /dev/null
+++ b/multimedia/moonlight/files/patch-m4_firefox-xpi.m4
@@ -0,0 +1,24 @@
+
+$FreeBSD$
+
+--- m4/firefox-xpi.m4.orig
++++ m4/firefox-xpi.m4
+@@ -16,6 +16,9 @@
+ *linux*)
+ TARGET_PLATFORM="Linux"
+ ;;
++ *freebsd*)
++ TARGET_PLATFORM="FreeBSD"
++ ;;
+ *)
+ AC_MSG_ERROR([Target os $target_os is unknown.
+ Please add the appropriate string to configure.ac.
+@@ -28,7 +31,7 @@
+ TARGET_PLATFORM="$TARGET_PLATFORM"_x86-gcc3
+ INSTALL_ARCH=i586
+ ;;
+- x86_64)
++ x86_64|amd64)
+ TARGET_PLATFORM="$TARGET_PLATFORM"_x86_64-gcc3
+ INSTALL_ARCH=x86_64
+ ;;
diff --git a/multimedia/moonlight/files/patch-plugin_plugin.cpp b/multimedia/moonlight/files/patch-plugin_plugin.cpp
new file mode 100644
index 000000000000..bfde8c1b7c9a
--- /dev/null
+++ b/multimedia/moonlight/files/patch-plugin_plugin.cpp
@@ -0,0 +1,13 @@
+
+$FreeBSD$
+
+--- plugin/plugin.cpp.orig
++++ plugin/plugin.cpp
+@@ -17,6 +17,7 @@
+ #include <fcntl.h>
+ #include <stdlib.h>
+ #include <dlfcn.h>
++#include <unistd.h>
+
+ #include "plugin.h"
+ #include "plugin-spinner.h"
diff --git a/multimedia/moonlight/files/patch-src_application.cpp b/multimedia/moonlight/files/patch-src_application.cpp
new file mode 100644
index 000000000000..33e57fa6525a
--- /dev/null
+++ b/multimedia/moonlight/files/patch-src_application.cpp
@@ -0,0 +1,23 @@
+
+$FreeBSD$
+
+--- src/application.cpp.orig
++++ src/application.cpp
+@@ -17,6 +17,10 @@
+ #include <fcntl.h>
+ #include <errno.h>
+
++#ifdef __FreeBSD__
++#include <unistd.h>
++#endif
++
+ #include "application.h"
+ #include "runtime.h"
+ #include "deployment.h"
+@@ -369,4 +373,4 @@
+ Deployment::GetCurrent()->TrackPath (resource_root);
+ }
+ return resource_root;
+-}
+\ No newline at end of file
++}
diff --git a/multimedia/moonlight/files/patch-src_bitmapimage.cpp b/multimedia/moonlight/files/patch-src_bitmapimage.cpp
new file mode 100644
index 000000000000..9bc492336d76
--- /dev/null
+++ b/multimedia/moonlight/files/patch-src_bitmapimage.cpp
@@ -0,0 +1,15 @@
+
+$FreeBSD$
+
+--- src/bitmapimage.cpp.orig
++++ src/bitmapimage.cpp
+@@ -16,6 +16,9 @@
+ #include <glib/gstdio.h>
+ #include <fcntl.h>
+ #include <errno.h>
++#ifdef __FreeBSD__
++#include <unistd.h>
++#endif
+
+ #include "application.h"
+ #include "bitmapimage.h"
diff --git a/multimedia/moonlight/files/patch-src_deployment.cpp b/multimedia/moonlight/files/patch-src_deployment.cpp
new file mode 100644
index 000000000000..ebd10a84bbb1
--- /dev/null
+++ b/multimedia/moonlight/files/patch-src_deployment.cpp
@@ -0,0 +1,28 @@
+
+$FreeBSD$
+
+--- src/deployment.cpp.orig
++++ src/deployment.cpp
+@@ -237,8 +237,8 @@
+ }
+
+ if (mismatch) {
+- LOG_DEPLOYMENT ("Deployment::GetCurrent (): Domain mismatch, thread %u, (tls) deployment: %p, deployment->domain: %p, (mono_domain_get) current_domain: %p, root_domain: %p, hash deployment: %p\n",
+- (int) pthread_self (), deployment, deployment->domain, current_domain, root_domain, g_hash_table_lookup (current_hash, current_domain));
++ LOG_DEPLOYMENT ("Deployment::GetCurrent (): Domain mismatch, thread %li, (tls) deployment: %p, deployment->domain: %p, (mono_domain_get) current_domain: %p, root_domain: %p, hash deployment: %p\n",
++ (long) pthread_self (), deployment, deployment->domain, current_domain, root_domain, g_hash_table_lookup (current_hash, current_domain));
+ pthread_mutex_lock (&hash_mutex);
+ deployment = (Deployment *) g_hash_table_lookup (current_hash, current_domain);
+ pthread_mutex_unlock (&hash_mutex);
+@@ -270,9 +270,9 @@
+ {
+ #if DEBUG
+ if (deployment && mono_domain_get () != deployment->domain) {
+- LOG_DEPLOYMENT ("Deployment::SetCurrent (%p), thread: %i domain mismatch, is: %p\n", deployment, (int) pthread_self (), mono_domain_get ());
++ LOG_DEPLOYMENT ("Deployment::SetCurrent (%p), thread: %li domain mismatch, is: %p\n", deployment, (long) pthread_self (), mono_domain_get ());
+ } else if (pthread_getspecific (tls_key) != deployment) {
+- LOG_DEPLOYMENT ("Deployment::SetCurrent (%p), thread: %i deployment mismatch, is: %p\n", deployment, (int) pthread_self (), pthread_getspecific (tls_key));
++ LOG_DEPLOYMENT ("Deployment::SetCurrent (%p), thread: %li deployment mismatch, is: %p\n", deployment, (long) pthread_self (), pthread_getspecific (tls_key));
+ }
+ #endif
+
diff --git a/multimedia/moonlight/files/patch-src_easing.cpp b/multimedia/moonlight/files/patch-src_easing.cpp
new file mode 100644
index 000000000000..49974c3cac5c
--- /dev/null
+++ b/multimedia/moonlight/files/patch-src_easing.cpp
@@ -0,0 +1,15 @@
+
+$FreeBSD$
+
+--- src/easing.cpp.orig
++++ src/easing.cpp
+@@ -16,7 +16,9 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
++#ifndef __FreeBSD__
+ #include <malloc.h>
++#endif
+ #include <math.h>
+
+ #include <runtime.h>
diff --git a/multimedia/moonlight/files/patch-src_file-downloader.cpp b/multimedia/moonlight/files/patch-src_file-downloader.cpp
new file mode 100644
index 000000000000..2420a5b21c5f
--- /dev/null
+++ b/multimedia/moonlight/files/patch-src_file-downloader.cpp
@@ -0,0 +1,15 @@
+
+$FreeBSD$
+
+--- src/file-downloader.cpp.orig
++++ src/file-downloader.cpp
+@@ -17,6 +17,9 @@
+ #include <glib/gstdio.h>
+ #include <fcntl.h>
+ #include <errno.h>
++#ifdef __FreeBSD__
++#include <unistd.h>
++#endif
+
+ #include "file-downloader.h"
+ #include "zip/unzip.h"
diff --git a/multimedia/moonlight/files/patch-src_pipeline-ui.cpp b/multimedia/moonlight/files/patch-src_pipeline-ui.cpp
new file mode 100644
index 000000000000..79fc0b72705c
--- /dev/null
+++ b/multimedia/moonlight/files/patch-src_pipeline-ui.cpp
@@ -0,0 +1,14 @@
+
+$FreeBSD$
+
+--- src/pipeline-ui.cpp.orig
++++ src/pipeline-ui.cpp
+@@ -310,7 +310,7 @@
+ if (env_url != NULL)
+ dl->Open ("GET", env_url, NoPolicy);
+ else
+- dl->Open ("GET", CODEC_URL, NoPolicy);
++ dl->Open ("GET", "", NoPolicy);
+
+ dl->Send ();
+
diff --git a/multimedia/moonlight/files/patch-src_pipeline.cpp b/multimedia/moonlight/files/patch-src_pipeline.cpp
index 42eb6251558d..205ce11f56e7 100644
--- a/multimedia/moonlight/files/patch-src_pipeline.cpp
+++ b/multimedia/moonlight/files/patch-src_pipeline.cpp
@@ -1,10 +1,61 @@
---- src/pipeline.cpp.orig 2009-02-12 20:44:18.000000000 +0000
-+++ src/pipeline.cpp 2009-02-12 20:44:30.000000000 +0000
-@@ -15,6 +15,7 @@
- #include <config.h>
- #include <stdio.h>
- #include <sys/types.h>
-+#include <sys/stat.h>
- #include <unistd.h>
- #include <fcntl.h>
- #include <errno.h>
+
+$FreeBSD$
+
+--- src/pipeline.cpp.orig
++++ src/pipeline.cpp
+@@ -40,6 +40,23 @@
+ #include "deployment.h"
+ #include "timesource.h"
+
++#ifdef __FreeBSD__
++int
++sigisemptyset(sigset_t *set)
++{
++ sigset_t empty;
++ int ret = sigemptyset (&empty);
++ if (ret == 0) {
++ if (0 == memcmp (&empty, set, sizeof (sigset_t)))
++ ret = 1;
++ else
++ ret = 0;
++ }
++
++ return ret;
++}
++#endif
++
+ /*
+ * Media
+ */
+@@ -2260,7 +2277,7 @@
+ }
+ pthread_mutex_unlock (&mutex);
+
+- LOG_PIPELINE ("MediaThreadPool::WorkerLoop () %u: Started thread with index %i.\n", (int) pthread_self (), self_index);
++ LOG_PIPELINE ("MediaThreadPool::WorkerLoop () %lu: Started thread with index %i.\n", (long) pthread_self (), self_index);
+
+ g_return_val_if_fail (self_index >= 0, NULL);
+
+@@ -2316,11 +2333,11 @@
+
+ media->SetCurrentDeployment (true, true);
+
+- LOG_FRAMEREADERLOOP ("MediaThreadLoop::WorkerLoop () %u: got %s %p for media %p on deployment %p, there are %d nodes left.\n", (int) pthread_self (), node->closure->GetDescription (), node, media, media->GetDeployment (), queue ? queue->Length () : -1);
++ LOG_FRAMEREADERLOOP ("MediaThreadLoop::WorkerLoop () %lu: got %s %p for media %p on deployment %p, there are %d nodes left.\n", (long) pthread_self (), node->closure->GetDescription (), node, media, media->GetDeployment (), queue ? queue->Length () : -1);
+
+ node->closure->Call ();
+
+- LOG_FRAMEREADERLOOP ("MediaThreadLoop::WorkerLoop () %u: processed node %p\n", (int) pthread_self (), node);
++ LOG_FRAMEREADERLOOP ("MediaThreadLoop::WorkerLoop () %lu: processed node %p\n", (long) pthread_self (), node);
+
+ delete node;
+ }
+@@ -2333,7 +2350,7 @@
+ pthread_cond_signal (&completed_condition);
+ pthread_mutex_unlock (&mutex);
+
+- LOG_PIPELINE ("MediaThreadPool::WorkerLoop () %u: Exited (index: %i).\n", (int) pthread_self (), self_index);
++ LOG_PIPELINE ("MediaThreadPool::WorkerLoop () %lu: Exited (index: %i).\n", (long) pthread_self (), self_index);
+
+ return NULL;
+ }
diff --git a/multimedia/moonlight/files/patch-src_utils.cpp b/multimedia/moonlight/files/patch-src_utils.cpp
new file mode 100644
index 000000000000..d363fd459082
--- /dev/null
+++ b/multimedia/moonlight/files/patch-src_utils.cpp
@@ -0,0 +1,15 @@
+
+$FreeBSD$
+
+--- src/utils.cpp.orig
++++ src/utils.cpp
+@@ -16,6 +16,9 @@
+ #include <fcntl.h>
+ #include <errno.h>
+ #include <stdlib.h>
++#ifdef __FreeBSD__
++#include <unistd.h>
++#endif
+
+ #include "utils.h"
+ #include "application.h"
diff --git a/multimedia/moonlight/pkg-plist b/multimedia/moonlight/pkg-plist
index 5f0e4b4bddc5..238ab1311c1a 100644
--- a/multimedia/moonlight/pkg-plist
+++ b/multimedia/moonlight/pkg-plist
@@ -1,13 +1,126 @@
-bin/mopen1
+bin/mopen
+bin/munxap
+bin/mxap
+bin/respack
+bin/smcs
+bin/sockpol
+bin/unrespack
+bin/xaml2html
+bin/xamlg
lib/libmoon.la
lib/libmoon.so
lib/libmoon.so.0
-lib/moon/plugin/README
-lib/moon/plugin/libmoonloader.la
-lib/moon/plugin/libmoonloader.so
-lib/moon/plugin/libmoonplugin-ff3bridge.la
-lib/moon/plugin/libmoonplugin-ff3bridge.so
-lib/moon/plugin/libmoonplugin.la
-lib/moon/plugin/libmoonplugin.so
-@dirrm lib/moon/plugin
-@dirrm lib/moon
+lib/mono/gac/Moon.Windows.Desktop/3.0.0.0__0738eb9f132ed756/Moon.Windows.Desktop.dll
+lib/mono/gac/Moon.Windows.Desktop/3.0.0.0__0738eb9f132ed756/Moon.Windows.Desktop.dll.mdb
+lib/mono/gac/Moonlight.Gtk/3.0.0.0__976ad8f3443f9a4d/Moonlight.Gtk.dll
+lib/mono/gac/Moonlight.Gtk/3.0.0.0__976ad8f3443f9a4d/Moonlight.Gtk.dll.mdb
+lib/mono/gac/System.Windows.Browser/3.0.0.0__0738eb9f132ed756/System.Windows.Browser.dll
+lib/mono/gac/System.Windows.Browser/3.0.0.0__0738eb9f132ed756/System.Windows.Browser.dll.mdb
+lib/mono/gac/System.Windows.Controls.Data/2.0.5.0__0738eb9f132ed756/System.Windows.Controls.Data.dll
+lib/mono/gac/System.Windows.Controls.Data/2.0.5.0__0738eb9f132ed756/System.Windows.Controls.Data.dll.mdb
+lib/mono/gac/System.Windows.Controls/2.0.5.0__0738eb9f132ed756/System.Windows.Controls.dll
+lib/mono/gac/System.Windows.Controls/2.0.5.0__0738eb9f132ed756/System.Windows.Controls.dll.mdb
+lib/mono/gac/System.Windows/3.0.0.0__0738eb9f132ed756/System.Windows.dll
+lib/mono/gac/System.Windows/3.0.0.0__0738eb9f132ed756/System.Windows.dll.config
+lib/mono/gac/System.Windows/3.0.0.0__0738eb9f132ed756/System.Windows.dll.mdb
+lib/mono/moonlight/Moon.Windows.Desktop.dll
+lib/mono/moonlight/Moonlight.Gtk.dll
+lib/mono/moonlight/System.Windows.Browser.dll
+lib/mono/moonlight/System.Windows.Controls.Data.dll
+lib/mono/moonlight/System.Windows.Controls.dll
+lib/mono/moonlight/System.Windows.dll
+lib/monodoc/sources/moonlight-gtk.source
+lib/monodoc/sources/moonlight-gtk.tree
+lib/monodoc/sources/moonlight-gtk.zip
+lib/moonlight/2.0-redist/System.Windows.Controls.Data.dll
+lib/moonlight/2.0-redist/System.Windows.Controls.Data.dll.mdb
+lib/moonlight/2.0-redist/System.Windows.Controls.dll
+lib/moonlight/2.0-redist/System.Windows.Controls.dll.mdb
+lib/moonlight/2.0-redist/System.Xml.Linq.dll
+lib/moonlight/2.0-redist/System.Xml.Linq.dll.mdb
+lib/moonlight/2.0/Microsoft.VisualBasic.dll
+lib/moonlight/2.0/Mono.CompilerServices.SymbolWriter.dll
+lib/moonlight/2.0/Mono.CompilerServices.SymbolWriter.dll.mdb
+lib/moonlight/2.0/System.Core.dll
+lib/moonlight/2.0/System.Core.dll.mdb
+lib/moonlight/2.0/System.Net.dll
+lib/moonlight/2.0/System.Net.dll.mdb
+lib/moonlight/2.0/System.Runtime.Serialization.dll
+lib/moonlight/2.0/System.Runtime.Serialization.dll.mdb
+lib/moonlight/2.0/System.ServiceModel.Web.dll
+lib/moonlight/2.0/System.ServiceModel.Web.dll.mdb
+lib/moonlight/2.0/System.ServiceModel.dll
+lib/moonlight/2.0/System.ServiceModel.dll.mdb
+lib/moonlight/2.0/System.Windows.Browser.dll
+lib/moonlight/2.0/System.Windows.Browser.dll.mdb
+lib/moonlight/2.0/System.Windows.dll
+lib/moonlight/2.0/System.Windows.dll.mdb
+lib/moonlight/2.0/System.Xml.dll
+lib/moonlight/2.0/System.Xml.dll.mdb
+lib/moonlight/2.0/System.dll
+lib/moonlight/2.0/System.dll.mdb
+lib/moonlight/2.0/buildversion
+lib/moonlight/2.0/mscorlib.dll
+lib/moonlight/2.0/mscorlib.dll.mdb
+lib/moonlight/2.0/respack.exe
+lib/moonlight/2.0/respack.exe.mdb
+lib/moonlight/2.0/smcs.exe
+lib/moonlight/2.0/smcs.exe.mdb
+lib/moonlight/mopen.exe
+lib/moonlight/mopen.exe.config
+lib/moonlight/mopen.exe.mdb
+lib/moonlight/munxap.exe
+lib/moonlight/mxap.exe
+lib/moonlight/plugin/Microsoft.VisualBasic.dll
+lib/moonlight/plugin/System.Core.dll
+lib/moonlight/plugin/System.Core.dll.mdb
+lib/moonlight/plugin/System.Net.dll
+lib/moonlight/plugin/System.Net.dll.mdb
+lib/moonlight/plugin/System.Runtime.Serialization.dll
+lib/moonlight/plugin/System.Runtime.Serialization.dll.mdb
+lib/moonlight/plugin/System.ServiceModel.Web.dll
+lib/moonlight/plugin/System.ServiceModel.Web.dll.mdb
+lib/moonlight/plugin/System.ServiceModel.dll
+lib/moonlight/plugin/System.ServiceModel.dll.mdb
+lib/moonlight/plugin/System.Windows.Browser.dll
+lib/moonlight/plugin/System.Windows.Browser.dll.mdb
+lib/moonlight/plugin/System.Windows.dll
+lib/moonlight/plugin/System.Windows.dll.config
+lib/moonlight/plugin/System.Windows.dll.mdb
+lib/moonlight/plugin/System.Xml.dll
+lib/moonlight/plugin/System.Xml.dll.mdb
+lib/moonlight/plugin/System.dll
+lib/moonlight/plugin/System.dll.mdb
+lib/moonlight/plugin/libmoonloader.la
+lib/moonlight/plugin/libmoonloader.so
+lib/moonlight/plugin/libmoonplugin-ff3bridge.la
+lib/moonlight/plugin/libmoonplugin-ff3bridge.so
+lib/moonlight/plugin/libmoonplugin.la
+lib/moonlight/plugin/libmoonplugin.so
+lib/moonlight/plugin/mscorlib.dll
+lib/moonlight/plugin/mscorlib.dll.mdb
+lib/moonlight/respack.exe
+lib/moonlight/sockpol.exe
+lib/moonlight/xaml2html.exe
+lib/moonlight/xamlg.exe
+share/pkgconfig/moonlight-desktop-2.0.pc
+share/pkgconfig/moonlight-gtk-2.0.pc
+share/pkgconfig/moonlight-web-2.0.pc
+@dirrm share/pkgconfig
+@dirrm lib/moonlight/plugin
+@dirrm lib/moonlight/2.0-redist
+@dirrm lib/moonlight/2.0
+@dirrm lib/moonlight
+@dirrm lib/mono/moonlight
+@dirrm lib/mono/gac/System.Windows/3.0.0.0__0738eb9f132ed756
+@dirrm lib/mono/gac/System.Windows.Controls/2.0.5.0__0738eb9f132ed756
+@dirrm lib/mono/gac/System.Windows.Controls.Data/2.0.5.0__0738eb9f132ed756
+@dirrm lib/mono/gac/System.Windows.Controls.Data
+@dirrm lib/mono/gac/System.Windows.Controls
+@dirrm lib/mono/gac/System.Windows.Browser/3.0.0.0__0738eb9f132ed756
+@dirrm lib/mono/gac/System.Windows.Browser
+@dirrm lib/mono/gac/System.Windows
+@dirrm lib/mono/gac/Moonlight.Gtk/3.0.0.0__976ad8f3443f9a4d
+@dirrm lib/mono/gac/Moonlight.Gtk
+@dirrm lib/mono/gac/Moon.Windows.Desktop/3.0.0.0__0738eb9f132ed756
+@dirrm lib/mono/gac/Moon.Windows.Desktop