1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-04 06:15:24 +00:00

Add port www/linux-mplayer-plugin:

- Introduce NPAPI infrastructure and a demo port, both at an alpha stage

mplayerplug-in is a browser plugin that uses mplayer to play digital
media from websites.

This plug-in gives Mozilla the ability to play media from a website
the net without reading the source html and getting the url manually.
Media is played embedded in the page or in a separate window depending
on how the author of the webpage intended the media to be seen.

WWW: http://mplayerplug-in.sourceforge.net/

Wiki:		http://wiki.freebsd.org/NPAPI
This commit is contained in:
Andrew Pantyukhin 2006-07-28 17:19:18 +00:00
parent e488e30ebf
commit dbbc0bfe22
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=168976
5 changed files with 230 additions and 0 deletions

View File

@ -238,6 +238,7 @@
SUBDIR += linux-flashplugin7
SUBDIR += linux-flock
SUBDIR += linux-mozilla
SUBDIR += linux-mplayer-plugin
SUBDIR += linux-nvu
SUBDIR += linux-opera
SUBDIR += linux-seamonkey

View File

@ -0,0 +1,35 @@
# New ports collection makefile for: linux-mplayerplug-in
# Date Created: 17 June 2006
# Whom: Andrew Pantyukhin <infofarmer@FreeBSD.org>
#
# $FreeBSD$
#
PORTNAME= mplayerplug-in
PORTVERSION= 3.25
DISTVERSIONSUFFIX= -fc4
CATEGORIES= www multimedia
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}
PKGNAMEPREFIX= linux-
MAINTAINER= infofarmer@FreeBSD.org
COMMENT= Embed MPlayer into browser
RUN_DEPENDS= mplayer:${PORTSDIR}/multimedia/mplayer
NO_BUILD= yes
USE_LINUX_RPM= yes
LINUX_DIST= fedora
LINUX_DIST_VER= 4
PREFIX?= ${LOCALBASE}
USE_NPAPI= linux-*
NPAPI_FILES= ${PLUGINS_EXT:S/^/${PORTNAME}/}
PLUGINS_EXT= .so .xpt -gmp.so -gmp.xpt -qt.so -qt.xpt -rm.so -rm.xpt -wmp.so -wmp.xpt
post-extract:
${MKDIR} ${WRKSRC} && ${MV} ${WRKDIR}/usr/lib/mozilla/plugins/* ${WRKSRC}/
.include "${.CURDIR}/Makefile.npapi"
.include <bsd.port.mk>

View File

@ -0,0 +1,182 @@
#-*- mode: makefile; tab-width: 4; -*
# ex:ts=4
#
# New ports collection makefile for: npapi infrastructure
# Date created: 27 June 2006
# Whom: Andrew Pantyukhin <infofarmer@FreeBSD.org>
#
# $FreeBSD$
#
# NPAPI_ID - Extension id, might be in {12345-...} or dev@org format
# NPAPI_FILES - List of files in npapi archive. This is used to produce
# PLIST_FILES. NPAPI_FILES can be generated by npapi-gen, but be
# sure to put chrome.manifest in ${FILESDIR} before that if you
# need it.
# NPAPI_DIRS - List of directories in npapi archive. This is used to produce
# PLIST_DIRS.
# PORTNAME, PORTVERSION, DISTVERSIONSUFFIX, CATEGORIES, MAINTAINER, COMMENT
# - These should all be set manually for port to be functional. See
# ${PORTSDIR}/Mk/bsd.port.mk for details.
# NPAPI_LIBDIR - Name of the directory to install plugins in.
# Default: ${PREFIX}/lib/npapi
# NPAPI_NPAPIDIR
# - Name of the directory to install plugin's files in.
# Default: ${NPAPI_LIBDIR}/${NPAPI_ID}
# USE_NPAPI - If set, the port installs one or more npapi plugins.
# If this is set to a list of apps (wildcards possible) the
# plugins will be installed for them only.
# WITH_NPAPI - A user-tunable variable, determines which apps should
# plugin be made available for. Can be set to a list of
# apps, same as USE_NPAPI, and/or to "ext:app[,app,app,...]" tuples.
# ext should be a portname. If ext starts and ends with a slash
# (`/'), it is treated as an extended regular expression (see
# re_format(7)). Right of the colon should be a list of apps in
# the same format as USE_NPAPI, but comma- instead of whitespace-
# delimited. If no matching tuples for an plugin are found,
# WITH_NPAPI is scanned for non tuple-records which are then treated
# as a USE_NPAPI list. If several tuples match, the last non-regexp
# one takes precedence, then the last regexp one.
#
# This Makefile is an alpha-version of the new npapi infrastructure.
#
# Npapi's are installed into ${LOCALBASE}/lib/npapi/${NPAPI_ID} by default and
# links are made to all apps which have the engine (firefox, thunderbird and flock
# at the moment). relink and relink-all targets can be invoked to refarm the links
# of a single plugins or all installed plugins accordingly.
#
# npapi ports do not depend on their master applications. You can install an
# plugin before the app and run relink when the app is present.
NPAPI_ID?= ${PKGBASE}
NPAPI_DISTNAME?= ${PORTNAME}
NPAPI_APPS_ALL_WC= *mozilla* *firefox* *flock* *seamonkey* *opera*
NPAPI_APPS_ALL_WC_LINUX= ${NPAPI_APPS_ALL_WC:S/^*/linux-/}
NPAPI_APPS_ALL_WC_NATIVE= ${NPAPI_APPS_ALL_WC:S/^*//}
NPAPI_APPS_ALL= mozilla mozilla-devel linux-mozilla \
firefox firefox-devel linux-firefox linux-firefox-devel \
flock linux-flock \
seamonkey linux-seamonkey linux-seamonkey-devel \
opera linux-opera
# === Let's process WITH_NPAPI into WITH_NPAPI_APPS
WITH_NPAPI_TUPLES= ${WITH_NPAPI:M*?\:?*}
WITH_NPAPI_NTUPLES= ${WITH_NPAPI:N*\:*}
WITH_NPAPI_TUPLES_RX= ${WITH_NPAPI_TUPLES:M/*?*/\:?*}
WITH_NPAPI_TUPLES_WC= ${WITH_NPAPI_TUPLES:N/*?*/\:?*}
WITH_NPAPI_MATCH?= ${PORTNAME}
WITH_NPAPI_MATCHSTRING?= _=~match~=_
.for tuple_rx in ${WITH_NPAPI_TUPLES_RX}
_rx= ${tuple_rx:C!/(.*)/\:.*!\1!}
_apps= ${tuple_rx:C!/.*/\:(.*)!\1!}
_testrx=${WITH_NPAPI_MATCH:C!.*${_rx}.*!${WITH_NPAPI_MATCHSTRING}!}
.if ${_testrx} == ${WITH_NPAPI_MATCHSTRING}
WITH_NPAPI_APPS:= ${_apps:S/,/ /g}
.endif
.endfor
.for tuple_wc in ${WITH_NPAPI_TUPLES_WC}
_wc= ${tuple_wc:C!(.*)\:.*!\1!}
_apps= ${tuple_wc:C!.*\:(.*)!\1!}
.if ${_wc} == ${WITH_NPAPI_MATCH}
WITH_NPAPI_APPS:= ${_apps:S/,/ /g}
.endif
.endfor
.if ${WITH_NPAPI_NTUPLES}
WITH_NPAPI_APPS?= ${WITH_NPAPI_NTUPLES}
.endif
# === WITH_NPAPI has been processed
.ifdef WITH_NPAPI_APPS
USE_NPAPI= ${WITH_NPAPI_APPS}
.endif
.if !defined(USE_NPAPI) || ${USE_NPAPI:U} == "YES" || ${USE_NPAPI} == "*"
USE_NPAPI= ${NPAPI_APPS_ALL_WC}
.endif
.for _TEMP_APP__ in ${NPAPI_APPS_ALL}
_TEMP_APP_=${_TEMP_APP__}
_TEMP_FLAG_=0
. for _TEMP_USE_ in ${USE_NPAPI}
. if !${_TEMP_APP_:C!${_TEMP_USE_:S/*/.*/:S/?/./}!!}
_TEMP_FLAG_=1
. endif
. endfor
. if ${_TEMP_FLAG_}
USE_NPAPI_EXP+= ${_TEMP_APP__}
. endif
.endfor
NPAPI_APPS?= ${USE_NPAPI_EXP:S.^.${LOCALBASE}/lib/.:S.$./plugins.:N*opera*} \
${USE_NPAPI_EXP:S.^.${X11BASE}/lib/.:S.$./plugins.:N*opera*} \
${USE_NPAPI_EXP:S.^.${LOCALBASE}/share/.:S.$./plugins.:M*opera*} \
${USE_NPAPI_EXP:S.^.${X11BASE}/share/.:S.$./plugins.:M*opera*}
NPAPI_SLDIRS_ALL= ${NPAPI_APPS_ALL:S.^.${NPAPI_SLDIR}/.}
NPAPI_SLDIRS= ${USE_NPAPI:S.^.${NPAPI_SLDIR}/.}
NPAPI_LINKFARMS= ${NPAPI_APPS} ${NPAPI_SLDIRS}
NPAPI_LIBDIR?= ${PREFIX}/lib/npapi
NPAPI_SLDIR?= ${NPAPI_LIBDIR}/symlinks
.ifndef NPAPI_DISTNAMES
NPAPI_NPAPIDIR?= ${NPAPI_LIBDIR}/${NPAPI_ID}
.endif
NPAPI_DIRS_TRY= ${NPAPI_SLDIRS_ALL:S,^${PREFIX}/,,} \
${NPAPI_SLDIR:S,^${PREFIX}/,,} \
${NPAPI_LIBDIR:S,^${PREFIX}/,,}
PLIST_SUB+= NPAPI_LIBDIR="${NPAPI_LIBDIR:S,^${PREFIX}/,,}" \
NPAPI_NPAPIDIR="${NPAPI_NPAPIDIR:S,^${PREFIX}/,,}"
_TD= ${NPAPI_NPAPIDIR:S,^${PREFIX}/,,}
_TD_FULL= ${NPAPI_NPAPIDIR}
_A= >> ${TMPPLIST}
_Q= 2>/dev/null || true
PLIST_FILES+= ${NPAPI_FILES:S!^!${_TD}/!}
PLIST_DIRS+= ${NPAPI_DIRS:S!^!${_TD}/!} ${_TD}
.for dist in ${NPAPI_DISTNAMES}
NPAPI_NPAPIDIR_${dist}= ${NPAPI_LIBDIR}/${NPAPI_ID_${dist}}
_TD_${dist}= ${NPAPI_NPAPIDIR_${dist}:S,^${PREFIX}/,,}
PLIST_FILES+= ${NPAPI_FILES_${dist}:S!^!${_TD_${dist}}/!}
PLIST_DIRS+= ${NPAPI_DIRS_${dist}:S!^!${_TD_${dist}}/!} ${_TD_${dist}}
.endfor
.if !target(do-install)
do-install:
@${INSTALL} -d ${_TD_FULL} ${NPAPI_SLDIRS_ALL}
@${CP} -p ${NPAPI_FILES:S,^,${WRKSRC}/,} ${_TD_FULL}/
@${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${_TD_FULL}/
@${CHMOD} -R a+rX,go-w ${_TD_FULL}/
@for _dir in ${NPAPI_LINKFARMS} ; { ${LN} -sf ${_TD_FULL}/* $$_dir ${_Q} ; }
@${ECHO_CMD} '@exec ${INSTALL} -d ${NPAPI_SLDIRS_ALL:S,^${PREFIX},%D,}' ${_A}
@${ECHO_CMD} '@exec for _dir in ${NPAPI_LINKFARMS} ; { ${LN} -sf ${_TD_FULL}/* $$_dir ${_Q}; }' ${_A}
@${ECHO_CMD} '@unexec for _dir in ${NPAPI_LINKFARMS} ; { ${RM} -f ${NPAPI_FILES:S,^,\$_dir/,} ; }' ${_A}
@${ECHO_CMD} '@unexec rmdir ${NPAPI_DIRS_TRY:S,^,%D/,} ${_Q}' ${_A}
.endif
.if !target(relink)
relink:
@-for _app in ${NPAPI_APPS} ; { ${LN} -sf ${_TD_FULL}/* $$_app ${_Q} ; }
.endif
# Maintainer section
npapi-gen: extract
@${ECHO_CMD} -n 'NPAPI_FILES='
@cd ${WRKSRC} && ${FIND} -s . -not -type d | cut -f2- -d/ | ${TR} '\n' ' '
@if [ -d ${FILESDIR} -a -f ${FILESDIR}/chrome.manifest ] ; \
then ${ECHO_CMD} chrome.manifest ; fi
@${ECHO_CMD}
@${ECHO_CMD} -n 'NPAPI_DIRS='
@cd ${WRKSRC} && ${FIND} -ds . -not -name . -type d | cut -f2- -d/ | ${TR} '\n' ' '
@${ECHO_CMD}
npapi-plist: extract
@${FIND} -s ${WRKSRC} -not -type d | ${SED} -e "s,^${WRKSRC},%%NPAPI_NPAPIDIR%%," > ${PLIST}
@if [ -d ${FILESDIR} -a -f ${FILESDIR}/chrome.manifest ] ; \
then ${ECHO_CMD} %%NPAPI_NPAPIDIR%%/chrome.manifest >> ${PLIST} ; fi
@${FIND} -ds ${WRKSRC} -type d -not -name ${DISTNAME} | \
${SED} -e "s,^${WRKSRC},@dirrm %%NPAPI_NPAPIDIR%%," >> ${PLIST}

View File

@ -0,0 +1,3 @@
MD5 (rpm/i386/fedora/4/mplayerplug-in-3.25-fc4.i386.rpm) = 1c150a5a3b5edb8f57b1eb8806954e96
SHA256 (rpm/i386/fedora/4/mplayerplug-in-3.25-fc4.i386.rpm) = c01a7219c053bad2a1d8bee52541c088e540183e87be5bab58ae09a9ab89d0ad
SIZE (rpm/i386/fedora/4/mplayerplug-in-3.25-fc4.i386.rpm) = 467709

View File

@ -0,0 +1,9 @@
mplayerplug-in is a browser plugin that uses mplayer to play digital
media from websites.
This plug-in gives Mozilla the ability to play media from a website
the net without reading the source html and getting the url manually.
Media is played embedded in the page or in a separate window depending
on how the author of the webpage intended the media to be seen.
WWW: http://mplayerplug-in.sourceforge.net/