Commit 9896feaf authored by Edric Milaret's avatar Edric Milaret Committed by Gerrit Code Review

windows: fix compilation

Fix compilation of GnuTLS and Pjproject broke by bump
Fix libvideo compilation (enforcing static, activating opus and speex)

Refs #68888

Change-Id: I29bfb30ec2c7327b022857f851f57b019f9cb6a0
parent 7f174f8d
......@@ -58,20 +58,15 @@ FFMPEGCONF += \
--enable-encoder=mjpeg \
--enable-decoder=mjpeg \
--enable-decoder=mjpegb \
--enable-libspeex \
--enable-libopus \
--enable-encoder=libspeex \
--enable-decoder=libspeex
FFMPEGCONF += \
--enable-indev=dshow \
--enable-dxva2
# There is an unresolved symbol for speex when linking statically
ifndef HAVE_WIN32
FFMPEGCONF += \
--enable-libspeex \
--enable-libopus \
--enable-encoder=libspeex \
--enable-decoder=libspeex
endif
DEPS_ffmpeg = iconv zlib x264 vpx opus speex $(DEPS_vpx)
ifdef HAVE_CROSS_COMPILE
......
--- gnutls-2.12.20/gl/gai_strerror.c.orig 2012-03-01 16:45:12.000000000 +0100
+++ gnutls-2.12.20/gl/gai_strerror.c 2012-09-27 14:39:30.273584236 +0200
@@ -75,7 +75,7 @@
{ EAI_IDN_ENCODE, N_("Parameter string not correctly encoded") }
#endif
};
-
+#ifndef _WIN32
const char *
gai_strerror (int code)
{
@@ -89,4 +89,5 @@
# ifdef _LIBC
libc_hidden_def (gai_strerror)
# endif
+#endif
#endif /* !HAVE_DECL_GAI_STRERROR */
--- gnutls-3.1.14/lib/gnutls.pc.in.orig 2013-09-17 18:14:16.270374773 +0200
+++ gnutls-3.1.14/lib/gnutls.pc.in 2013-09-17 18:16:10.232464936 +0200
@@ -18,7 +18,7 @@
Description: Transport Security Layer implementation for the GNU system
URL: http://www.gnutls.org/
Version: @VERSION@
-Libs: -L${libdir} -lgnutls
+Libs: -L${libdir} -lgnutls -lws2_32 -lcrypt32 @LTLIBINTL@
Libs.private: @LTLIBNETTLE@ @LTLIBZ@ @LTLIBINTL@ @LIBSOCKET@ @LTLIBPTHREAD@ @LTLIBICONV@ @P11_KIT_LIBS@ @LIB_SELECT@ @TSS_LIBS@ @LIB_CLOCK_GETTIME@ @GMP_LIBS@
@GNUTLS_REQUIRES_PRIVATE@
Cflags: -I${includedir}
--- gnutls-3.4.0/lib/includes/gnutls/gnutls.h.in.orig 2015-04-09 23:38:42.018400000 +0300
+++ gnutls-3.4.0/lib/includes/gnutls/gnutls.h.in 2015-04-09 23:39:31.860400000 +0300
@@ -67,6 +67,8 @@
#define GNUTLS_CIPHER_RIJNDAEL_CBC GNUTLS_CIPHER_AES_128_CBC
#define GNUTLS_CIPHER_ARCFOUR GNUTLS_CIPHER_ARCFOUR_128
+#define GNUTLS_INTERNAL_BUILD 1
+
#if !defined(GNUTLS_INTERNAL_BUILD) && defined(_WIN32)
# define _SYM_EXPORT __declspec(dllimport)
#else
\ No newline at end of file
......@@ -48,12 +48,18 @@ GNUTLS_CONF := \
DEPS_gnutls = nettle $(DEPS_nettle) iconv $(DEPS_iconv)
#Workaround for localtime_r function
ifdef HAVE_WIN32
CFLAGS="-D_POSIX_C_SOURCE"
endif
.gnutls: gnutls
$(RECONF)
ifdef HAVE_ANDROID
cd $< && $(HOSTVARS) gl_cv_header_working_stdint_h=yes ./configure $(GNUTLS_CONF)
else
cd $< && $(HOSTVARS) ./configure $(GNUTLS_CONF)
cd $< && $(HOSTVARS) CFLAGS=$(CFLAGS) ./configure $(GNUTLS_CONF)
endif
cd $</gl && $(MAKE) install
cd $</lib && $(MAKE) install
......
......@@ -1107,7 +1107,7 @@ index 0000000..5a383d7
+ if (circ_write(&ssock->circ_buf_output, data, len) != PJ_SUCCESS) {
+ pj_lock_release(ssock->circ_buf_output_mutex);
+
+ gnutls_transport_set_errno(ssock->session, ENOMEM);
+ gnutls_transport_set_errno(ssock->session, PJ_ENOMEM);
+ return -1;
+ }
+
......@@ -1130,7 +1130,7 @@ index 0000000..5a383d7
+ pj_lock_release(ssock->circ_buf_input_mutex);
+
+ /* Data buffers not yet filled */
+ gnutls_transport_set_errno(ssock->session, EAGAIN);
+ gnutls_transport_set_errno(ssock->session, PJ_EAGAIN);
+ return -1;
+ }
+
......
......@@ -35,3 +35,8 @@ libvideo_la_LIBADD = @LIBAVCODEC_LIBS@ @LIBAVFORMAT_LIBS@ @LIBAVDEVICE_LIBS@ @LI
AM_CXXFLAGS=@LIBAVCODEC_CFLAGS@ @LIBAVFORMAT_CFLAGS@ @LIBAVDEVICE_CFLAGS@ @LIBSWSCALE_CFLAGS@
AM_CFLAGS=@LIBAVCODEC_CFLAGS@ @LIBAVFORMAT_CFLAGS@ @LIBAVDEVICE_CFLAGS@ @LIBSWSCALE_CFLAGS@
if HAVE_WIN32
AM_CXXFLAGS+=-static
AM_CFLAGS+=-static
endif
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment