wok rev 3410

Fix mplayerplug-in compile with gcc44 and glibc210
author Rohit Joshi <jozee@slitaz.org>
date Fri Jun 12 17:28:25 2009 +0000 (2009-06-12)
parents 24ae58a42508
children 23858f368eeb
files mplayerplug-in/receipt mplayerplug-in/stuff/mplayerplug-in-3.55-glibc210.u
line diff
     1.1 --- a/mplayerplug-in/receipt	Fri Jun 12 17:26:10 2009 +0000
     1.2 +++ b/mplayerplug-in/receipt	Fri Jun 12 17:28:25 2009 +0000
     1.3 @@ -6,18 +6,30 @@
     1.4  CATEGORY="multimedia"
     1.5  SHORT_DESC="a browser plugin that uses mplayer to play videos from websites"
     1.6  MAINTAINER="jozee@slitaz.org"
     1.7 -DEPENDS="mplayer xorg-libXpm gtk+"
     1.8 -BUILD_DEPENDS="mplayer gtk+-dev xorg-libXpm-dev firefox-dev"
     1.9 +DEPENDS="mplayer-svn xorg-libXpm gtk+"
    1.10 +BUILD_DEPENDS="mplayer-svn gtk+-dev xorg-libXpm-dev firefox-dev libIDL gettext"
    1.11  TARBALL="$PACKAGE-$VERSION.tar.gz"
    1.12  WEB_SITE="http://mplayerplug-in.sourceforge.net/" 
    1.13  WGET_URL="http://downloads.sourceforge.net/mplayerplug-in/$TARBALL"
    1.14 -FIREFOX_VER="3.0.10"
    1.15 +TAGS="player audio video browser"
    1.16 +FIREFOX_VER=`cat /var/lib/tazpkg/installed/firefox/receipt | grep VERSION= | cut -d \" -f 2`
    1.17 +
    1.18  
    1.19  
    1.20  # Rules to configure and make the package.
    1.21  compile_rules()
    1.22  {
    1.23  	cd $src
    1.24 +	 while read file; do
    1.25 +    	[ -f done.$file ] && continue
    1.26 +    	echo "Apply $file..."
    1.27 +    	patch -p1 < ../stuff/$PACKAGE-$VERSION-$file || return 1
    1.28 +	touch done.$file
    1.29 +    done <<EOT
    1.30 +glibc210.u
    1.31 +EOT
    1.32 +    make distclean
    1.33 +	touch install.sh
    1.34  	./configure --prefix=/usr --sysconfdir=/etc \
    1.35  		--enable-gtk2 \
    1.36  		--enable-wmp \
    1.37 @@ -32,8 +44,29 @@
    1.38  
    1.39  genpkg_rules()
    1.40  {
    1.41 -	mkdir -p $fs/usr/lib 
    1.42 +	mkdir -p $fs/usr/lib
    1.43      cp -a $_pkg/etc $fs
    1.44 -    cp -a $_pkg/usr/lib/mozilla $fs/usr/lib
    1.45 -       
    1.46 +    cp -a $_pkg/usr/lib/mozilla $fs/usr/lib		
    1.47 +	# change the default video output to xv,x11
    1.48 +	sed -i "s/#vo=xv,x11/vo=xv,x11/" $fs/etc/$PACKAGE.conf
    1.49 +	      
    1.50  }
    1.51 +
    1.52 +post_install()
    1.53 +{
    1.54 +	echo -n "Processing post install commands..."
    1.55 +	local root
    1.56 +	root=$1
    1.57 +	for i in $root/usr/lib/mozilla/plugins/$PACKAGE*.so ; do
    1.58 +		ln -s $i $root/usr/lib/firefox-$FIREFOX_VER/plugins
    1.59 +	done 
    1.60 +	status
    1.61 +}
    1.62 +
    1.63 +post_remove()
    1.64 +{
    1.65 +	echo -n "Processing post remove commands..."
    1.66 +	rm -f /usr/lib/firefox*/plugins/$PACKAGE*.so
    1.67 +	status
    1.68 +}
    1.69 +
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/mplayerplug-in/stuff/mplayerplug-in-3.55-glibc210.u	Fri Jun 12 17:28:25 2009 +0000
     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 +