ports/111168: New Port: www/nspluginwrapper
Dave Grochowski
malus.x at gmail.com
Tue Apr 3 02:00:14 UTC 2007
>Number: 111168
>Category: ports
>Synopsis: New Port: www/nspluginwrapper
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Tue Apr 03 02:00:12 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator: Dave Grochowski
>Release: 6.2-STABLE and 7.0-CURRENT
>Organization:
Rowan University
>Environment:
FreeBSD berserker 6.2-STABLE FreeBSD 6.2-STABLE #21: Mon Jan 29 22:40:44 EST 2007 root at berserker:/usr/obj/usr/src/sys/BERSERKER i386
FreeBSD wanderer 7.0-CURRENT FreeBSD 7.0-CURRENT #23: Fri Mar 30 22:28:12 EDT 2007 root at wanderer:/usr/obj/usr/src/sys/WANDERER i386
>Description:
"The nspluginwrapper is an Open Source compatibility plugin for Netscape 4
(NPAPI) plugins. That is, it enables you to use plugins on platforms they were
not built for. For example, you can use the Adobe Flash plugin on Linux/x86_64,
NetBSD and FreeBSD platforms.
WWW: http://gwenole.beauchesne.info/projects/nspluginwrapper/"
Basically, this wrapper provides similar functionality to the linuxpluginwrapper in ports. It allows users to run Linux browser plugins in a native browser, such as Firefox.
This port differs from linuxpluginwrapper in a few ways:
- The plugins are installed by the user to their local browser configuration, instead of the system browser configuration.
- Plugins are automagically found by running "nspluginwrapper -v -a -i" or can be manually added by running "nspluginwrapper -i path/to/plugin.so".
- No modifications need to be performed to FreeBSD's kernel/userland.
- No modifications need to be made to libmap.conf.
- It just works. =)
>How-To-Repeat:
>Fix:
# This is a shell archive. Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file". Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
# /usr/ports/www/nspluginwrapper
# /usr/ports/www/nspluginwrapper/Makefile
# /usr/ports/www/nspluginwrapper/distinfo
# /usr/ports/www/nspluginwrapper/pkg-descr
# /usr/ports/www/nspluginwrapper/pkg-plist
# /usr/ports/www/nspluginwrapper/files
# /usr/ports/www/nspluginwrapper/files/patch-configure
# /usr/ports/www/nspluginwrapper/files/patch-src-npw-wrapper.c
# /usr/ports/www/nspluginwrapper/pkg-message
#
echo c - /usr/ports/www/nspluginwrapper
mkdir -p /usr/ports/www/nspluginwrapper > /dev/null 2>&1
echo x - /usr/ports/www/nspluginwrapper/Makefile
sed 's/^X//' >/usr/ports/www/nspluginwrapper/Makefile << 'END-of-/usr/ports/www/nspluginwrapper/Makefile'
X# New ports collection makefile for: nspluginwrapper
X# Date created: 30 March 2007
X# Whom: Dave Grochowski
X#
X# $FreeBSD$
X#
X
XPORTNAME= nspluginwrapper
XPORTVERSION= 0.9.91.3
XCATEGORIES= www linux emulators
XMASTER_SITES= http://gwenole.beauchesne.info/projects/nspluginwrapper/files/
XDISTFILES= ${PORTNAME}-${PORTVERSION}.tar.bz2 \
X ${PORTNAME}-i386-${PORTVERSION}-1.x86_64.rpm
XEXTRACT_ONLY= ${PORTNAME}-${PORTVERSION}.tar.bz2
X
XMAINTAINER= freebsd-emulation at FreeBSD.org
XCOMMENT= A compatibility plugin for Netscape 4 (NPAPI) plugins
X
XONLY_FOR_ARCHS= i386 amd64
X
XUSE_LINUX= YES
XUSE_XLIB= YES
XUSE_X_PREFIX= YES
X
XCFLAGS+= -std=c99
X
XUSE_LDCONFIG= YES
XUSE_GMAKE= YES
XHAS_CONFIGURE= YES
XCONFIGURE_ARGS= --prefix=${PREFIX} --target-os=linux --target-cpu=i386 \
X --x11=${X11BASE} --with-cc=${CC} --with-cxx=${CXX}
X
XWRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
X
X# We must manually extract, modify, and install the Linux version of npviewer.
Xpre-install:
X cd ${WRKSRC} && \
X rpm2cpio ${DISTDIR}/${PORTNAME}-i386-${PORTVERSION}-1.x86_64.rpm | \
X ${CPIO} -id
X ${REINPLACE_CMD} -e 's|/usr|${PREFIX}|' \
X ${WRKSRC}/usr/lib/nspluginwrapper/i386/linux/npviewer
X ${RM} ${WRKSRC}/usr/lib/nspluginwrapper/i386/linux/npviewer.bak
X
Xpost-install:
X ${MKDIR} ${PREFIX}/lib/nspluginwrapper/i386/linux
X ${INSTALL_SCRIPT} ${WRKSRC}/usr/lib/nspluginwrapper/i386/linux/* \
X ${PREFIX}/lib/nspluginwrapper/i386/linux/
X @${CAT} pkg-message
X
X.include <bsd.port.mk>
END-of-/usr/ports/www/nspluginwrapper/Makefile
echo x - /usr/ports/www/nspluginwrapper/distinfo
sed 's/^X//' >/usr/ports/www/nspluginwrapper/distinfo << 'END-of-/usr/ports/www/nspluginwrapper/distinfo'
XMD5 (nspluginwrapper-0.9.91.3.tar.bz2) = 0e047db84a979237fb28a9e8360890b0
XSHA256 (nspluginwrapper-0.9.91.3.tar.bz2) = 3672dcf615f0a0c4a4bafc6e97cd134ad84ea402f916d0c3accff8e9a0aa6c8e
XSIZE (nspluginwrapper-0.9.91.3.tar.bz2) = 257648
XMD5 (nspluginwrapper-i386-0.9.91.3-1.x86_64.rpm) = 881bc1315d55c7e4879d8b9cd3e1077a
XSHA256 (nspluginwrapper-i386-0.9.91.3-1.x86_64.rpm) = 47d8baf6dca9cb371758962671547dcd82086741f1fe8fbb64f34d002306cbe3
XSIZE (nspluginwrapper-i386-0.9.91.3-1.x86_64.rpm) = 50757
END-of-/usr/ports/www/nspluginwrapper/distinfo
echo x - /usr/ports/www/nspluginwrapper/pkg-descr
sed 's/^X//' >/usr/ports/www/nspluginwrapper/pkg-descr << 'END-of-/usr/ports/www/nspluginwrapper/pkg-descr'
XThe nspluginwrapper is an Open Source compatibility plugin for Netscape 4
X(NPAPI) plugins. That is, it enables you to use plugins on platforms they were
Xnot built for. For example, you can use the Adobe Flash plugin on Linux/x86_64,
XNetBSD and FreeBSD platforms.
X
XWWW: http://gwenole.beauchesne.info/projects/nspluginwrapper/
END-of-/usr/ports/www/nspluginwrapper/pkg-descr
echo x - /usr/ports/www/nspluginwrapper/pkg-plist
sed 's/^X//' >/usr/ports/www/nspluginwrapper/pkg-plist << 'END-of-/usr/ports/www/nspluginwrapper/pkg-plist'
Xbin/nspluginwrapper
Xlib/nspluginwrapper/i386/freebsd/npconfig
Xlib/nspluginwrapper/i386/freebsd/npwrapper.so
Xlib/nspluginwrapper/i386/linux/npviewer.bin
Xlib/nspluginwrapper/i386/linux/npviewer
Xlib/nspluginwrapper/i386/linux/libxpcom.so
Xlib/nspluginwrapper/noarch/mkruntime
Xlib/nspluginwrapper/noarch/npviewer
X at dirrmtry lib/nspluginwrapper/i386/freebsd
X at dirrmtry lib/nspluginwrapper/i386/linux
X at dirrmtry lib/nspluginwrapper/i386
X at dirrmtry lib/nspluginwrapper/noarch
X at dirrmtry lib/nspluginwrapper
END-of-/usr/ports/www/nspluginwrapper/pkg-plist
echo c - /usr/ports/www/nspluginwrapper/files
mkdir -p /usr/ports/www/nspluginwrapper/files > /dev/null 2>&1
echo x - /usr/ports/www/nspluginwrapper/files/patch-configure
sed 's/^X//' >/usr/ports/www/nspluginwrapper/files/patch-configure << 'END-of-/usr/ports/www/nspluginwrapper/files/patch-configure'
X--- configure.orig Sun Mar 4 10:01:22 2007
X+++ configure Fri Mar 30 21:14:15 2007
X@@ -6,13 +6,8 @@
X PACKAGE=nspluginwrapper
X
X # set temporary file name
X-if test ! -z "$TMPDIR" ; then
X- TMPDIR1="${TMPDIR}"
X-elif test ! -z "$TEMPDIR" ; then
X- TMPDIR1="${TEMPDIR}"
X-else
X- TMPDIR1="/tmp"
X-fi
X+mkdir -p tmp
X+TMPDIR1="./tmp"
X
X TMPC="${TMPDIR1}/npw-conf-${RANDOM}-$$-${RANDOM}.c"
X TMPO="${TMPDIR1}/npw-conf-${RANDOM}-$$-${RANDOM}.o"
X@@ -75,6 +70,9 @@
X --prefix=*)
X prefix=`echo $opt | cut -d '=' -f 2`
X ;;
X+--x11=*)
X+ x_base_dirs=`echo $opt | cut -d '=' -f 2`
X+ ;;
X --pkglibdir=*)
X pkglibdir=`echo $opt | cut -d '=' -f 2`
X ;;
X@@ -279,10 +277,12 @@
X fi
X
X # check for X11 base dir
X-x_base_dirs='
X-/usr
X-/usr/X11R6
X-/usr/local/X11R6'
X+if test -z "$x_base_dirs"; then
X+ x_base_dirs='
X+ /usr
X+ /usr/X11R6
X+ /usr/local'
X+fi
X for dir in $x_base_dirs; do
X x_include_dir="$dir/include"
X if test -f $x_include_dir/X11/Intrinsic.h; then
X@@ -407,6 +407,7 @@
X echo " --target-os=OS build plugin support for target OS [$target_os]"
X echo " --target-cpu=CPU build plugin support for target CPU [$target_cpu]"
X echo " --with-viewer build viewer [$build_viewer]"
X+echo " --x11=PREFIX path to X11 base"
X echo ""
X echo "Advanced options (experts only):"
X echo " --source-path=PATH path of source code [$source_path]"
END-of-/usr/ports/www/nspluginwrapper/files/patch-configure
echo x - /usr/ports/www/nspluginwrapper/files/patch-src-npw-wrapper.c
sed 's/^X//' >/usr/ports/www/nspluginwrapper/files/patch-src-npw-wrapper.c << 'END-of-/usr/ports/www/nspluginwrapper/files/patch-src-npw-wrapper.c'
X--- src/npw-wrapper.c.orig Fri Mar 30 20:19:01 2007
X+++ src/npw-wrapper.c Fri Mar 30 20:19:18 2007
X@@ -28,6 +28,7 @@
X #include <unistd.h>
X #include <pthread.h>
X #include <semaphore.h>
X+#include <signal.h>
X #include <sys/wait.h>
X
X #include <glib.h>
END-of-/usr/ports/www/nspluginwrapper/files/patch-src-npw-wrapper.c
echo x - /usr/ports/www/nspluginwrapper/pkg-message
sed 's/^X//' >/usr/ports/www/nspluginwrapper/pkg-message << 'END-of-/usr/ports/www/nspluginwrapper/pkg-message'
X================================================================
X
XThe nspluginwrapper is installed on a per user basis. All of
Xthe commands can be run as an unprivileged user.
X
X================================================================
X
XTo install all the plugins from their default locations:
X
Xnspluginwrapper -v -a -i
X
X================================================================
X
XTo install a specific plugin:
X
Xnspluginwrapper -i path/to/plugin.so
X
X================================================================
X
XTo remove a specific plugin:
X
Xnspluginwrapper -r path/to/plugin.so
X
X================================================================
X
XTo view all currently installed plugins:
X
Xnspluginwrapper -l
X
X================================================================
END-of-/usr/ports/www/nspluginwrapper/pkg-message
exit
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list