ALL: Merge the win32-contrib branch.
[vlc.git] / extras / contrib / src / Patches / goom2k4-0-win32.patch.bak
1 --- /tmp/goom2k4-dev15-pre/configure.in 2004-03-27 18:15:05.000000000 +0100
2 +++ configure.in        2004-05-08 21:35:25.000000000 +0200
3 @@ -1,6 +1,5 @@
4  AC_INIT(README)
5  
6 -AM_DISABLE_STATIC
7  AM_INIT_AUTOMAKE(SDL_Goom, 2k4)
8  
9  AM_PROG_LIBTOOL
10 @@ -9,69 +8,11 @@
11  
12  AC_C_BIGENDIAN
13  
14 -dnl AM_PATH_XMMS(0.9.5.1,LIBS=$XMMS_LIBS, [
15 -dnl    echo "*** ^^^ IGNORE THE ABOVE WARNING MESSAGE IF YOU HAVE NOT PATCHED XMMS"
16 -dnl    echo "*** ^^^ WITH THE xmms-config patch!"
17 -dnl    echo "*** xmms-config was not found in your path; guessing values for CFLAGS"
18 -dnl    echo "*** and libs."
19 -
20 -    AM_PATH_GLIB(1.2.2,,AC_MSG_ERROR([*** GLIB >= 1.2.2 not installed - please install first ***]))
21 -    AM_PATH_GTK(1.2.2,,AC_MSG_ERROR([*** GTK+ >= 1.2.2 not installed - please install first ***]),gthread)
22 -
23 -    LIBS="$GTK_LIBS -lxmms"
24 -    CFLAGS="$GTK_CFLAGS -I$prefix/include/xmms"
25 -
26 -    AC_TRY_COMPILE(xmms/plugin.h, , AC_MSG_ERROR([*** XMMS header files (xmms-devel) not installed - please install first ***]))
27 -    AC_PREFIX_PROGRAM(xmms)
28 -  
29 -    if test "$prefix" = "/usr/bin"; then # happens if xmms is in /usr/bin/X11
30 -       prefix=/usr
31 -    fi
32 -
33 -    if test "$prefix" = "/usr/X11R6"; then # happens if xmms is in /usr/X11R6/bin
34 -       prefix=/usr
35 -    fi
36 -
37 -    echo "prefix set to $prefix"
38 -
39 -    XMMS_LIBS="$GTK_LIBS -lxmms"
40 -    XMMS_CFLAGS="$GTK_CFLAGS -I$prefix/include/xmms"
41 -    XMMS_PLUGIN_DIR="$prefix/lib/xmms"
42 -    XMMS_VISUALIZATION_PLUGIN_DIR="$XMMS_PLUGIN_DIR/Visualization"
43 -    XMMS_DATA_DIR="$prefix/share/xmms"
44 -
45 -    AC_SUBST(XMMS_LIBS)    
46 -    AC_SUBST(XMMS_CFLAGS)
47 -    AC_SUBST(XMMS_PLUGIN_DIR)
48 -    AC_SUBST(XMMS_VISUALIZATION_PLUGIN_DIR)
49 -    AC_SUBST(XMMS_DATA_DIR)
50 -dnl ])
51 -
52 -CFLAGS="$CFLAGS $GTK_CFLAGS"
53 -AC_SUBST(GTK_LIBS)
54 +dnl AC_SUBST(GTK_LIBS)
55  
56 -AC_CHECK_HEADER(pthread.h,,AC_MSG_ERROR([*** POSIX thread support not installed - please install first ***]))
57 -
58 -PTHREAD_LIBS=error
59 -AC_CHECK_LIB(pthread, pthread_attr_init, PTHREAD_LIBS="-lpthread")
60 -
61 -dnl SDL_LIBS=error
62 -dnl AC_CHECK_LIB(SDL, main, SDL_LIBS=-lSDL)
63  dnl AC_SUBST(SDL_LIBS)
64  
65 -if test "x$PTHREAD_LIBS" = xerror; then
66 -    AC_CHECK_LIB(pthreads, pthread_attr_init, PTHREAD_LIBS="-lpthreads")
67 -fi
68 -
69 -if test "x$PTHREAD_LIBS" = xerror; then
70 -    AC_CHECK_LIB(c_r, pthread_attr_init, PTHREAD_LIBS="-lc_r")
71 -fi
72 -
73 -if test "x$PTHREAD_LIBS" = xerror; then
74 -    AC_CHECK_FUNC(pthread_attr_init, PTHREAD_LIBS="")
75 -fi
76 -
77 -AC_SUBST(PTHREAD_LIBS)
78 +dnl AC_SUBST(PTHREAD_LIBS)
79  
80  dnl rm -f mmx_zoom.s
81  case "$host" in
82 --- /tmp/goom2k4-dev15-pre/src/Makefile.am      2004-03-27 19:07:40.000000000 +0100
83 +++ src/Makefile.am     2004-05-08 20:58:43.000000000 +0200
84 @@ -1,18 +1,3 @@
85 -# the xmms plugin
86 -xmms_lib_LTLIBRARIES = libxmmsgoom2.la
87 -
88 -xmms_libdir = @XMMS_PLUGIN_DIR@/Visualization
89 -
90 -libxmmsgoom2_la_LDFLAGS = -module -avoid-version
91 -xmms_LIBS = -L. -L$(prefix)/lib @XMMS_LIBS@
92 -
93 -xmms_INCLUDES = $(all_includes)\
94 -       -I$(top_srcdir)
95 -
96 -xmms_CFLAGS = -O9 -g -DDATADIR=\"@XMMS_DATA_DIR@\" @XMMS_CFLAGS@ -Wall
97 -
98 -libxmmsgoom2_la_SOURCES = xmms_goom.c
99 -
100  # libgoom2
101  goom2_lib_LTLIBRARIES = libgoom2.la
102  
103 @@ -31,17 +16,3 @@
104  libgoom2_la_SOURCES = \
105  goom_tools.c mmx.c xmmx.c config_param.c convolve_fx.c filters.c flying_stars_fx.c gfontlib.c gfontrle.c goom_core.c graphic.c ifs.c lines.c mathtools.c sound_tester.c surf3d.c surface.c tentacle3d.c plugin_info.c v3d.c drawmethods.c goom_script.c goom_hash.c goom_script_scanner.c goom_script_scanner.tab.c cpu_info.c
106  
107 -# the goom2 stand alone program
108 -bin_PROGRAMS = goom2
109 -
110 -LIBS = -L. -L$(prefix)/lib `sdl-config --libs` @XMMS_LIBS@
111 -
112 -INCLUDES = $(all_includes)\
113 -               -I$(top_srcdir)
114 -
115 -CFLAGS = -O9 -g `sdl-config --cflags` @XMMS_CFLAGS@ -Wall
116 -
117 -# FIXME, link to libgoom
118 -goom2_SOURCES = \
119 -config_param.c convolve_fx.c filters.c flying_stars_fx.c frame_rate_tester.c gfontlib.c gfontrle.c gmtimer.c goom_core.c graphic.c gtk-callbacks.c gtk-interface.c gtk-support.c ifs.c lines.c mathtools.c pixeldoubler.c readme.c sdl_goom.c sdl_pixeldoubler.c sound_tester.c surf3d.c surface.c tentacle3d.c xmms_goom.c mmx.c xmmx.c goom_tools.c plugin_info.c v3d.c drawmethods.c goom_script.c goom_hash.c goom_script_scanner.c goom_script_scanner.tab.c cpu_info.c
120 -
121 --- /tmp/goom2k4-dev15-pre/src/filters.c        2004-03-27 18:15:05.000000000 +0100
122 +++ src/filters.c       2004-05-09 11:57:07.000000000 +0200
123 @@ -199,8 +199,8 @@
124      /* Noise */
125      if (data->noisify)
126      {
127 -        vx += (((float)random()) / ((float)RAND_MAX) - 0.5f) / 50.0f;
128 -        vy += (((float)random()) / ((float)RAND_MAX) - 0.5f) / 50.0f;
129 +        vx += (((float)rand()) / ((float)RAND_MAX) - 0.5f) / 50.0f;
130 +        vy += (((float)rand()) / ((float)RAND_MAX) - 0.5f) / 50.0f;
131      }
132      
133      /* Hypercos */
134 --- /tmp/goom2k4-dev15-pre/src/goom_core.c      2004-03-27 18:15:05.000000000 +0100
135 +++ src/goom_core.c     2004-05-09 11:50:23.000000000 +0200
136 @@ -39,11 +39,11 @@
137  static void init_buffers(PluginInfo *goomInfo, int buffsize)
138  {
139      goomInfo->pixel = (guint32 *) malloc (buffsize * sizeof (guint32) + 128);
140 -    bzero (goomInfo->pixel, buffsize * sizeof (guint32) + 128);
141 +    memset (goomInfo->pixel, 0, buffsize * sizeof (guint32) + 128);
142      goomInfo->back = (guint32 *) malloc (buffsize * sizeof (guint32) + 128);
143 -    bzero (goomInfo->back, buffsize * sizeof (guint32) + 128);
144 +    memset (goomInfo->back, 0, buffsize * sizeof (guint32) + 128);
145      goomInfo->conv = (Pixel *) malloc (buffsize * sizeof (guint32) + 128);
146 -    bzero (goomInfo->conv, buffsize * sizeof (guint32) + 128);
147 +    memset (goomInfo->conv, 0, buffsize * sizeof (guint32) + 128);
148      
149      goomInfo->p1 = (Pixel *) ((1 + ((unsigned int) (goomInfo->pixel)) / 128) * 128);
150      goomInfo->p2 = (Pixel *) ((1 + ((unsigned int) (goomInfo->back)) / 128) * 128);