diff options
author | Parabola <dev@list.parabolagnulinux.org> | 2011-04-05 14:26:38 +0000 |
---|---|---|
committer | Parabola <dev@list.parabolagnulinux.org> | 2011-04-05 14:26:38 +0000 |
commit | 415856bdd4f48ab4f2732996f0bae58595092bbe (patch) | |
tree | ede2018b591f6dfb477fe9341ba17b9bc000fab9 /multilib/nspluginwrapper |
Tue Apr 5 14:26:38 UTC 2011
Diffstat (limited to 'multilib/nspluginwrapper')
4 files changed, 247 insertions, 0 deletions
diff --git a/multilib/nspluginwrapper/PKGBUILD b/multilib/nspluginwrapper/PKGBUILD new file mode 100644 index 000000000..250d70829 --- /dev/null +++ b/multilib/nspluginwrapper/PKGBUILD @@ -0,0 +1,42 @@ +# $Id: PKGBUILD 26767 2010-09-15 23:06:22Z bluewind $ +# Maintainer: Thomas Bächler <thomas@archlinux.org> +pkgname=nspluginwrapper +pkgver=1.3.0 +pkgrel=4 +pkgdesc="Cross-platform NPAPI compatible plugin viewer" +arch=('x86_64') +url="http://freshmeat.net/projects/nspluginwrapper/" +license=('GPL') +depends=('curl' 'lib32-libxt' 'lib32-gcc-libs' 'gtk2' 'lib32-gtk2') +makedepends=('gcc-multilib') +source=(ftp://ftp.archlinux.org/other/nspluginwrapper/$pkgname-$pkgver.tar.gz + npw-viewer.c.patch + nspluginwrapper-20090625-fix-npident-array-sending.patch + nspluginwrapper-native-windows.patch) +sha256sums=('0af7e2ae4c6258d5c17addbcc4658b84c979860da843873f0d15d90ee9a8259d' + '4b216cca327ae76e6e2ab6dc6bbaf3efe1123c63a09b0e7e45c964531fcbdeb0' + '8bb55b845017b60912c62c4abadc50a3f0397ddf470599b8453b97d9e69f8cd5' + '3796b66f53448f4668e70aec97a3d74db2b2fcd308b36f87373405547cae38b1') +build() { + cd "$srcdir/$pkgname-$pkgver" + + # Fix build + patch -p1 -i "$srcdir/npw-viewer.c.patch" + # See http://web.archiveorange.com/archive/v/tptsHOJYbGKIfNFz9xHz + patch -p0 -i "$srcdir/nspluginwrapper-20090625-fix-npident-array-sending.patch" + # Patch taken from the openSuSE src.rpm + patch -p0 -i "$srcdir/nspluginwrapper-native-windows.patch" + + ./configure --with-lib32=lib32 --with-lib64=lib + make +} + +package() { + cd "$srcdir/$pkgname-$pkgver" + + make -j1 DESTDIR="$pkgdir/" install + mkdir -p "$pkgdir"/usr/lib/mozilla/plugins/ + ln -s /usr/lib/nspluginwrapper/x86_64/linux/npwrapper.so "$pkgdir"/usr/lib/mozilla/plugins/ +} + +# vim:set ts=2 sw=2 et: diff --git a/multilib/nspluginwrapper/npw-viewer.c.patch b/multilib/nspluginwrapper/npw-viewer.c.patch new file mode 100644 index 000000000..a213003fd --- /dev/null +++ b/multilib/nspluginwrapper/npw-viewer.c.patch @@ -0,0 +1,13 @@ +diff -Nur nspluginwrapper-1.3.0.orig//src/npw-viewer.c nspluginwrapper-1.3.0//src/npw-viewer.c +--- nspluginwrapper-1.3.0.orig//src/npw-viewer.c 2009-01-02 15:22:29.000000000 +0100 ++++ nspluginwrapper-1.3.0//src/npw-viewer.c 2010-08-26 18:46:50.574976221 +0200 +@@ -4187,7 +4187,8 @@ + #define high_offset offsetof(struct _XtAppStruct, __maybe__input_max) + #define n_offsets_max (high_offset - low_offset)/2 + int i, ofs, n_offsets = 0; +- int offsets[n_offsets_max] = { 0, }; ++ int offsets[n_offsets_max]; ++ offsets[0] = 0; + + #define n_inputs_max 4 /* number of refinements/input sources */ + int fd, id, n_inputs = 0; diff --git a/multilib/nspluginwrapper/nspluginwrapper-20090625-fix-npident-array-sending.patch b/multilib/nspluginwrapper/nspluginwrapper-20090625-fix-npident-array-sending.patch new file mode 100644 index 000000000..568a4ea1f --- /dev/null +++ b/multilib/nspluginwrapper/nspluginwrapper-20090625-fix-npident-array-sending.patch @@ -0,0 +1,178 @@ +Index: src/npw-viewer.c +=================================================================== +--- src/npw-viewer.c (revision 942) ++++ src/npw-viewer.c (working copy) +@@ -2059,7 +2059,7 @@ + RPC_METHOD_NPN_INVOKE, + RPC_TYPE_NPW_PLUGIN_INSTANCE, plugin, + RPC_TYPE_NP_OBJECT, npobj, +- RPC_TYPE_NP_IDENTIFIER, methodName, ++ RPC_TYPE_NP_IDENTIFIER, &methodName, + RPC_TYPE_ARRAY, RPC_TYPE_NP_VARIANT, argCount, args, + RPC_TYPE_INVALID); + +@@ -2249,7 +2249,7 @@ + RPC_METHOD_NPN_GET_PROPERTY, + RPC_TYPE_NPW_PLUGIN_INSTANCE, plugin, + RPC_TYPE_NP_OBJECT, npobj, +- RPC_TYPE_NP_IDENTIFIER, propertyName, ++ RPC_TYPE_NP_IDENTIFIER, &propertyName, + RPC_TYPE_INVALID); + + if (error != RPC_ERROR_NO_ERROR) { +@@ -2311,7 +2311,7 @@ + RPC_METHOD_NPN_SET_PROPERTY, + RPC_TYPE_NPW_PLUGIN_INSTANCE, plugin, + RPC_TYPE_NP_OBJECT, npobj, +- RPC_TYPE_NP_IDENTIFIER, propertyName, ++ RPC_TYPE_NP_IDENTIFIER, &propertyName, + RPC_TYPE_NP_VARIANT, value, + RPC_TYPE_INVALID); + +@@ -2370,7 +2370,7 @@ + RPC_METHOD_NPN_REMOVE_PROPERTY, + RPC_TYPE_NPW_PLUGIN_INSTANCE, plugin, + RPC_TYPE_NP_OBJECT, npobj, +- RPC_TYPE_NP_IDENTIFIER, propertyName, ++ RPC_TYPE_NP_IDENTIFIER, &propertyName, + RPC_TYPE_INVALID); + + if (error != RPC_ERROR_NO_ERROR) { +@@ -2427,7 +2427,7 @@ + RPC_METHOD_NPN_HAS_PROPERTY, + RPC_TYPE_NPW_PLUGIN_INSTANCE, plugin, + RPC_TYPE_NP_OBJECT, npobj, +- RPC_TYPE_NP_IDENTIFIER, propertyName, ++ RPC_TYPE_NP_IDENTIFIER, &propertyName, + RPC_TYPE_INVALID); + + if (error != RPC_ERROR_NO_ERROR) { +@@ -2484,7 +2484,7 @@ + RPC_METHOD_NPN_HAS_METHOD, + RPC_TYPE_NPW_PLUGIN_INSTANCE, plugin, + RPC_TYPE_NP_OBJECT, npobj, +- RPC_TYPE_NP_IDENTIFIER, methodName, ++ RPC_TYPE_NP_IDENTIFIER, &methodName, + RPC_TYPE_INVALID); + + if (error != RPC_ERROR_NO_ERROR) { +@@ -2780,7 +2780,7 @@ + + int error = rpc_method_invoke(g_rpc_connection, + RPC_METHOD_NPN_IDENTIFIER_IS_STRING, +- RPC_TYPE_NP_IDENTIFIER, identifier, ++ RPC_TYPE_NP_IDENTIFIER, &identifier, + RPC_TYPE_INVALID); + + if (error != RPC_ERROR_NO_ERROR) { +@@ -2838,7 +2838,7 @@ + + int error = rpc_method_invoke(g_rpc_connection, + RPC_METHOD_NPN_UTF8_FROM_IDENTIFIER, +- RPC_TYPE_NP_IDENTIFIER, identifier, ++ RPC_TYPE_NP_IDENTIFIER, &identifier, + RPC_TYPE_INVALID); + + if (error != RPC_ERROR_NO_ERROR) { +@@ -2902,7 +2902,7 @@ + + int error = rpc_method_invoke(g_rpc_connection, + RPC_METHOD_NPN_INT_FROM_IDENTIFIER, +- RPC_TYPE_NP_IDENTIFIER, identifier, ++ RPC_TYPE_NP_IDENTIFIER, &identifier, + RPC_TYPE_INVALID); + + if (error != RPC_ERROR_NO_ERROR) { +Index: src/npw-wrapper.c +=================================================================== +--- src/npw-wrapper.c (revision 942) ++++ src/npw-wrapper.c (working copy) +@@ -1528,7 +1528,7 @@ + free(name); + + return rpc_method_send_reply(connection, +- RPC_TYPE_NP_IDENTIFIER, ident, ++ RPC_TYPE_NP_IDENTIFIER, &ident, + RPC_TYPE_INVALID); + } + +@@ -1601,7 +1601,7 @@ + NPIdentifier ident = g_NPN_GetIntIdentifier(intid); + + return rpc_method_send_reply(connection, +- RPC_TYPE_NP_IDENTIFIER, ident, ++ RPC_TYPE_NP_IDENTIFIER, &ident, + RPC_TYPE_INVALID); + } + +Index: src/npruntime.c +=================================================================== +--- src/npruntime.c (revision 942) ++++ src/npruntime.c (working copy) +@@ -221,7 +221,7 @@ + int error = rpc_method_invoke(g_rpc_connection, + RPC_METHOD_NPCLASS_HAS_METHOD, + RPC_TYPE_NP_OBJECT, npobj, +- RPC_TYPE_NP_IDENTIFIER, name, ++ RPC_TYPE_NP_IDENTIFIER, &name, + RPC_TYPE_INVALID); + + if (error != RPC_ERROR_NO_ERROR) { +@@ -327,7 +327,7 @@ + int error = rpc_method_invoke(g_rpc_connection, + RPC_METHOD_NPCLASS_INVOKE, + RPC_TYPE_NP_OBJECT, npobj, +- RPC_TYPE_NP_IDENTIFIER, name, ++ RPC_TYPE_NP_IDENTIFIER, &name, + RPC_TYPE_ARRAY, RPC_TYPE_NP_VARIANT, argCount, args, + RPC_TYPE_INVALID); + +@@ -509,7 +509,7 @@ + int error = rpc_method_invoke(g_rpc_connection, + RPC_METHOD_NPCLASS_HAS_PROPERTY, + RPC_TYPE_NP_OBJECT, npobj, +- RPC_TYPE_NP_IDENTIFIER, name, ++ RPC_TYPE_NP_IDENTIFIER, &name, + RPC_TYPE_INVALID); + + if (error != RPC_ERROR_NO_ERROR) { +@@ -599,7 +599,7 @@ + int error = rpc_method_invoke(g_rpc_connection, + RPC_METHOD_NPCLASS_GET_PROPERTY, + RPC_TYPE_NP_OBJECT, npobj, +- RPC_TYPE_NP_IDENTIFIER, name, ++ RPC_TYPE_NP_IDENTIFIER, &name, + RPC_TYPE_INVALID); + + if (error != RPC_ERROR_NO_ERROR) { +@@ -684,7 +684,7 @@ + int error = rpc_method_invoke(g_rpc_connection, + RPC_METHOD_NPCLASS_SET_PROPERTY, + RPC_TYPE_NP_OBJECT, npobj, +- RPC_TYPE_NP_IDENTIFIER, name, ++ RPC_TYPE_NP_IDENTIFIER, &name, + RPC_TYPE_NP_VARIANT, value, + RPC_TYPE_INVALID); + +@@ -763,7 +763,7 @@ + int error = rpc_method_invoke(g_rpc_connection, + RPC_METHOD_NPCLASS_REMOVE_PROPERTY, + RPC_TYPE_NP_OBJECT, npobj, +- RPC_TYPE_NP_IDENTIFIER, name, ++ RPC_TYPE_NP_IDENTIFIER, &name, + RPC_TYPE_INVALID); + + if (error != RPC_ERROR_NO_ERROR) { +Index: src/npw-rpc.c +=================================================================== +--- src/npw-rpc.c (revision 942) ++++ src/npw-rpc.c (working copy) +@@ -1252,7 +1252,7 @@ + // the browser side + static int do_send_NPIdentifier(rpc_message_t *message, void *p_value) + { +- NPIdentifier ident = (NPIdentifier)p_value; ++ NPIdentifier ident = *(NPIdentifier *)p_value; + int id = 0; + if (ident) { + #ifdef BUILD_WRAPPER diff --git a/multilib/nspluginwrapper/nspluginwrapper-native-windows.patch b/multilib/nspluginwrapper/nspluginwrapper-native-windows.patch new file mode 100644 index 000000000..0f6eba68e --- /dev/null +++ b/multilib/nspluginwrapper/nspluginwrapper-native-windows.patch @@ -0,0 +1,14 @@ +--- src/npw-viewer.sh ++++ src/npw-viewer.sh +@@ -5,6 +5,11 @@ + OS="`uname -s | tr '[A-Z]' '[a-z]'`" + ARCH="`uname -m`" + ++# Adobe Flash can be confised by by a recent GTK+ that may use custom ++# window structure instead of native X Window. Revert to the old dumb ++# behavior and use native X window for all objects. (bnc#537788) ++export GDK_NATIVE_WINDOWS=1 ++ + if test -z "$TARGET_OS"; then + echo "*** NSPlugin Viewer *** error, TARGET_OS not initialized" + exit 1 |