wok-4.x rev 11239
Add from wok-undigest: mplayerplug-in
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sun Nov 06 18:58:59 2011 +0100 (2011-11-06) |
parents | b818f163d451 |
children | 5d82e62b9b12 |
files | mplayerplug-in/receipt mplayerplug-in/stuff/mplayerplug-in-3.55-glibc210.u mplayerplug-in/stuff/mplayerplug-in-3.55-static-iid-accessor.u mplayerplug-in/stuff/slitaz-hack.h |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/mplayerplug-in/receipt Sun Nov 06 18:58:59 2011 +0100 1.3 @@ -0,0 +1,82 @@ 1.4 +# SliTaz package receipt. 1.5 + 1.6 +PACKAGE="mplayerplug-in" 1.7 +VERSION="3.55" 1.8 +CATEGORY="multimedia" 1.9 +SHORT_DESC="a browser plugin that uses mplayer to play videos from websites" 1.10 +MAINTAINER="jozee@slitaz.org" 1.11 +DEPENDS="mplayer xorg-libXpm gtk+ gcc-lib-base" 1.12 +BUILD_DEPENDS="mplayer gtk+-dev xorg-libXpm-dev firefox-dev libIDL gettext" 1.13 +TARBALL="$PACKAGE-$VERSION.tar.gz" 1.14 +WEB_SITE="http://mplayerplug-in.sourceforge.net/" 1.15 +WGET_URL="http://downloads.sourceforge.net/mplayerplug-in/$TARBALL" 1.16 +TAGS="player audio video browser" 1.17 + 1.18 +get_firefox_version() 1.19 +{ 1.20 + FIREFOX_VER=`cat $1/var/lib/tazpkg/installed/firefox/receipt | \ 1.21 + grep VERSION= | cut -d \" -f 2` 1.22 +} 1.23 + 1.24 +# Rules to configure and make the package. 1.25 +compile_rules() 1.26 +{ 1.27 + cd $src 1.28 + sed -i 's/npupp\.h/npfunctions.h/' */np* 1.29 + cp $stuff/slitaz-hack.h include 1.30 + grep -q slitaz-hack include/npplat.h || sed -i \ 1.31 + 's/ne _NPPLAT_H_/ne _NPPLAT_H_\n#include "slitaz-hack.h"/' \ 1.32 + include/npplat.h 1.33 + while read file; do 1.34 + [ -f done.$file ] && continue 1.35 + echo "Apply $file..." 1.36 + patch -p1 < $stuff/$PACKAGE-$VERSION-$file || return 1 1.37 + touch done.$file 1.38 + done <<EOT 1.39 +glibc210.u 1.40 +static-iid-accessor.u 1.41 +EOT 1.42 + make distclean 1.43 + touch install.sh 1.44 + get_firefox_version 1.45 + ./configure --prefix=/usr --sysconfdir=/etc \ 1.46 + --enable-gtk2 \ 1.47 + --enable-wmp \ 1.48 + --enable-qt \ 1.49 + --enable-rm \ 1.50 + --enable-dvx \ 1.51 + MOZILLA_HOME="/usr/lib/firefox-$FIREFOX_VER" \ 1.52 + GECKO_IDLDIR="/usr/share/idl/firefox-$FIREFOX_VER" && 1.53 + make -j 4 && 1.54 + make DESTDIR=$DESTDIR install 1.55 +} 1.56 + 1.57 +genpkg_rules() 1.58 +{ 1.59 + mkdir -p $fs/usr/lib 1.60 + cp -a $_pkg/etc $fs 1.61 + cp -a $_pkg/usr/lib/mozilla $fs/usr/lib 1.62 + # change the default video output to xv,x11 1.63 + sed -i "s/#vo=xv,x11/vo=xv,x11/" $fs/etc/$PACKAGE.conf 1.64 + 1.65 +} 1.66 + 1.67 +post_install() 1.68 +{ 1.69 + echo -n "Processing post install commands..." 1.70 + local root 1.71 + root=$1 1.72 + get_firefox_version $1 1.73 + for i in $root/usr/lib/mozilla/plugins/$PACKAGE*.so ; do 1.74 + ln -s $i $root/usr/lib/firefox-$FIREFOX_VER/plugins 1.75 + done 1.76 + status 1.77 +} 1.78 + 1.79 +post_remove() 1.80 +{ 1.81 + echo -n "Processing post remove commands..." 1.82 + rm -f /usr/lib/firefox*/plugins/$PACKAGE*.so 1.83 + status 1.84 +} 1.85 +
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/mplayerplug-in/stuff/mplayerplug-in-3.55-glibc210.u Sun Nov 06 18:58:59 2011 +0100 2.3 @@ -0,0 +1,63 @@ 2.4 +--- mplayerplug-in-3.55/Source/plugin-list.cpp 2.5 ++++ mplayerplug-in-3.55/Source/plugin-list.cpp 2.6 +@@ -132,9 +132,9 @@ void insert_area(Node * parent, char *ta 2.7 + 2.8 + void find_area_tags(const char *smilbuffer, Node * parent) 2.9 + { 2.10 +- char *startarea; 2.11 +- char *endvideo; 2.12 +- char *start; 2.13 ++ const char *startarea; 2.14 ++ const char *endvideo; 2.15 ++ const char *start; 2.16 + 2.17 + int tagtime = 0; 2.18 + char tagtarget[128]; 2.19 +--- mplayerplug-in-3.55/Source/plugin-setup.h 2.20 ++++ mplayerplug-in-3.55/Source/plugin-setup.h 2.21 +@@ -174,7 +174,7 @@ char *getURLHostname(char *url); 2.22 + char *getURLFilename(const char *url); 2.23 + int isMms(char *url, int nomediacache); 2.24 + void mmsToHttp(char *dest, char *src); 2.25 +-int sendCommand(nsPluginInstance * instance, char *command); 2.26 ++int sendCommand(nsPluginInstance * instance, const char *command); 2.27 + int URLcmp(const char *url1, const char *url2); 2.28 + extern void remove_quotes(char *url); 2.29 + void killmplayer(nsPluginInstance * instance); 2.30 +--- mplayerplug-in-3.55/Source/plugin-support.cpp 2.31 ++++ mplayerplug-in-3.55/Source/plugin-support.cpp 2.32 +@@ -109,7 +109,7 @@ char *getURLFilename(const char *url) 2.33 + { 2.34 + 2.35 + char *filename; 2.36 +- char *tmp; 2.37 ++ const char *tmp; 2.38 + int len; 2.39 + 2.40 + if (DEBUG > 1) 2.41 +@@ -454,7 +454,7 @@ void remove_quotes(char *url) 2.42 + // in cleanup routines (like destroyCB and shut), when we know that 2.43 + // the player thread is not running, it is safe to call without locking 2.44 + 2.45 +-int sendCommand(nsPluginInstance * instance, char *command) 2.46 ++int sendCommand(nsPluginInstance * instance, const char *command) 2.47 + { 2.48 + int retval; 2.49 + char buffer[1024]; 2.50 + 2.51 +--- mplayerplug-in-3.55/Source/plugin-ui.cpp Thu Jun 12 14:18:01 2008 2.52 ++++ mplayerplug-in-3.55/Source/plugin-ui.cpp Fri Jun 12 14:25:35 2009 2.53 +@@ -283,12 +283,7 @@ 2.54 + int term, chop; 2.55 + int PercentRedraw; 2.56 + 2.57 +- if (0) { 2.58 +- printf("Widget: %p\n", w); 2.59 +- printf("Message: %s\n", message); 2.60 +- } 2.61 +- 2.62 +- if (DEBUG > 1) 2.63 ++ if (DEBUG > 1) 2.64 + printf("state = %i, height = %i width = %i\n", instance->state, 2.65 + instance->movie_height, instance->movie_width); 2.66 +
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 3.2 +++ b/mplayerplug-in/stuff/mplayerplug-in-3.55-static-iid-accessor.u Sun Nov 06 18:58:59 2011 +0100 3.3 @@ -0,0 +1,38 @@ 3.4 +--- mplayerplug-in-3.55/Source/nsIScriptableMplayerPlugin.h 3.5 ++++ mplayerplug-in-3.55/Source/nsIScriptableMplayerPlugin.h 3.6 +@@ -25,7 +25,7 @@ 3.7 + class NS_NO_VTABLE nsIScriptableWMPPlugin : public nsISupports { 3.8 + public: 3.9 + 3.10 +- NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISCRIPTABLEWMPPLUGIN_IID) 3.11 ++ NS_DECLARE_STATIC_IID_ACCESSOR(NS_ISCRIPTABLEWMPPLUGIN_IID) 3.12 + 3.13 + /* void play (); */ 3.14 + NS_IMETHOD Play(void) = 0; 3.15 +@@ -38,6 +38,8 @@ 3.16 + 3.17 + }; 3.18 + 3.19 ++NS_DEFINE_STATIC_IID_ACCESSOR(nsIScriptableWMPPlugin, NS_ISCRIPTABLEWMPPLUGIN_IID) 3.20 ++ 3.21 + /* Use this macro when declaring classes that implement this interface. */ 3.22 + #define NS_DECL_NSISCRIPTABLEWMPPLUGIN \ 3.23 + NS_IMETHOD Play(void); \ 3.24 +@@ -120,7 +122,7 @@ 3.25 + class NS_NO_VTABLE nsIScriptableMplayerPlugin : public nsISupports { 3.26 + public: 3.27 + 3.28 +- NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISCRIPTABLEMPLAYERPLUGIN_IID) 3.29 ++ NS_DECLARE_STATIC_IID_ACCESSOR(NS_ISCRIPTABLEMPLAYERPLUGIN_IID) 3.30 + 3.31 + /* void Play (); */ 3.32 + NS_IMETHOD Play(void) = 0; 3.33 +@@ -249,6 +251,8 @@ 3.34 + 3.35 + }; 3.36 + 3.37 ++NS_DEFINE_STATIC_IID_ACCESSOR(nsIScriptableMplayerPlugin, NS_ISCRIPTABLEMPLAYERPLUGIN_IID) 3.38 ++ 3.39 + /* Use this macro when declaring classes that implement this interface. */ 3.40 + #define NS_DECL_NSISCRIPTABLEMPLAYERPLUGIN \ 3.41 + NS_IMETHOD Play(void); \
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 4.2 +++ b/mplayerplug-in/stuff/slitaz-hack.h Sun Nov 06 18:58:59 2011 +0100 4.3 @@ -0,0 +1,28 @@ 4.4 +#define int16 int16_t 4.5 +#define uint16 uint16_t 4.6 +#define int32 int32_t 4.7 +#define uint32 uint32_t 4.8 + 4.9 +#define CallNPN_GetURLNotifyProc(FUNC, ARG1, ARG2, ARG3, ARG4) (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4)) 4.10 +#define CallNPN_GetURLProc(FUNC, ARG1, ARG2, ARG3) (*(FUNC))((ARG1), (ARG2), (ARG3)) 4.11 +#define CallNPN_PostURLNotifyProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6, ARG7) (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4), (ARG5), (ARG6), (ARG7)) 4.12 +#define CallNPN_PostURLProc(FUNC, ARG1, ARG2, ARG3, ARG4, ARG5, ARG6) (*(FUNC))((ARG1), (ARG2), (ARG3), (ARG4), (ARG5), (ARG6)) 4.13 +#define CallNPN_RequestReadProc(FUNC, stream, range) (*(FUNC))((stream), (range)) 4.14 +#define CallNPN_NewStreamProc(FUNC, npp, type, window, stream) (*(FUNC))((npp), (type), (window), (stream)) 4.15 +#define CallNPN_WriteProc(FUNC, npp, stream, len, buffer) (*(FUNC))((npp), (stream), (len), (buffer)) 4.16 +#define CallNPN_DestroyStreamProc(FUNC, npp, stream, reason) (*(FUNC))((npp), (stream), (reason)) 4.17 +#define CallNPN_StatusProc(FUNC, npp, msg) (*(FUNC))((npp), (msg)) 4.18 +#define CallNPN_UserAgentProc(FUNC, ARG1) (*(FUNC))((ARG1)) 4.19 +#define CallNPN_MemAllocProc(FUNC, ARG1) (*(FUNC))((ARG1)) 4.20 +#define CallNPN_MemFreeProc(FUNC, ARG1) (*(FUNC))((ARG1)) 4.21 +#define CallNPN_MemFlushProc(FUNC, ARG1) (*(FUNC))((ARG1)) 4.22 +#define CallNPN_ReloadPluginsProc(FUNC, ARG1) (*(FUNC))((ARG1)) 4.23 +#define CallNPN_GetValueProc(FUNC, ARG1, ARG2, ARG3) (*(FUNC))((ARG1), (ARG2), (ARG3)) 4.24 +#define CallNPN_SetValueProc(FUNC, ARG1, ARG2, ARG3) (*(FUNC))((ARG1), (ARG2), (ARG3)) 4.25 +#define CallNPN_InvalidateRectProc(FUNC, ARG1, ARG2) (*(FUNC))((ARG1), (ARG2)) 4.26 +#define CallNPN_InvalidateRegionProc(FUNC, ARG1, ARG2) (*(FUNC))((ARG1), (ARG2)) 4.27 +#define CallNPN_ForceRedrawProc(FUNC, ARG1) (*(FUNC))((ARG1)) 4.28 + 4.29 +#include <stdlib.h> 4.30 +#include <assert.h> 4.31 +