1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-05 01:55:52 +00:00

Add moonlight 1.0, the free opensource implementation of Microsoft Silverlight.

The port only supports Firefox 2 but support for Firefox 3 will arrive soon.
Also, there's no sound support at the moment either.
This commit is contained in:
Florent Thoumie 2009-02-24 17:26:48 +00:00
parent 6ece1b2fd4
commit 1da2f4b297
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=229002
10 changed files with 208 additions and 0 deletions

View File

@ -162,6 +162,7 @@
SUBDIR += mmpython
SUBDIR += mmsclient
SUBDIR += mmsrip
SUBDIR += moonlight
SUBDIR += motion
SUBDIR += mpeg
SUBDIR += mpeg2codec

View File

@ -0,0 +1,100 @@
# New ports collection makefile for: moonlight
# Date created: Feb 13 2009
# Whom: Florent Thoumie <flz@FreeBSD.org>
#
# $FreeBSD$
#
PORTNAME= moonlight
PORTVERSION= 1.0
CATEGORIES= multimedia www
MASTER_SITES= http://ftp.novell.com/pub/mono/sources/moon/
DISTNAME= moon-${PORTVERSION}
MAINTAINER= mono@FreeBSD.org
COMMENT= OpenSource Implementation of Silverlight
LIB_DEPENDS= avcodec.1:${PORTSDIR}/multimedia/ffmpeg \
execinfo.1:${PORTSDIR}/devel/libexecinfo
OPTIONS= FF2 "Install Firefox 2.x support" on
# FF3 "Install Firefox 3.x support" on
USE_BZIP2= yes
GNU_CONFIGURE= yes
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
LDFLAGS="-L${LOCALBASE}/lib"
CONFIGURE_ARGS= --with-cairo=system \
--with-debug=yes
WEBPLUGINS_DIR= ${PREFIX}/lib/moon/plugin
WEBPLUGINS_FILES= libmoonloader.so \
libmoonplugin.so
.include <bsd.port.pre.mk>
.include "${PORTSDIR}/www/firefox/Makefile.webplugins"
.if !defined(WITHOUT_FF2) || exists(${LOCALBASE}/bin/firefox)
BUILD_DEPENDS+= ${LOCALBASE}/bin/firefox:${PORTSDIR}/www/firefox
RUN_DEPENDS+= ${LOCALBASE}/bin/firefox:${PORTSDIR}/www/firefox
USE_WEBPLUGINS+= gecko18
WEBPLUGINS_FILES+= libmoonplugin-ff2bridge.so
PLIST_SUB+= FF2=""
CONFIGURE_ARGS+= --with-ff2=yes
.else
PLIST_SUB+= FF2="@comment "
CONFIGURE_ARGS+= --with-ff2=no
.endif
#.if !defined(WITHOUT_FF3) || exists(${LOCALBASE}/bin/firefox3)
#BUILD_DEPENDS+= ${LOCALBASE}/bin/firefox3:${PORTSDIR}/www/firefox3
#RUN_DEPENDS+= ${LOCALBASE}/bin/firefox3:${PORTSDIR}/www/firefox3
#
#USE_WEBPLUGINS+= gecko19
#WEBPLUGINS_FILES+= libmoonplugin-ff3bridge.so
#
#PLIST_SUB+= FF3=""
#CONFIGURE_ARGS+= --with-ff3=yes
#CONFIGURE_ENV+= FF3_CFLAGS="-I${LOCALBASE}/include/firefox3/unstable -I${LOCALBASE}/include/nspr" \
# FF3_LIBS="-pthread -L${LOCALBASE}/lib/firefox3"
#.else
PLIST_SUB+= FF3="@comment "
#CONFIGURE_ARGS+= --with-ff3=no
#.endif
# Building the .xpi doesn't actually require embedded cairo, but it's a safer option
# as there's no way for firefox to detect if cairo is already installed apparently.
.if defined(WITH_XPI_PLUGIN)
CONFIGURE_ARGS+=--enable-user-plugin --with-cairo=embedded
PLIST= ${NONEXISTENT}
PLIST_FILES= ${WEBPLUGINS_DIR}/${PKGNAME}-freebsd-${OSREL}.xpi
.endif
post-patch:
@${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
@${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
# @${REINPLACE_CMD} -e 's|\(FF3_MODULES\)=.*|\1="libavutil"|1' \
# ${WRKSRC}/configure
# @${REINPLACE_CMD} -e 's|\(FF3_MODULES\)=.*|\1="firefox-js firefox-plugin"|1' \
# ${WRKSRC}/configure
.if defined(WITH_XPI_PLUGIN)
do-install:
${INSTALL_DATA} ${WRKSRC}/plugin/install/novell-moonlight.xpi \
${WEBPLUGINS_DIR}/${PKGNAME}-freebsd-${OSREL}.xpi
.endif
.include <bsd.port.post.mk>

View File

@ -0,0 +1,3 @@
MD5 (moon-1.0.tar.bz2) = 3600d96fe421c7713cef8847cca5bb8a
SHA256 (moon-1.0.tar.bz2) = 440133d964120858832133981f4b559cc208fa2bccf20154f62c22318f373645
SIZE (moon-1.0.tar.bz2) = 8806735

View File

@ -0,0 +1,28 @@
--- configure.orig 2009-01-13 19:53:23.000000000 +0000
+++ configure 2009-02-13 15:20:45.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.
@@ -24219,10 +24222,14 @@
;;
esac
case "$host" in
- *-*-*linux*)
+ *-*-*linux*|*freebsd*)
OSTYPE=linux
CODECS_OS_SUPPORTED="yes"
;;
+ *freebsd*)
+ OSTYPE=linux
+ CODECS_OS_SUPPORTED="no"
+ ;;
esac
if test ${ARCH} = unknown; then

