rules.mak 2.01 KB
Newer Older
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
1
2
# GnuTLS

3
GNUTLS_VERSION := 3.4.14
4
GNUTLS_URL := ftp://ftp.gnutls.org/gcrypt/gnutls/v3.4/gnutls-$(GNUTLS_VERSION).tar.xz
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
5

6
ifdef BUILD_NETWORK
7
ifndef HAVE_DARWIN_OS
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
8
PKGS += gnutls
9
endif
10
endif
11
ifeq ($(call need_pkg,"gnutls >= 3.2.0"),)
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
12
13
14
PKGS_FOUND += gnutls
endif

15
$(TARBALLS)/gnutls-$(GNUTLS_VERSION).tar.xz:
16
	$(call download_pkg,$(GNUTLS_URL),gnutls)
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
17

18
.sum-gnutls: gnutls-$(GNUTLS_VERSION).tar.xz
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
19

20
gnutls: gnutls-$(GNUTLS_VERSION).tar.xz .sum-gnutls
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
21
	$(UNPACK)
22
ifdef HAVE_WIN32
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
23
	$(APPLY) $(SRC)/gnutls/gnutls-win32.patch
24
	$(APPLY) $(SRC)/gnutls/gnutls-mingw64.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
31
endif
ifdef HAVE_ANDROID
tewilove's avatar
tewilove committed
32
	$(APPLY) $(SRC)/gnutls/no-create-time-h.patch
33
	$(APPLY) $(SRC)/gnutls/gnutls-android.patch
34
endif
35
	$(APPLY) $(SRC)/gnutls/read-file-limits.h.patch
36
	$(APPLY) $(SRC)/gnutls/mac-keychain-lookup.patch
37
ifdef HAVE_MACOSX
38
	$(APPLY) $(SRC)/gnutls/gnutls-pkgconfig-osx.patch
39
endif
40
	$(APPLY) $(SRC)/gnutls/gnutls-libidn.patch
41
	$(APPLY) $(SRC)/gnutls/gnutls-pkgconfig-static.patch
42
	$(call pkg_static,"lib/gnutls.pc.in")
43
	$(UPDATE_AUTOCONFIG)
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
44
45
46
47
	$(MOVE)

GNUTLS_CONF := \
	--disable-gtk-doc \
48
	--without-p11-kit \
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
49
50
51
52
53
54
55
	--disable-cxx \
	--disable-srp-authentication \
	--disable-psk-authentication-FIXME \
	--disable-anon-authentication \
	--disable-openpgp-authentication \
	--disable-openssl-compatibility \
	--disable-guile \
56
57
	--disable-nls \
	--without-libintl-prefix \
58
59
	--disable-doc \
	--disable-tests \
60
	--with-included-libtasn1 \
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
61
62
	$(HOSTCONF)

63
64
GNUTLS_ENV := $(HOSTVARS)

65
66
DEPS_gnutls = nettle $(DEPS_nettle)

67
ifdef HAVE_ANDROID
68
GNUTLS_ENV += gl_cv_header_working_stdint_h=yes
tewilove's avatar
tewilove committed
69
endif
70
71
72
ifdef HAVE_TIZEN
	GNUTLS_CONF += --with-default-trust-store-dir=/etc/ssl/certs/
endif
73
74
75
76
77
ifdef HAVE_WINSTORE
ifdef HAVE_WIN64
	GNUTLS_CONF += --disable-hardware-acceleration
endif
endif
78
79
80
81

.gnutls: gnutls
	$(RECONF)
	cd $< && $(GNUTLS_ENV) ./configure $(GNUTLS_CONF)
82
	cd $</gl && $(MAKE) install
Rémi Denis-Courmont's avatar
Rémi Denis-Courmont committed
83
84
	cd $</lib && $(MAKE) install
	touch $@