rules.mak 1.96 KB
Newer Older
1 2
# GnuTLS

3 4
GNUTLS_VERSION := 3.5.16
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 13 14
PKGS_FOUND += gnutls
endif

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 31
endif
ifdef HAVE_ANDROID
某因幡's avatar
某因幡 committed
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 43 44 45
	$(MOVE)

GNUTLS_CONF := \
	--disable-gtk-doc \
46
	--without-p11-kit \
47 48 49 50 51 52 53
	--disable-cxx \
	--disable-srp-authentication \
	--disable-psk-authentication-FIXME \
	--disable-anon-authentication \
	--disable-openpgp-authentication \
	--disable-openssl-compatibility \
	--disable-guile \
54 55
	--disable-nls \
	--without-libintl-prefix \
56 57
	--disable-doc \
	--disable-tests \
58
	--with-included-libtasn1 \
59
	--with-included-unistring \
60 61
	$(HOSTCONF)

62 63
GNUTLS_ENV := $(HOSTVARS)

64 65
DEPS_gnutls = nettle $(DEPS_nettle)

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

.gnutls: gnutls
	$(RECONF)
	cd $< && $(GNUTLS_ENV) ./configure $(GNUTLS_CONF)
81
	cd $</gl && $(MAKE) install
82 83
	cd $</lib && $(MAKE) install
	touch $@