contrib: gnutls: disable getentropy in gnutls configure
[vlc.git] / contrib / src / gnutls / rules.mak
1 # GnuTLS
2
3 GNUTLS_VERSION := 3.4.14
4 GNUTLS_URL := ftp://ftp.gnutls.org/gcrypt/gnutls/v3.4/gnutls-$(GNUTLS_VERSION).tar.xz
5
6 ifdef BUILD_NETWORK
7 ifndef HAVE_DARWIN_OS
8 PKGS += gnutls
9 endif
10 endif
11 ifeq ($(call need_pkg,"gnutls >= 3.3.6"),)
12 PKGS_FOUND += gnutls
13 endif
14
15 $(TARBALLS)/gnutls-$(GNUTLS_VERSION).tar.xz:
16         $(call download_pkg,$(GNUTLS_URL),gnutls)
17
18 .sum-gnutls: gnutls-$(GNUTLS_VERSION).tar.xz
19
20 gnutls: gnutls-$(GNUTLS_VERSION).tar.xz .sum-gnutls
21         $(UNPACK)
22         $(APPLY) $(SRC)/gnutls/gnutls-pkgconfig-static.patch
23 ifdef HAVE_WIN32
24         $(APPLY) $(SRC)/gnutls/gnutls-win32.patch
25         $(APPLY) $(SRC)/gnutls/gnutls-mingw64.patch
26         $(APPLY) $(SRC)/gnutls/gnutls-loadlibrary.patch
27 ifdef HAVE_WINSTORE
28         $(APPLY) $(SRC)/gnutls/gnutls-winrt.patch
29         $(APPLY) $(SRC)/gnutls/winrt-topendir.patch
30 endif
31 endif
32 ifdef HAVE_ANDROID
33         $(APPLY) $(SRC)/gnutls/no-create-time-h.patch
34         $(APPLY) $(SRC)/gnutls/gnutls-android.patch
35 endif
36         $(APPLY) $(SRC)/gnutls/read-file-limits.h.patch
37         $(APPLY) $(SRC)/gnutls/mac-keychain-lookup.patch
38 ifdef HAVE_MACOSX
39         $(APPLY) $(SRC)/gnutls/gnutls-pkgconfig-osx.patch
40         $(APPLY) $(SRC)/gnutls/gnutls-disable-getentropy-osx.patch
41 endif
42         $(APPLY) $(SRC)/gnutls/gnutls-libidn.patch
43         $(call pkg_static,"lib/gnutls.pc.in")
44         $(UPDATE_AUTOCONFIG)
45         $(MOVE)
46
47 GNUTLS_CONF := \
48         --disable-gtk-doc \
49         --without-p11-kit \
50         --disable-cxx \
51         --disable-srp-authentication \
52         --disable-psk-authentication-FIXME \
53         --disable-anon-authentication \
54         --disable-openpgp-authentication \
55         --disable-openssl-compatibility \
56         --disable-guile \
57         --disable-nls \
58         --without-libintl-prefix \
59         --disable-doc \
60         --disable-tests \
61         --with-included-libtasn1 \
62         $(HOSTCONF)
63
64 GNUTLS_ENV := $(HOSTVARS)
65
66 DEPS_gnutls = nettle $(DEPS_nettle)
67
68 ifdef HAVE_ANDROID
69 GNUTLS_ENV += gl_cv_header_working_stdint_h=yes
70 endif
71 ifdef HAVE_TIZEN
72         GNUTLS_CONF += --with-default-trust-store-dir=/etc/ssl/certs/
73 endif
74 ifdef HAVE_WINSTORE
75 ifdef HAVE_WIN64
76         GNUTLS_CONF += --disable-hardware-acceleration
77 endif
78 endif
79
80 .gnutls: gnutls
81         $(RECONF)
82         cd $< && $(GNUTLS_ENV) ./configure $(GNUTLS_CONF)
83         cd $</gl && $(MAKE) install
84         cd $</lib && $(MAKE) install
85         touch $@