This commit is contained in:
corsepiu 2009-03-13 12:10:57 +00:00
parent 169ed51081
commit 2b822611ff
3 changed files with 1239 additions and 0 deletions

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,187 @@
diff -Naur linphone-2.1.1.orig/mediastreamer2/acinclude.m4 linphone-2.1.1/mediastreamer2/acinclude.m4
--- linphone-2.1.1.orig/mediastreamer2/acinclude.m4 2007-12-14 12:17:57.000000000 +0100
+++ linphone-2.1.1/mediastreamer2/acinclude.m4 2009-03-13 08:37:11.000000000 +0100
@@ -1,3 +1,4 @@
+dnl -*- autoconf -*-
AC_DEFUN([MS_CHECK_DEP],[
dnl $1=dependency description
dnl $2=dependency short name, will be suffixed with _CFLAGS and _LIBS
@@ -7,7 +8,7 @@
dnl $6=lib to check
dnl $7=function to check in library
- NAME=$2
+ dep_name=$2
dep_headersdir=$3
dep_libsdir=$4
dep_header=$5
@@ -15,31 +16,31 @@
dep_funclib=$7
other_libs=$8
- if test "$dep_headersdir" != "/usr/include" ; then
- eval ${NAME}_CFLAGS=\"-I$dep_headersdir \"
- fi
- eval ${NAME}_LIBS=\"-L$dep_libsdir -l$dep_lib\"
-
CPPFLAGS_save=$CPPFLAGS
LDFLAGS_save=$LDFLAGS
- CPPFLAGS="-I$dep_headersdir "
- LDFLAGS="-L$dep_libsdir "
+ LIBS_save=$LIBS
+ CPPFLAGS=`echo "-I$dep_headersdir"|sed -e "s:-I/usr/include[\ ]*$::"`
+ LIBS="-l$dep_lib"
+ LDFLAGS=`echo "-L$dep_libsdir"|sed -e "s:-L/usr/lib\(64\)*[\ ]*::"`
+ $2_CFLAGS="$CPPFLAGS"
+ $2_LIBS="$LDFLAGS $LIBS"
+
AC_CHECK_HEADERS([$dep_header],[AC_CHECK_LIB([$dep_lib],[$dep_funclib],found=yes,found=no, [$other_libs])
],found=no)
if test "$found" = "yes" ; then
- eval ${NAME}_found=yes
- AC_SUBST($2_CFLAGS)
- AC_SUBST($2_LIBS)
+ eval $2_found=yes
else
- eval ${NAME}_found=no
- eval ${NAME}_CFLAGS=
- eval ${NAME}_LIBS=
+ eval $2_found=no
+ eval $2_CFLAGS=
+ eval $2_LIBS=
fi
+ AC_SUBST($2_CFLAGS)
+ AC_SUBST($2_LIBS)
CPPFLAGS=$CPPFLAGS_save
LDFLAGS=$LDFLAGS_save
-
+ LIBS=$LIBS_save
])
@@ -72,28 +73,56 @@
AC_MSG_ERROR([Could not find ffmpeg headers and library. This is mandatory for video support])
fi
+ dnl check for new/old ffmpeg header file layout
+ CPPFLAGS_save=$CPPFLAGS
+ CPPFLAGS="$FFMPEG_CFLAGS $CPPFLAGS"
+ AC_CHECK_HEADERS(libavcodec/avcodec.h)
+ CPPFLAGS=$CPPFLAGS_save
+
dnl to workaround a bug on debian and ubuntu, check if libavcodec needs -lvorbisenc to compile
AC_CHECK_LIB(avcodec,avcodec_register_all, novorbis=yes , [
LIBS="$LIBS -lvorbisenc"
], $FFMPEG_LIBS )
- dnl check if sws_scale is available
- AC_CHECK_LIB(avcodec,sws_scale, have_sws_scale=yes , have_sws_scale=no,
- $FFMPEG_LIBS )
- if test x$have_sws_scale = xno ; then
- PKG_CHECK_MODULES(SWSCALE, [libswscale >= 0.5.0 ], need_swscale=yes, need_swscale=no)
- fi
-
- MS_CHECK_DEP([SDL],[SDL],[${libsdldir}/include],[${libsdldir}/lib],[SDL/SDL.h],[SDL],[SDL_Init])
- if test "$SDL_found" = "no" ; then
- AC_MSG_ERROR([Could not find libsdl headers and library. This is mandatory for video support])
+ dnl when swscale feature is not provided by
+ dnl libswscale, its features are swallowed by
+ dnl libavcodec, but without swscale.h and without any
+ dnl declaration into avcodec.h (this is to be
+ dnl considered as an ffmpeg bug).
+ dnl
+ dnl #if defined(HAVE_LIBAVCODEC_AVCODEC_H) && !defined(HAVE_LIBSWSCALE_SWSCALE_H)
+ dnl # include "swscale.h" // private linhone swscale.h
+ dnl #endif
+ CPPFLAGS_save=$CPPFLAGS
+ CPPFLAGS="$FFMPEG_CFLAGS $CPPFLAGS"
+ AC_CHECK_HEADERS(libswscale/swscale.h)
+ CPPFLAGS=$CPPFLAGS_save
+
+ PKG_CHECK_MODULES(SWSCALE, [libswscale >= 0.5.0 ], [echo "We have libswscale"],
+ [echo "We don't have libswscale, let's hope its symbols are in libavcodec"] )
+
+ if test "$libsdldir" != "none" ; then
+ MS_CHECK_DEP([SDL],[SDL],[${libsdldir}/include],[${libsdldir}/lib],[SDL/SDL.h],[SDL],[SDL_Init])
+ if test "$SDL_found" = "no" ; then
+ AC_MSG_ERROR([Could not find libsdl headers and library. This is mandatory for video support])
+ fi
fi
PKG_CHECK_MODULES(THEORA, [theora >= 1.0alpha7 ], [have_theora=yes],
[have_theora=no])
-
- VIDEO_CFLAGS=" $FFMPEG_CFLAGS $SDL_CFLAGS -DVIDEO_ENABLED "
- VIDEO_LIBS=" $FFMPEG_LIBS $SWSCALE_LIBS $SDL_LIBS"
+ AC_CHECK_HEADERS(X11/Xlib.h)
+
+ VIDEO_CFLAGS=" $FFMPEG_CFLAGS -DVIDEO_ENABLED"
+ VIDEO_LIBS=" $FFMPEG_LIBS $SWSCALE_LIBS"
+
+ if test "$SDL_found" = "yes" ; then
+ VIDEO_CFLAGS="$VIDEO_CFLAGS $SDL_CFLAGS -DHAVE_SDL"
+ VIDEO_LIBS="$VIDEO_LIBS $SDL_LIBS"
+ fi
+
+ if test "${ac_cv_header_X11_Xlib_h}" = "yes" ; then
+ VIDEO_LIBS="$VIDEO_LIBS -lX11"
+ fi
fi
AC_SUBST(VIDEO_CFLAGS)
diff -Naur linphone-2.1.1.orig/mediastreamer2/configure.ac linphone-2.1.1/mediastreamer2/configure.ac
--- linphone-2.1.1.orig/mediastreamer2/configure.ac 2008-01-18 23:12:55.000000000 +0100
+++ linphone-2.1.1/mediastreamer2/configure.ac 2009-03-13 08:37:11.000000000 +0100
@@ -109,10 +109,6 @@
CFLAGS="$CFLAGS -D_BIGENDIAN "
fi
-if test $GCC = yes && test $wall_werror = yes; then
- CFLAGS="$CFLAGS -Werror "
-fi
-
macosx_found=no
dnl add thread flags
diff -Naur linphone-2.1.1.orig/mediastreamer2/src/ice.c linphone-2.1.1/mediastreamer2/src/ice.c
--- linphone-2.1.1.orig/mediastreamer2/src/ice.c 2007-10-18 22:05:10.000000000 +0200
+++ linphone-2.1.1/mediastreamer2/src/ice.c 2009-03-13 08:37:11.000000000 +0100
@@ -25,6 +25,10 @@
#include <netdb.h>
#endif
+#ifndef NI_MAXHOST
+#define NI_MAXHOST 1025
+#endif
+
#include "mediastreamer2/ice.h"
#include "mediastreamer2/mscommon.h"
diff -Naur linphone-2.1.1.orig/mediastreamer2/src/Makefile.am linphone-2.1.1/mediastreamer2/src/Makefile.am
--- linphone-2.1.1.orig/mediastreamer2/src/Makefile.am 2008-01-01 01:05:54.000000000 +0100
+++ linphone-2.1.1/mediastreamer2/src/Makefile.am 2009-03-13 08:37:11.000000000 +0100
@@ -121,7 +121,7 @@
AM_CFLAGS+=$(VIDEO_CFLAGS)
endif
-imgdir=$(datadir)/images/
+imgdir=$(datadir)/images/linphone/
img_DATA=nowebcamCIF.jpg
diff -Naur linphone-2.1.1.orig/mediastreamer2/src/nowebcam.c linphone-2.1.1/mediastreamer2/src/nowebcam.c
--- linphone-2.1.1.orig/mediastreamer2/src/nowebcam.c 2007-12-14 14:37:56.000000000 +0100
+++ linphone-2.1.1/mediastreamer2/src/nowebcam.c 2009-03-13 08:37:11.000000000 +0100
@@ -83,8 +83,8 @@
mblk_t *ms_load_nowebcam(MSVideoSize *reqsize, int idx){
char tmp[256];
if (idx<0)
- snprintf(tmp, sizeof(tmp), "%s/images/%s.jpg", PACKAGE_DATA_DIR, NOWEBCAM_JPG);
+ snprintf(tmp, sizeof(tmp), "%s/images/linphone/%s.jpg", PACKAGE_DATA_DIR, NOWEBCAM_JPG);
else
- snprintf(tmp, sizeof(tmp), "%s/images/%s%i.jpg", PACKAGE_DATA_DIR, NOWEBCAM_JPG, idx);
+ snprintf(tmp, sizeof(tmp), "%s/images/linphone/%s%i.jpg", PACKAGE_DATA_DIR, NOWEBCAM_JPG, idx);
return ms_load_jpeg_as_yuv(tmp,reqsize);
}

