d9b2b2e5cb005bbeafb35c259e9facfd0b96a32a
[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 endif
41         $(APPLY) $(SRC)/gnutls/gnutls-libidn.patch
42         $(call pkg_static,"lib/gnutls.pc.in")
43         $(UPDATE_AUTOCONFIG)
44         $(MOVE)
45
46 GNUTLS_CONF := \
47         --disable-gtk-doc \
48         --without-p11-kit \
49         --disable-cxx \
50         --disable-srp-authentication \
51         --disable-psk-authentication-FIXME \
52         --disable-anon-authentication \
53         --disable-openpgp-authentication \
54         --disable-openssl-compatibility \
55         --disable-guile \
56         --disable-nls \
57         --without-libintl-prefix \
58         --disable-doc \
59         --disable-tests \
60         --with-included-libtasn1 \
61         $(HOSTCONF)
62
63 GNUTLS_ENV := $(HOSTVARS)
64
65 DEPS_gnutls = nettle $(DEPS_nettle)
66
67 ifdef HAVE_ANDROID
68 GNUTLS_ENV += gl_cv_header_working_stdint_h=yes
69 endif
70 ifdef HAVE_TIZEN
71         GNUTLS_CONF += --with-default-trust-store-dir=/etc/ssl/certs/
72 endif
73 ifdef HAVE_WINSTORE
74 ifdef HAVE_WIN64
75         GNUTLS_CONF += --disable-hardware-acceleration
76 endif
77 endif
78
79 .gnutls: gnutls
80         $(RECONF)
81         cd $< && $(GNUTLS_ENV) ./configure $(GNUTLS_CONF)
82         cd $</gl && $(MAKE) install
83         cd $</lib && $(MAKE) install
84         touch $@