View File

@ -0,0 +1,22 @@
--- src/debug.cpp.orig 2009-01-13 19:41:33.000000000 +0000
+++ src/debug.cpp 2009-02-12 17:50:56.000000000 +0000
@@ -120,6 +120,19 @@
static Addr2LineData *addr2line_pipes = NULL;
+#ifndef getline
+gint64
+getline(char **buffer, size_t *len, FILE *stream)
+{
+ *buffer = (char *)calloc(1, 512); /* Should be plenty */
+
+ if (fgets(*buffer, 512, stream) == NULL)
+ return -1;
+ *len = strlen(*buffer);
+ return *len;
+}
+#endif
+
static char*
library_of_ip (gpointer ip, gpointer* base_address)
{

View File

@ -0,0 +1,10 @@
--- 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>

View File

@ -0,0 +1,11 @@
--- src/utils.h.orig 2009-02-12 20:41:44.000000000 +0000
+++ src/utils.h 2009-02-12 20:42:46.000000000 +0000
@@ -14,6 +14,8 @@
#ifndef __MOON_GARRAY_EXT_H__
#define __MOON_GARRAY_EXT_H__
+#include <sys/types.h>
+
#include <glib.h>
#include <cairo.h>

View File

@ -0,0 +1,10 @@
--- tools/mopen/mopen1.cpp.orig 2009-02-13 14:08:20.000000000 +0000
+++ tools/mopen/mopen1.cpp 2009-02-13 14:08:37.000000000 +0000
@@ -14,6 +14,7 @@
// Implement everything mopen implements
//
+#include <sys/stat.h>
#include <config.h>
#include <gtk/gtk.h>
#include <unistd.h>

View File

@ -0,0 +1,8 @@
Moonlight is a free and open-source implementation of the Silverlight
web application framework which was originally developed by Microsoft.
Moonlight is currently being developed by the Mono Project
WWW: http://www.mono-project.com/Moonlight
- Florent Thoumie
flz@FreeBSD.org

View File

@ -0,0 +1,15 @@
bin/mopen1
lib/libmoon.la
lib/libmoon.so
lib/libmoon.so.0
lib/moon/plugin/README
lib/moon/plugin/libmoonloader.la
lib/moon/plugin/libmoonloader.so
%%FF2%%lib/moon/plugin/libmoonplugin-ff2bridge.la
%%FF2%%lib/moon/plugin/libmoonplugin-ff2bridge.so
%%FF3%%lib/moon/plugin/libmoonplugin-ff3bridge.la
%%FF3%%lib/moon/plugin/libmoonplugin-ff3bridge.so
lib/moon/plugin/libmoonplugin.la
lib/moon/plugin/libmoonplugin.so
@dirrm lib/moon/plugin
@dirrm lib/moon