[Android] [PATCH] android: build gnutls

某因幡 tewilove at gmail.com
Sun Mar 4 10:31:40 CET 2012


2012/3/4 Rafaël Carré <funman at videolan.org>:
> On Sat, 3 Mar 2012 21:28:36 +0800
> 某因幡 <tewilove at gmail.com> wrote:
>
>> From 25d84d422ad961e2403ac0530baa599ebd36fcda Mon Sep 17 00:00:00 2001
>> From: tewilove <tewilove at gmail.com>
>> Date: Fri, 2 Mar 2012 23:27:45 -0800
>> Subject: [PATCH] android: build gnutls
>>
>> ---
>>  contrib/src/gnutls/no-create-time-h.patch |   11 +++++++++++
>>  contrib/src/gnutls/rules.mak              |    9 +++++++--
>>  2 files changed, 18 insertions(+), 2 deletions(-)
>>  create mode 100644 contrib/src/gnutls/no-create-time-h.patch
>>
>> diff --git a/contrib/src/gnutls/no-create-time-h.patch b/contrib/src/gnutls/no-create-time-h.patch
>> new file mode 100644
>> index 0000000..ac6fe66
>> --- /dev/null
>> +++ b/contrib/src/gnutls/no-create-time-h.patch
>> @@ -0,0 +1,11 @@
>> +--- gnutls/lib/gl/Makefile.am        2011-04-07 17:30:44.000000000 -0700
>> ++++ gnutls/lib/gl/Makefile.am        2012-03-02 19:51:53.576555217 -0800
>> +@@ -891,7 +891,7 @@ EXTRA_DIST += sys_stat.in.h
>> +
>> + ## begin gnulib module time
>> +
>> +-BUILT_SOURCES += time.h
>> ++#BUILT_SOURCES += time.h
>> +
>> + # We need the following in order to create <time.h> when the system
>> + # doesn't have one that works with the given compiler.
>> diff --git a/contrib/src/gnutls/rules.mak b/contrib/src/gnutls/rules.mak
>> index 1e12fc4..12292f4 100644
>> --- a/contrib/src/gnutls/rules.mak
>> +++ b/contrib/src/gnutls/rules.mak
>> @@ -19,7 +19,7 @@ ifdef HAVE_WIN32
>>       $(APPLY) $(SRC)/gnutls/gnutls-win32.patch
>>  endif
>>  ifdef HAVE_ANDROID
>> -     $(APPLY) $(SRC)/gnutls/no-gl.patch
>
> What is the problem with the current patch?
> It skips gl/ entirely while your patch only avoids 2 headers.
>
> I am not sure if I tested https but gnutls builds fine already.
>

Yes it builds fine but when --enable-gcrypt is specified the android
build is not linking, already add gnutls and dependencies to LDFLAGS
in Android.mk, saying some functions (appears in gnutls/lib/gl) cannot
be found.

>> +     $(APPLY) $(SRC)/gnutls/no-create-time-h.patch
>>  endif
>>       $(APPLY) $(SRC)/gnutls/gnutls-no-egd.patch
>>       $(UPDATE_AUTOCONFIG)
>> @@ -45,6 +45,9 @@ endif
>>  ifdef HAVE_MACOSX
>>  USE_GCRYPT=1
>>  endif
>> +ifdef HAVE_ANDROID
>> +USE_GCRYPT=1
>> +endif
>>
>>  ifeq (1,$(USE_GCRYPT))
>>  GNUTLS_CONF += --with-libgcrypt
>> @@ -56,7 +59,9 @@ endif
>>  .gnutls: gnutls
>>  ifdef HAVE_ANDROID
>>       $(RECONF)
>> -endif
>> +     cd $< && $(HOSTVARS) gl_cv_header_working_stdint_h=yes CFLAGS="$(CFLAGS) -DSIZE_MAX=4294967295U" ./configure $(GNUTLS_CONF)
>> +else
>>       cd $< && $(HOSTVARS) ./configure $(GNUTLS_CONF)
>> +endif
>>       cd $</lib && $(MAKE) install
>>       touch $@
>
> _______________________________________________
> Android mailing list
> Android at videolan.org
> http://mailman.videolan.org/listinfo/android



-- 
language: Chinese, Japanese, English


More information about the Android mailing list