From da8f817a686ca936b6a64d638b54ee546caded2b Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Tue, 31 Mar 2015 18:34:40 +0530 Subject: gnutls.recipe: Fix build with mingw and fix autoreconf by upping gettext version --- recipes/gnutls.recipe | 3 ++ ...configure-vasprintf-is-defined-in-stdio.h.patch | 54 ++++++++++++++++++++++ ...-configure-Update-gettext-version-to-0.19.patch | 24 ++++++++++ 3 files changed, 81 insertions(+) create mode 100644 recipes/gnutls/0001-configure-vasprintf-is-defined-in-stdio.h.patch create mode 100644 recipes/gnutls/0002-configure-Update-gettext-version-to-0.19.patch diff --git a/recipes/gnutls.recipe b/recipes/gnutls.recipe index 4122ef22..1a1756b9 100644 --- a/recipes/gnutls.recipe +++ b/recipes/gnutls.recipe @@ -22,6 +22,9 @@ class Recipe(recipe.Recipe): Platform.IOS: ['bionic-fixup'], Platform.DARWIN: ['bionic-fixup'] } + patches = [name + "/0001-configure-vasprintf-is-defined-in-stdio.h.patch", + name + "/0002-configure-Update-gettext-version-to-0.19.patch"] + autoreconf = True files_libs = ['libgnutls', 'libgnutlsxx'] files_libs_extra = ['libgnutls-openssl'] diff --git a/recipes/gnutls/0001-configure-vasprintf-is-defined-in-stdio.h.patch b/recipes/gnutls/0001-configure-vasprintf-is-defined-in-stdio.h.patch new file mode 100644 index 00000000..5d85213e --- /dev/null +++ b/recipes/gnutls/0001-configure-vasprintf-is-defined-in-stdio.h.patch @@ -0,0 +1,54 @@ +From a6f664b3d7c5460bb4dedb993b8a4783469aba9b Mon Sep 17 00:00:00 2001 +From: Nirbheek Chauhan +Date: Tue, 31 Mar 2015 15:57:59 +0530 +Subject: [PATCH 1/2] configure: vasprintf is defined in stdio.h + +mingw requires you to include stdio to make vasprintf available. Without this, +compilation using mingw fails due to redefinition of asprintf. +--- + configure.ac | 7 +++++-- + gl/m4/vasprintf.m4 | 4 ++-- + 2 files changed, 7 insertions(+), 4 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 5d13ff7..40a01d7 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -156,8 +156,9 @@ AC_C_BIGENDIAN + + dnl No fork on MinGW, disable some self-tests until we fix them. + dnl Check clock_gettime and pthread_mutex_lock in libc (avoid linking to other libs) +-AC_CHECK_FUNCS([fork inet_ntop inet_pton getrusage getpwuid_r nanosleep daemon getpid clock_gettime iconv localtime vasprintf],,) +-if test "$ac_cv_func_vasprintf" != "yes";then ++AC_CHECK_FUNCS([fork inet_ntop inet_pton getrusage getpwuid_r nanosleep daemon getpid clock_gettime iconv localtime],,) ++AC_CHECK_DECLS([vasprintf]) ++if test "$ac_cv_have_decl_vasprintf" != "yes";then + AC_MSG_CHECKING([for va_copy]) + AC_LINK_IFELSE([AC_LANG_PROGRAM([ + #include +@@ -178,6 +179,8 @@ if test "$ac_cv_func_vasprintf" != "yes";then + [AC_MSG_RESULT(no) + AC_MSG_ERROR([Your system lacks vasprintf() and va_copy()])]) + ]) ++else ++ AC_DEFINE(HAVE_VASPRINTF, 1, [Have vasprintf()]) + fi + + AM_CONDITIONAL(HAVE_FORK, test "$ac_cv_func_fork" != "no") +diff --git a/gl/m4/vasprintf.m4 b/gl/m4/vasprintf.m4 +index c76c99c..42c71c2 100644 +--- a/gl/m4/vasprintf.m4 ++++ b/gl/m4/vasprintf.m4 +@@ -7,8 +7,8 @@ dnl with or without modifications, as long as this notice is preserved. + + AC_DEFUN([gl_FUNC_VASPRINTF], + [ +- AC_CHECK_FUNCS([vasprintf]) +- if test $ac_cv_func_vasprintf = no; then ++ AC_CHECK_DECLS([vasprintf]) ++ if test $ac_cv_have_decl_vasprintf = no; then + gl_REPLACE_VASPRINTF + fi + ]) +-- +2.1.0 diff --git a/recipes/gnutls/0002-configure-Update-gettext-version-to-0.19.patch b/recipes/gnutls/0002-configure-Update-gettext-version-to-0.19.patch new file mode 100644 index 00000000..328ee576 --- /dev/null +++ b/recipes/gnutls/0002-configure-Update-gettext-version-to-0.19.patch @@ -0,0 +1,24 @@ +From b450f470d17279c8ad0cf7c4df1f6fdbc911137a Mon Sep 17 00:00:00 2001 +From: Nirbheek Chauhan +Date: Tue, 31 Mar 2015 18:23:56 +0530 +Subject: [PATCH 2/2] configure: Update gettext version to 0.19 + +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 40a01d7..87c3337 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -150,7 +150,7 @@ AM_CONDITIONAL(ENABLE_TESTS, test "$enable_tests" != "no") + + GTK_DOC_CHECK(1.1) + AM_GNU_GETTEXT([external]) +-AM_GNU_GETTEXT_VERSION([0.18]) ++AM_GNU_GETTEXT_VERSION([0.19]) + + AC_C_BIGENDIAN + +-- +2.1.0 -- cgit v1.2.3