summaryrefslogtreecommitdiff
path: root/multimedia/mplayer-share/patches/patch-aa
blob: 0a51a35dbfc965d9bdc86283111116adff95e6b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
$NetBSD: patch-aa,v 1.23 2009/03/06 01:33:12 jmcneill Exp $

--- configure.orig	2007-10-07 15:49:33.000000000 -0400
+++ configure	2009-03-05 20:17:42.000000000 -0500
@@ -718,7 +718,7 @@ for ac_option do
     _inc_extra=-I`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -I,g'`
     ;;
   --with-extralibdir=*)
-    _ld_extra=-L`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -L,g'`
+    _ld_extra="${_ld_extra} -Wl,-R"`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -Wl\,-R,g'`" -L"`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -L,g'`
     ;;
 
   --with-install=*)
@@ -1238,6 +1238,9 @@ if test -z "$_target" ; then
    powerpc) # Darwin returns 'powerpc'
      host_arch=ppc
      ;;
+   mipseb|mipsel) # NetBSD
+     host_arch=mips
+     ;;
    *) # uname -p on Linux returns 'unknown' for the processor type,
       # OpenBSD returns 'Intel Pentium/MMX ("Genuine Intel" 586-class)'
 
@@ -1411,11 +1414,11 @@ if test "$_gcc_check" = yes ; then
   esac
   echores "$cc_version"
  else
- for _cc in "$_cc" gcc gcc-3.4 gcc-3.3 gcc-3.2 gcc-3.1 gcc3 gcc-3.0 cc ; do
+ for _cc in "$_cc" gcc cc ; do
   echocheck "$_cc version"
   cc_vendor=gnu
   cc_name=`$_cc -v 2>&1 | _tail 1 | cut -d ' ' -f 1`
-  cc_version=`$_cc -dumpversion 2>&1`
+  cc_version=`( $_cc -dumpversion | sed -e 's/-nb[0-9]//' ) 2>&1`
   if test "$?" -gt 0; then
     cc_version="not found"
   fi
@@ -1548,7 +1551,7 @@ if x86 ; then
   # gather more CPU information
   pname=`$_cpuinfo | grep 'model name' | cut -d ':' -f 2 | _head 1`
   pvendor=`$_cpuinfo | grep 'vendor_id' | cut -d ':' -f 2  | cut -d ' ' -f 2 | _head 1`
-  pfamily=`$_cpuinfo | grep 'cpu family' | cut -d ':' -f 2 | cut -d ' ' -f 2 | _head 1`
+  pfamily=`$_cpuinfo | grep -i 'cpu family' | cut -d ':' -f 2 | cut -d ' ' -f 2 | _head 1`
   pmodel=`$_cpuinfo | grep -v 'model name' | grep 'model' | cut -d ':' -f 2 | cut -d ' ' -f 2 | _head 1`
   pstepping=`$_cpuinfo | grep 'stepping' | cut -d ':' -f 2 | cut -d ' ' -f 2 | _head 1`
 
@@ -3098,7 +3101,6 @@ test "$_w32threads" = yes && _def_thread
 echores "$_w32threads"
 
 echocheck "rpath"
-netbsd &&_rpath=yes
 if test "$_rpath" = yes ; then
   for I in `echo $_ld_extra | sed 's/-L//g'` ; do
     tmp="$tmp ` echo $I | sed 's/.*/ -L& -Wl,-R&/'`"
@@ -3884,7 +3886,11 @@ EOF
   for I in "" -L/usr/X11R6/lib -L/usr/lib/X11R6 -L/usr/X11/lib \
            -L/usr/lib32 -L/usr/openwin/lib -L/usr/X11R6/lib64 -L/usr/lib ; do
     if netbsd; then
-      _ld_tmp="$I -lXext -lX11 $_ld_pthread -Wl,-R`echo $I | sed s/^-L//`"
+      if test -n "$I" ; then
+        _ld_tmp="$I -lXext -lX11 $_ld_pthread -Wl,-R`echo $I | sed s/^-L//`"
+      else
+        _ld_tmp="-lXext -lX11 $_ld_pthread"
+      fi
     else
       _ld_tmp="$I -lXext -lX11 $_ld_pthread"
     fi
@@ -4368,7 +4374,7 @@ fi
 if test "$_aa" = yes ; then
   _def_aa='#define HAVE_AA 1'
   if cygwin ; then
-    _libs_mplayer="$_libs_mplayer `aalib-config --libs | cut -d " " -f 2,5,6`"
+    _libs_mplayer="$_libs_mplayer `${AALIB_CONFIG} --libs | cut -d " " -f 2,5,6`"
   fi
   _vosrc="$_vosrc vo_aa.c"
   _vomodules="aa $_vomodules"
@@ -5100,15 +5106,15 @@ fi
 echocheck "Polyp"
 if test "$_polyp" = auto ; then
   _polyp=no
-  if $_pkg_config --exists 'polyplib >= 0.6 polyplib-error >= 0.6 polyplib-mainloop >= 0.6' ; then
+  if $_pkg_config --exists 'libpulse >= 0.9 libpulse-simple >= 0.9 libpulse-mainloop-glib >= 0.9' ; then
 
 cat > $TMPC << EOF
-#include <polyp/polyplib.h>
-#include <polyp/mainloop.h>
-#include <polyp/polyplib-error.h>
+#include <pulse/pulseaudio.h>
+#include <pulse/mainloop.h>
+#include <pulse/error.h>
 int main(void) { return 0; }
 EOF
-cc_check `$_pkg_config --libs --cflags polyplib polyplib-error polyplib-mainloop` && tmp_run && _polyp=yes
+cc_check `$_pkg_config --libs --cflags libpulse libpulse-simple libpulse-mainloop-glib` && tmp_run && _polyp=yes
 
   fi
 fi
@@ -5118,8 +5124,8 @@ if test "$_polyp" = yes ; then
   _def_polyp='#define USE_POLYP 1'
   _aosrc="$_aosrc ao_polyp.c"
   _aomodules="polyp $_aomodules"
-  _libs_mplayer="$_libs_mplayer `$_pkg_config --libs polyplib polyplib-error polyplib-mainloop`"
-  _inc_extra="$_inc_extra `$_pkg_config --cflags polyplib polyplib-error polyplib-mainloop`"
+  _libs_mplayer="$_libs_mplayer `$_pkg_config --libs libpulse libpulse-simple libpulse-mainloop-glib`"
+  _inc_extra="$_inc_extra `$_pkg_config --cflags libpulse libpulse-simple libpulse-mainloop-glib`"
 else
   _def_polyp='#undef USE_POLYP'
   _noaomodules="polyp $_noaomodules"
@@ -6837,11 +6843,16 @@ echores "$_tv_v4l1"
 echocheck "Video 4 Linux 2 TV interface"
 if test "$_tv_v4l2" = auto ; then
   _tv_v4l2=no
-  if test "$_tv" = yes && linux ; then
+  if test "$_tv" = yes && (linux || netbsd || openbsd) ; then
     cat > $TMPC <<EOF
 #include <stdlib.h>
+#ifdef __linux__
 #include <linux/types.h>
 #include <linux/videodev2.h>
+#elif defined(__NetBSD__) || defined(__OpenBSD__)
+#include <sys/types.h>
+#include <sys/videoio.h>
+#endif
 int main(void) { return 0; }
 EOF
     cc_check && _tv_v4l2=yes