contrib: gnutls: Drop pkgconfig patch for macOS
[vlc.git] / contrib / src / gnutls / rules.mak
1 # GnuTLS
2
3 GNUTLS_VERSION := 3.5.16
4 GNUTLS_URL := ftp://ftp.gnutls.org/gcrypt/gnutls/v3.5/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-loadlibrary.patch
26 ifdef HAVE_WINSTORE
27         $(APPLY) $(SRC)/gnutls/gnutls-winrt.patch
28         $(APPLY) $(SRC)/gnutls/winrt-topendir.patch
29 endif
30 endif
31 ifdef HAVE_ANDROID
32         $(APPLY) $(SRC)/gnutls/no-create-time-h.patch
33 endif
34         $(APPLY) $(SRC)/gnutls/read-file-limits.h.patch
35 ifdef HAVE_MACOSX
36         $(APPLY) $(SRC)/gnutls/gnutls-disable-getentropy-osx.patch
37         $(APPLY) $(SRC)/gnutls/gnutls-disable-connectx-macos.patch
38 endif
39         $(APPLY) $(SRC)/gnutls/gnutls-libidn.patch
40         $(call pkg_static,"lib/gnutls.pc.in")
41         $(UPDATE_AUTOCONFIG)
42         $(MOVE)
43
44 GNUTLS_CONF := \
45         --disable-gtk-doc \
46         --without-p11-kit \
47         --disable-cxx \
48         --disable-srp-authentication \
49         --disable-psk-authentication-FIXME \
50         --disable-anon-authentication \
51         --disable-openpgp-authentication \
52         --disable-openssl-compatibility \
53         --disable-guile \
54         --disable-nls \
55         --without-libintl-prefix \
56         --disable-doc \
57         --disable-tests \
58         --with-included-libtasn1 \
59         --with-included-unistring \
60         $(HOSTCONF)
61
62 GNUTLS_ENV := $(HOSTVARS)
63
64 DEPS_gnutls = nettle $(DEPS_nettle)
65
66 ifdef HAVE_ANDROID
67 GNUTLS_ENV += gl_cv_header_working_stdint_h=yes
68 endif
69 ifdef HAVE_TIZEN
70         GNUTLS_CONF += --with-default-trust-store-dir=/etc/ssl/certs/
71 endif
72 ifdef HAVE_WINSTORE
73 ifdef HAVE_WIN64
74         GNUTLS_CONF += --disable-hardware-acceleration
75 endif
76 endif
77
78 .gnutls: gnutls
79         $(RECONF)
80         cd $< && $(GNUTLS_ENV) ./configure $(GNUTLS_CONF)
81         cd $</gl && $(MAKE) install
82         cd $</lib && $(MAKE) install
83         touch $@