mxe/src/gnutls.mk

55 lines
2.2 KiB
Makefile
Raw Normal View History

2012-03-28 14:46:58 +01:00
# This file is part of MXE.
2012-03-29 11:14:15 +01:00
# See index.html for further information.
2008-11-08 18:56:29 +00:00
PKG := gnutls
2012-11-24 22:11:58 +00:00
$(PKG)_CHECKSUM := 93efeab75cad6f656eae1123c10e3692db727bd5
$(PKG)_SUBDIR := gnutls-$($(PKG)_VERSION)
2011-10-29 00:54:39 +01:00
$(PKG)_FILE := gnutls-$($(PKG)_VERSION).tar.xz
2012-09-20 12:10:23 +01:00
$(PKG)_URL := http://ftp.gnu.org/gnu/gnutls/$($(PKG)_FILE)
$(PKG)_DEPS := gcc gettext nettle pcre zlib
2008-11-08 18:56:29 +00:00
define $(PKG)_UPDATE
$(WGET) -q -O- 'http://git.savannah.gnu.org/gitweb/?p=gnutls.git;a=tags' | \
grep '<a class="list name"' | \
2012-09-20 12:10:23 +01:00
$(SED) -n 's,.*<a[^>]*>gnutls_\([0-9]*_[0-9]*[012468]_[^<]*\)<.*,\1,p' | \
$(SED) 's,_,.,g' | \
2011-11-08 07:43:58 +00:00
grep -v '^2\.' | \
2008-11-08 18:56:29 +00:00
head -1
endef
define $(PKG)_BUILD
$(SED) -i 's, sed , $(SED) ,g' '$(1)/gl/tests/Makefile.am'
2012-02-18 21:51:54 +00:00
cd '$(1)' && aclocal -I m4 -I gl/m4 -I src/libopts/m4 --install
cd '$(1)' && autoconf
cd '$(1)' && automake --add-missing
# skip the run test for libregex support since we are cross compiling
$(SED) -i 's/libopts_cv_with_libregex=no/libopts_cv_with_libregex=yes/g;' '$(1)/configure'
2012-01-05 10:28:27 +00:00
# AI_ADDRCONFIG referenced by src/serv.c but not provided by mingw.
# Value taken from http://msdn.microsoft.com/en-us/library/windows/desktop/ms737530%28v=vs.85%29.aspx
2008-11-08 18:56:29 +00:00
cd '$(1)' && ./configure \
--host='$(TARGET)' \
2012-06-06 09:47:11 +01:00
--build="`config.guess`" \
2011-03-25 16:21:46 +00:00
--enable-static \
2008-11-08 18:56:29 +00:00
--disable-shared \
--prefix='$(PREFIX)/$(TARGET)' \
--disable-nls \
--disable-guile \
2008-11-08 18:56:29 +00:00
--with-included-libtasn1 \
--with-included-libcfg \
--with-libregex='$(PREFIX)/$(TARGET)' \
--with-regex-header=pcreposix.h \
--with-libregex-cflags="`'$(TARGET)-pkg-config' libpcreposix --cflags`" \
--with-libregex-libs="`'$(TARGET)-pkg-config' libpcreposix --libs`" \
--without-p11-kit \
--disable-silent-rules \
2012-09-20 12:10:23 +01:00
CPPFLAGS='-DWINVER=0x0501 -DAI_ADDRCONFIG=0x0400 -DIPV6_V6ONLY=27' \
LIBS='-lws2_32' \
ac_cv_prog_AR='$(TARGET)-ar'
2011-11-23 08:04:21 +00:00
$(MAKE) -C '$(1)' -j '$(JOBS)' install
2011-09-03 15:40:19 +01:00
'$(TARGET)-gcc' \
-W -Wall -Werror -ansi -pedantic \
'$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-gnutls.exe' \
`'$(TARGET)-pkg-config' gnutls --cflags --libs`
2008-11-08 18:56:29 +00:00
endef