28
linphone-2.1.1-oRTP.patch Normal file
View file

@ -0,0 +1,28 @@
diff -Naur linphone-2.1.1.orig/oRTP/Makefile.am linphone-2.1.1/oRTP/Makefile.am
--- linphone-2.1.1.orig/oRTP/Makefile.am 2007-10-18 22:05:10.000000000 +0200
+++ linphone-2.1.1/oRTP/Makefile.am 2009-03-13 08:38:34.000000000 +0100
@@ -12,14 +12,13 @@
if HAVE_DOXYGEN
# doxdir & pkgdocdir are not always defined by automake
-docdir=$(datadir)/doc
pkgdocdir=$(docdir)/$(PACKAGE)-$(VERSION)
doc_htmldir=$(pkgdocdir)/html
doc_html_DATA = $(top_builddir)/doc/html/html.tar
$(doc_html_DATA): $(top_builddir)/doc/html/index.html
- cd $(<D) && tar cf html.tar *
+ cd $(top_builddir)/doc/html && tar cf html.tar *
$(top_builddir)/doc/html/index.html: $(SOURCES) ortp.doxygen Makefile.am
rm -rf doc
@@ -51,7 +50,7 @@
.PHONY: package
PKG_NAME = $(PACKAGE)-$(VERSION)-$(RELEASE)
-BUILDROOT = $(shell pwd)/epm-install
+BUILDROOT = `pwd`/epm-install
package: $(srcdir)/pkg.list $(srcdir)/configure
-rm -rf pkg $(BUILDROOT) $(PKG_NAME).*