Add nspluginwrapper 0.9.91.3, a compatibility plugin for Netscape 4

(NPAPI) plugins.

PR:		ports/111166
Submitted by:	Dave Grochowski
This commit is contained in:
Rong-En Fan 2007-04-04 17:05:46 +00:00
parent c88358ae09
commit 118a03458b
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=189216
19 changed files with 403 additions and 0 deletions

View file

@ -435,6 +435,7 @@
SUBDIR += npapi-xine
SUBDIR += npc
SUBDIR += nscache
SUBDIR += nspluginwrapper
SUBDIR += nvu
SUBDIR += ocaml-net
SUBDIR += ocaml-wdialog

View file

@ -0,0 +1,58 @@
# New ports collection makefile for: nspluginwrapper
# Date created: 30 March 2007
# Whom: Dave Grochowski
#
# $FreeBSD$
#
PORTNAME= nspluginwrapper
PORTVERSION= 0.9.91.3
CATEGORIES= www linux emulators
MASTER_SITES= http://gwenole.beauchesne.info/projects/nspluginwrapper/files/
DISTFILES= ${DISTNAME}${EXTRACT_SUFX} ${RPMFILE}
EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
MAINTAINER= malus.x@gmail.com
COMMENT= A compatibility plugin for Netscape 4 (NPAPI) plugins
EXTRACT_DEPENDS= rpm2cpio:${PORTSDIR}/archivers/rpm
RPMFILE= ${PORTNAME}-i386-${PORTVERSION}-1.x86_64.rpm
ONLY_FOR_ARCHS= i386 amd64
USE_BZIP2= yes
USE_LINUX= yes
USE_XLIB= yes
USE_GNOME= glib20 gtk20 pkgconfig
CFLAGS+= -std=c99
USE_LDCONFIG= yes
USE_GMAKE= yes
HAS_CONFIGURE= yes
CONFIGURE_ARGS= --prefix=${PREFIX} --target-os=linux --target-cpu=i386 \
--x11=${X11BASE} --with-cc=${CC} --with-cxx=${CXX}
LIBDIR= ${PREFIX}/lib/${PORTNAME}
PLIST_SUB= LIBDIR="${LIBDIR:C/^${PREFIX}\///}" ARCH="${ARCH}"
# We must manually extract, modify, and install the Linux version of npviewer.
post-extract:
cd ${WRKSRC} && rpm2cpio ${DISTDIR}/${RPMFILE} | ${CPIO} -id
${REINPLACE_CMD} -e 's|/usr|${PREFIX}|' \
${WRKSRC}/usr/lib/nspluginwrapper/i386/linux/npviewer
${RM} ${WRKSRC}/usr/lib/nspluginwrapper/i386/linux/npviewer.bak
post-patch:
@${REINPLACE_CMD} -e 's,x86_64,amd64,g' ${WRKSRC}/configure
post-install:
${MKDIR} ${LIBDIR}/i386/linux
${INSTALL_SCRIPT} ${WRKSRC}/usr/lib/nspluginwrapper/i386/linux/* \
${LIBDIR}/i386/linux/
@${CAT} ${PKGMESSAGE}
.include <bsd.port.mk>

View file

@ -0,0 +1,6 @@
MD5 (nspluginwrapper-0.9.91.3.tar.bz2) = 0e047db84a979237fb28a9e8360890b0
SHA256 (nspluginwrapper-0.9.91.3.tar.bz2) = 3672dcf615f0a0c4a4bafc6e97cd134ad84ea402f916d0c3accff8e9a0aa6c8e
SIZE (nspluginwrapper-0.9.91.3.tar.bz2) = 257648
MD5 (nspluginwrapper-i386-0.9.91.3-1.x86_64.rpm) = 881bc1315d55c7e4879d8b9cd3e1077a
SHA256 (nspluginwrapper-i386-0.9.91.3-1.x86_64.rpm) = 47d8baf6dca9cb371758962671547dcd82086741f1fe8fbb64f34d002306cbe3
SIZE (nspluginwrapper-i386-0.9.91.3-1.x86_64.rpm) = 50757

View file

@ -0,0 +1,53 @@
--- ./configure.orig Sun Mar 4 23:01:22 2007
+++ ./configure Wed Apr 4 20:20:59 2007
@@ -6,13 +6,8 @@
PACKAGE=nspluginwrapper
# set temporary file name
-if test ! -z "$TMPDIR" ; then
- TMPDIR1="${TMPDIR}"
-elif test ! -z "$TEMPDIR" ; then
- TMPDIR1="${TEMPDIR}"
-else
- TMPDIR1="/tmp"
-fi
+mkdir -p tmp
+TMPDIR1="./tmp"
TMPC="${TMPDIR1}/npw-conf-${RANDOM}-$$-${RANDOM}.c"
TMPO="${TMPDIR1}/npw-conf-${RANDOM}-$$-${RANDOM}.o"
@@ -75,6 +70,9 @@
--prefix=*)
prefix=`echo $opt | cut -d '=' -f 2`
;;
+--x11=*)
+ x_base_dirs=`echo $opt | cut -d '=' -f 2`
+ ;;
--pkglibdir=*)
pkglibdir=`echo $opt | cut -d '=' -f 2`
;;
@@ -279,10 +277,12 @@
fi
# check for X11 base dir
-x_base_dirs='
-/usr
-/usr/X11R6
-/usr/local/X11R6'
+if test -z "$x_base_dirs"; then
+ x_base_dirs='
+ /usr
+ /usr/X11R6
+ /usr/local'
+fi
for dir in $x_base_dirs; do
x_include_dir="$dir/include"
if test -f $x_include_dir/X11/Intrinsic.h; then
@@ -407,6 +407,7 @@
echo " --target-os=OS build plugin support for target OS [$target_os]"
echo " --target-cpu=CPU build plugin support for target CPU [$target_cpu]"
echo " --with-viewer build viewer [$build_viewer]"
+echo " --x11=PREFIX path to X11 base"
echo ""
echo "Advanced options (experts only):"
echo " --source-path=PATH path of source code [$source_path]"

View file

@ -0,0 +1,11 @@
--- ./npapi/nspr/prcpucfg.h.orig Wed Apr 4 20:26:11 2007
+++ ./npapi/nspr/prcpucfg.h Wed Apr 4 20:27:40 2007
@@ -229,7 +229,7 @@
#define PR_BYTES_PER_WORD_LOG2 3
#define PR_BYTES_PER_DWORD_LOG2 3
-#elif defined(__x86_64__)
+#elif defined(__x86_64__) || defined(__amd64__)
#define IS_LITTLE_ENDIAN 1
#undef IS_BIG_ENDIAN

View file

@ -0,0 +1,13 @@
--- ./src/npw-config.c.orig Sun Mar 4 23:01:22 2007
+++ ./src/npw-config.c Wed Apr 4 20:20:59 2007
@@ -119,8 +119,8 @@
#if defined(__FreeBSD__)
{
static const char *freebsd_dirs[] = {
- "/usr/X11R6/" LIB "/browser_plugins",
- "/usr/X11R6/" LIB "/firefox/plugins",
+ "/usr/local/" LIB "/browser_plugins",
+ "/usr/local/" LIB "/firefox/plugins",
};
dirs = freebsd_dirs;
}

View file

@ -0,0 +1,10 @@
--- ./src/npw-wrapper.c.orig Sun Mar 4 23:01:22 2007
+++ ./src/npw-wrapper.c Wed Apr 4 20:20:59 2007
@@ -28,6 +28,7 @@
#include <unistd.h>
#include <pthread.h>
#include <semaphore.h>
+#include <signal.h>
#include <sys/wait.h>
#include <glib.h>

View file

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

View file

@ -0,0 +1,30 @@
================================================================
The nspluginwrapper is installed on a per user basis. All of
the commands can be run as an unprivileged user.
================================================================
To install all the plugins from their default locations:
nspluginwrapper -v -a -i
================================================================
To install a specific plugin:
nspluginwrapper -i path/to/plugin.so
================================================================
To remove a specific plugin:
nspluginwrapper -r path/to/plugin.so
================================================================
To view all currently installed plugins:
nspluginwrapper -l
================================================================

View file

@ -0,0 +1,14 @@
bin/nspluginwrapper
%%LIBDIR%%/%%ARCH%%/freebsd/npconfig
%%LIBDIR%%/%%ARCH%%/freebsd/npwrapper.so
%%LIBDIR%%/i386/linux/npviewer.bin
%%LIBDIR%%/i386/linux/npviewer
%%LIBDIR%%/i386/linux/libxpcom.so
%%LIBDIR%%/noarch/mkruntime
%%LIBDIR%%/noarch/npviewer
@dirrm %%LIBDIR%%/%%ARCH%%/freebsd
@dirrmtry %%LIBDIR%%/%%ARCH%%
@dirrm %%LIBDIR%%/i386/linux
@dirrmtry %%LIBDIR%%/i386
@dirrm %%LIBDIR%%/noarch
@dirrm %%LIBDIR%%

View file

@ -0,0 +1,58 @@
# New ports collection makefile for: nspluginwrapper
# Date created: 30 March 2007
# Whom: Dave Grochowski
#
# $FreeBSD$
#
PORTNAME= nspluginwrapper
PORTVERSION= 0.9.91.3
CATEGORIES= www linux emulators
MASTER_SITES= http://gwenole.beauchesne.info/projects/nspluginwrapper/files/
DISTFILES= ${DISTNAME}${EXTRACT_SUFX} ${RPMFILE}
EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
MAINTAINER= malus.x@gmail.com
COMMENT= A compatibility plugin for Netscape 4 (NPAPI) plugins
EXTRACT_DEPENDS= rpm2cpio:${PORTSDIR}/archivers/rpm
RPMFILE= ${PORTNAME}-i386-${PORTVERSION}-1.x86_64.rpm
ONLY_FOR_ARCHS= i386 amd64
USE_BZIP2= yes
USE_LINUX= yes
USE_XLIB= yes
USE_GNOME= glib20 gtk20 pkgconfig
CFLAGS+= -std=c99
USE_LDCONFIG= yes
USE_GMAKE= yes
HAS_CONFIGURE= yes
CONFIGURE_ARGS= --prefix=${PREFIX} --target-os=linux --target-cpu=i386 \
--x11=${X11BASE} --with-cc=${CC} --with-cxx=${CXX}
LIBDIR= ${PREFIX}/lib/${PORTNAME}
PLIST_SUB= LIBDIR="${LIBDIR:C/^${PREFIX}\///}" ARCH="${ARCH}"
# We must manually extract, modify, and install the Linux version of npviewer.
post-extract:
cd ${WRKSRC} && rpm2cpio ${DISTDIR}/${RPMFILE} | ${CPIO} -id
${REINPLACE_CMD} -e 's|/usr|${PREFIX}|' \
${WRKSRC}/usr/lib/nspluginwrapper/i386/linux/npviewer
${RM} ${WRKSRC}/usr/lib/nspluginwrapper/i386/linux/npviewer.bak
post-patch:
@${REINPLACE_CMD} -e 's,x86_64,amd64,g' ${WRKSRC}/configure
post-install:
${MKDIR} ${LIBDIR}/i386/linux
${INSTALL_SCRIPT} ${WRKSRC}/usr/lib/nspluginwrapper/i386/linux/* \
${LIBDIR}/i386/linux/
@${CAT} ${PKGMESSAGE}
.include <bsd.port.mk>

View file

@ -0,0 +1,6 @@
MD5 (nspluginwrapper-0.9.91.3.tar.bz2) = 0e047db84a979237fb28a9e8360890b0
SHA256 (nspluginwrapper-0.9.91.3.tar.bz2) = 3672dcf615f0a0c4a4bafc6e97cd134ad84ea402f916d0c3accff8e9a0aa6c8e
SIZE (nspluginwrapper-0.9.91.3.tar.bz2) = 257648
MD5 (nspluginwrapper-i386-0.9.91.3-1.x86_64.rpm) = 881bc1315d55c7e4879d8b9cd3e1077a
SHA256 (nspluginwrapper-i386-0.9.91.3-1.x86_64.rpm) = 47d8baf6dca9cb371758962671547dcd82086741f1fe8fbb64f34d002306cbe3
SIZE (nspluginwrapper-i386-0.9.91.3-1.x86_64.rpm) = 50757

View file

@ -0,0 +1,53 @@
--- ./configure.orig Sun Mar 4 23:01:22 2007
+++ ./configure Wed Apr 4 20:20:59 2007
@@ -6,13 +6,8 @@
PACKAGE=nspluginwrapper
# set temporary file name
-if test ! -z "$TMPDIR" ; then
- TMPDIR1="${TMPDIR}"
-elif test ! -z "$TEMPDIR" ; then
- TMPDIR1="${TEMPDIR}"
-else
- TMPDIR1="/tmp"
-fi
+mkdir -p tmp
+TMPDIR1="./tmp"
TMPC="${TMPDIR1}/npw-conf-${RANDOM}-$$-${RANDOM}.c"
TMPO="${TMPDIR1}/npw-conf-${RANDOM}-$$-${RANDOM}.o"
@@ -75,6 +70,9 @@
--prefix=*)
prefix=`echo $opt | cut -d '=' -f 2`
;;
+--x11=*)
+ x_base_dirs=`echo $opt | cut -d '=' -f 2`
+ ;;
--pkglibdir=*)
pkglibdir=`echo $opt | cut -d '=' -f 2`
;;
@@ -279,10 +277,12 @@
fi
# check for X11 base dir
-x_base_dirs='
-/usr
-/usr/X11R6
-/usr/local/X11R6'
+if test -z "$x_base_dirs"; then
+ x_base_dirs='
+ /usr
+ /usr/X11R6
+ /usr/local'
+fi
for dir in $x_base_dirs; do
x_include_dir="$dir/include"
if test -f $x_include_dir/X11/Intrinsic.h; then
@@ -407,6 +407,7 @@
echo " --target-os=OS build plugin support for target OS [$target_os]"
echo " --target-cpu=CPU build plugin support for target CPU [$target_cpu]"
echo " --with-viewer build viewer [$build_viewer]"
+echo " --x11=PREFIX path to X11 base"
echo ""
echo "Advanced options (experts only):"
echo " --source-path=PATH path of source code [$source_path]"

View file

@ -0,0 +1,11 @@
--- ./npapi/nspr/prcpucfg.h.orig Wed Apr 4 20:26:11 2007
+++ ./npapi/nspr/prcpucfg.h Wed Apr 4 20:27:40 2007
@@ -229,7 +229,7 @@
#define PR_BYTES_PER_WORD_LOG2 3
#define PR_BYTES_PER_DWORD_LOG2 3
-#elif defined(__x86_64__)
+#elif defined(__x86_64__) || defined(__amd64__)
#define IS_LITTLE_ENDIAN 1
#undef IS_BIG_ENDIAN

View file

@ -0,0 +1,13 @@
--- ./src/npw-config.c.orig Sun Mar 4 23:01:22 2007
+++ ./src/npw-config.c Wed Apr 4 20:20:59 2007
@@ -119,8 +119,8 @@
#if defined(__FreeBSD__)
{
static const char *freebsd_dirs[] = {
- "/usr/X11R6/" LIB "/browser_plugins",
- "/usr/X11R6/" LIB "/firefox/plugins",
+ "/usr/local/" LIB "/browser_plugins",
+ "/usr/local/" LIB "/firefox/plugins",
};
dirs = freebsd_dirs;
}

View file

@ -0,0 +1,10 @@
--- ./src/npw-wrapper.c.orig Sun Mar 4 23:01:22 2007
+++ ./src/npw-wrapper.c Wed Apr 4 20:20:59 2007
@@ -28,6 +28,7 @@
#include <unistd.h>
#include <pthread.h>
#include <semaphore.h>
+#include <signal.h>
#include <sys/wait.h>
#include <glib.h>

View file

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

View file

@ -0,0 +1,30 @@
================================================================
The nspluginwrapper is installed on a per user basis. All of
the commands can be run as an unprivileged user.
================================================================
To install all the plugins from their default locations:
nspluginwrapper -v -a -i
================================================================
To install a specific plugin:
nspluginwrapper -i path/to/plugin.so
================================================================
To remove a specific plugin:
nspluginwrapper -r path/to/plugin.so
================================================================
To view all currently installed plugins:
nspluginwrapper -l
================================================================

View file

@ -0,0 +1,14 @@
bin/nspluginwrapper
%%LIBDIR%%/%%ARCH%%/freebsd/npconfig
%%LIBDIR%%/%%ARCH%%/freebsd/npwrapper.so
%%LIBDIR%%/i386/linux/npviewer.bin
%%LIBDIR%%/i386/linux/npviewer
%%LIBDIR%%/i386/linux/libxpcom.so
%%LIBDIR%%/noarch/mkruntime
%%LIBDIR%%/noarch/npviewer
@dirrm %%LIBDIR%%/%%ARCH%%/freebsd
@dirrmtry %%LIBDIR%%/%%ARCH%%
@dirrm %%LIBDIR%%/i386/linux
@dirrmtry %%LIBDIR%%/i386
@dirrm %%LIBDIR%%/noarch
@dirrm %%LIBDIR%%