gnutls: update to version 3.1.9 and simplify
[vlc.git] / contrib / src / gnutls / rules.mak
1 # GnuTLS
2
3 GNUTLS_VERSION := 3.1.25
4 GNUTLS_URL := ftp://ftp.gnutls.org/gcrypt/gnutls/v3.1/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.1.9"),)
12 PKGS_FOUND += gnutls
13 endif
14
15 $(TARBALLS)/gnutls-$(GNUTLS_VERSION).tar.xz:
16         $(call download,$(GNUTLS_URL))
17
18 .sum-gnutls: gnutls-$(GNUTLS_VERSION).tar.xz
19
20 gnutls: gnutls-$(GNUTLS_VERSION).tar.xz .sum-gnutls
21         $(UNPACK)
22 ifdef HAVE_WIN32
23         $(APPLY) $(SRC)/gnutls/gnutls-win32.patch
24 endif
25 ifdef HAVE_ANDROID
26         $(APPLY) $(SRC)/gnutls/no-create-time-h.patch
27 endif
28         $(APPLY) $(SRC)/gnutls/gnutls-no-egd.patch
29         $(APPLY) $(SRC)/gnutls/read-file-limits.h.patch
30         $(APPLY) $(SRC)/gnutls/downgrade-automake-requirement.patch
31         $(APPLY) $(SRC)/gnutls/mac-keychain-lookup.patch
32 ifdef HAVE_MACOSX
33         $(APPLY) $(SRC)/gnutls/gnutls-pkgconfig-osx.patch
34 endif
35         $(call pkg_static,"lib/gnutls.pc.in")
36         $(UPDATE_AUTOCONFIG)
37         $(MOVE)
38
39 GNUTLS_CONF := \
40         --disable-gtk-doc \
41         --without-p11-kit \
42         --disable-cxx \
43         --disable-srp-authentication \
44         --disable-psk-authentication-FIXME \
45         --disable-anon-authentication \
46         --disable-openpgp-authentication \
47         --disable-openssl-compatibility \
48         --disable-guile \
49         --disable-nls \
50         --without-libintl-prefix \
51         $(HOSTCONF)
52
53 DEPS_gnutls = nettle $(DEPS_nettle)
54
55 .gnutls: gnutls
56         $(RECONF)
57 ifdef HAVE_ANDROID
58         cd $< && $(HOSTVARS) gl_cv_header_working_stdint_h=yes ./configure $(GNUTLS_CONF)
59 else
60         cd $< && $(HOSTVARS) ./configure $(GNUTLS_CONF)
61 endif
62         cd $</gl && $(MAKE) install
63         cd $</lib && $(MAKE) install
64         touch $@