[Midnightbsd-cvs] mports: mports/www: add nspluginwrappr
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Tue Oct 30 21:55:41 EDT 2007
Log Message:
-----------
add nspluginwrappr
Modified Files:
--------------
mports/www:
Makefile (r1.61 -> r1.62)
Added Files:
-----------
mports/www/nspluginwrapper:
Makefile (r1.1)
distinfo (r1.1)
pkg-descr (r1.1)
pkg-message (r1.1)
pkg-plist (r1.1)
mports/www/nspluginwrapper/files:
patch-configure (r1.1)
patch-npapi_nspr_prcpucfg.h (r1.1)
patch-src-npw-config.c (r1.1)
patch-src-npw-wrapper.c (r1.1)
-------------- next part --------------
Index: Makefile
===================================================================
RCS file: /home/cvs/mports/www/Makefile,v
retrieving revision 1.61
retrieving revision 1.62
diff -Lwww/Makefile -Lwww/Makefile -u -r1.61 -r1.62
--- www/Makefile
+++ www/Makefile
@@ -41,6 +41,7 @@
SUBDIR += man2web
SUBDIR += mod_perl2
SUBDIR += neon
+ SUBDIR += nspluginwrapper
SUBDIR += opera
SUBDIR += p5-CGI.pm
SUBDIR += p5-HTML-Breadcrumbs
--- /dev/null
+++ www/nspluginwrapper/pkg-message
@@ -0,0 +1,24 @@
+
+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
+
--- /dev/null
+++ www/nspluginwrapper/pkg-descr
@@ -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/
--- /dev/null
+++ www/nspluginwrapper/pkg-plist
@@ -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
+ at dirrm %%LIBDIR%%/%%ARCH%%/freebsd
+ at dirrmtry %%LIBDIR%%/%%ARCH%%
+ at dirrm %%LIBDIR%%/i386/linux
+ at dirrmtry %%LIBDIR%%/i386
+ at dirrm %%LIBDIR%%/noarch
+ at dirrm %%LIBDIR%%
--- /dev/null
+++ www/nspluginwrapper/Makefile
@@ -0,0 +1,66 @@
+# New ports collection makefile for: nspluginwrapper
+# Date created: 30 Oct 2007
+# Whom: Lucas Holt <luke at MidnightBSD.org>
+#
+# $MidnightBSD: mports/www/nspluginwrapper/Makefile,v 1.1 2007/10/31 01:55:38 laffer1 Exp $
+# $FreeBSD: ports/www/nspluginwrapper/Makefile,v 1.5 2007/09/01 23:15:12 pav Exp $
+#
+
+PORTNAME= nspluginwrapper
+PORTVERSION= 0.9.91.5
+CATEGORIES= www linux emulators
+MASTER_SITES= http://gwenole.beauchesne.info/projects/nspluginwrapper/files/
+DISTFILES= ${DISTNAME}${EXTRACT_SUFX} ${RPMFILE}
+EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
+
+MAINTAINER= ports at MidnightBSD.org
+COMMENT= A compatibility plugin for Netscape 4 (NPAPI) plugins
+
+EXTRACT_DEPENDS= rpm2cpio:${PORTSDIR}/archivers/rpm
+RUN_DEPENDS= ${LINUXBASE}/usr/lib/libgtk-x11-2.0.so.0:${PORTSDIR}/x11-toolkits/linux-gtk2
+
+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 pkgconfig
+
+CFLAGS+= -std=c99
+
+USE_LDCONFIG= yes
+USE_GMAKE= yes
+HAS_CONFIGURE= yes
+
+CONFIGURE_ARGS= --prefix=${PREFIX} --target-os=linux --target-cpu=i386 \
+ --with-x11-prefix=${X11BASE} --with-cc=${CC} --with-cxx=${CXX} \
+ --host=${ARCH}-portbld-freebsd6.0
+
+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
+ @${REINPLACE_CMD} -e 's,/usr/X11R6,${X11BASE},g' ${WRKSRC}/configure
+
+post-install:
+ ${MKDIR} ${LIBDIR}/i386/linux
+ ${INSTALL_SCRIPT} ${WRKSRC}/usr/lib/nspluginwrapper/i386/linux/* \
+ ${LIBDIR}/i386/linux/
+
+.include <bsd.port.pre.mk>
+
+BUILD_DEPENDS+= ${X11BASE}/libdata/xorg/libraries:${X_LIBRARIES_PORT}
+RUN_DEPENDS+= ${X11BASE}/libdata/xorg/libraries:${X_LIBRARIES_PORT}
+
+.include <bsd.port.post.mk>
--- /dev/null
+++ www/nspluginwrapper/distinfo
@@ -0,0 +1,6 @@
+MD5 (nspluginwrapper-0.9.91.5.tar.bz2) = 052e5fecc36a087d1f7200bd1e44f2f0
+SHA256 (nspluginwrapper-0.9.91.5.tar.bz2) = c1262aff6b223e3d92d422cb814106a07eafbad3f5df645c27af7988e93e6b60
+SIZE (nspluginwrapper-0.9.91.5.tar.bz2) = 273331
+MD5 (nspluginwrapper-i386-0.9.91.5-1.x86_64.rpm) = d2327fae81570e0c3f1df2af4439b776
+SHA256 (nspluginwrapper-i386-0.9.91.5-1.x86_64.rpm) = 8b3b14d1970a15b8890f3db5df273076f79d212c79baf2a07315a1754d8f6e7a
+SIZE (nspluginwrapper-i386-0.9.91.5-1.x86_64.rpm) = 52386
--- /dev/null
+++ www/nspluginwrapper/files/patch-src-npw-config.c
@@ -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;
+ }
--- /dev/null
+++ www/nspluginwrapper/files/patch-src-npw-wrapper.c
@@ -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>
--- /dev/null
+++ www/nspluginwrapper/files/patch-configure
@@ -0,0 +1,94 @@
+--- configure.orig Mon Aug 20 16:44:59 2007
++++ configure Tue Oct 30 21:48:26 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"
+@@ -52,8 +47,8 @@
+ sparc64)
+ host_cpu="sparc64"
+ ;;
+-x86_64|amd64)
+- host_cpu="x86_64"
++amd64|amd64)
++ host_cpu="amd64"
+ ;;
+ *)
+ host_cpu="unknown"
+@@ -131,7 +126,7 @@
+ # check for biarch build
+ if test "$biarch" = "guess"; then
+ case $host_cpu:$target_cpu in
+- x86_64:i386 | ppc64:ppc)
++ amd64:i386 | ppc64:ppc)
+ biarch="yes"
+ ;;
+ *)
+@@ -170,7 +165,7 @@
+ ;;
+ esac
+ case $host_cpu:$nspluginwrapper_64bit_output in
+- ppc64:yes | s390x:yes | sparc64:yes | x86_64:yes)
++ ppc64:yes | s390x:yes | sparc64:yes | amd64:yes)
+ lib64="lib64"
+ ;;
+ *)
+@@ -325,7 +320,7 @@
+ if test -z "$x_base_dirs"; then
+ x_base_dirs="
+ /usr
+- /usr/X11R6
++ /usr/local
+ /usr/local/X11R6
+ $prefix
+ "
+@@ -516,6 +511,10 @@
+ echo "OS=freebsd" >> $config_mak
+ echo "#define HOST_FREEBSD 1" >> $config_h
+ echo "#define HOST_OS \"freebsd\"" >> $config_h
++elif test "$host_os" = "midnightbsd"; then
++ echo "OS=freebsd" >> $config_mak
++ echo "#define HOST_FREEBSD 1" >> $config_h
++ echo "#define HOST_OS \"freebsd\"" >> $config_h
+ elif test "$host_os" = "netbsd"; then
+ echo "OS=netbsd" >> $config_mak
+ echo "#define HOST_NETBSD 1" >> $config_h
+@@ -528,10 +527,10 @@
+ echo "ARCH=i386" >> $config_mak
+ echo "#define HOST_I386 1" >> $config_h
+ echo "#define HOST_ARCH \"i386\"" >> $config_h
+-elif test "$host_cpu" = "x86_64" ; then
+- echo "ARCH=x86_64" >> $config_mak
++elif test "$host_cpu" = "amd64" ; then
++ echo "ARCH=amd64" >> $config_mak
+ echo "#define HOST_X86_64 1" >> $config_h
+- echo "#define HOST_ARCH \"x86_64\"" >> $config_h
++ echo "#define HOST_ARCH \"amd64\"" >> $config_h
+ elif test "$host_cpu" = "ppc" ; then
+ echo "ARCH=ppc" >> $config_mak
+ echo "#define HOST_PPC 1" >> $config_h
+@@ -647,9 +646,9 @@
+ echo "TARGET_ARCH=i386" >> $config_mak
+ echo "#define TARGET_ARCH \"i386\"" >> $config_h
+ echo "#define TARGET_I386 1" >> $config_h
+-elif test "$target_cpu" = "x86_64" ; then
+- echo "TARGET_ARCH=x86_64" >> $config_mak
+- echo "#define TARGET_ARCH \"x86_64\"" >> $config_h
++elif test "$target_cpu" = "amd64" ; then
++ echo "TARGET_ARCH=amd64" >> $config_mak
++ echo "#define TARGET_ARCH \"amd64\"" >> $config_h
+ echo "#define TARGET_X86_64 1" >> $config_h
+ elif test "$target_cpu" = "ppc" ; then
+ echo "TARGET_ARCH=ppc" >> $config_mak
--- /dev/null
+++ www/nspluginwrapper/files/patch-npapi_nspr_prcpucfg.h
@@ -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
More information about the Midnightbsd-cvs
mailing list