diff -r 5e7005042079 -r 2f8ffdf7658b gcrypt/gcrypt.spec --- a/gcrypt/gcrypt.spec Wed Feb 18 16:40:58 2009 +0100 +++ b/gcrypt/gcrypt.spec Sat Feb 21 16:39:01 2009 +0100 @@ -32,10 +32,15 @@ Group: Cryptography License: LGPL Version: 1.4.3 -Release: 20080921 +Release: 20090106 + +# package options +%option with_idea no # list of sources Source0: ftp://ftp.gnupg.org/gcrypt/libgcrypt/libgcrypt-%{version}.tar.gz +Source1: idea.c +Patch0: gcrypt.patch # build information Prefix: %{l_prefix} @@ -57,6 +62,22 @@ %prep %setup -q -n libgcrypt-%{version} + %patch -p0 +%if "%{with_idea}" == "yes" + echo $PWD + pwd + echo `pwd` + cp %{SOURCE idea.c} cipher/ + %{l_shtool} subst \ + -e 's;^\(EXTRA_libcipher_la_SOURCES =\);\1 idea.c;' \ + -e 's;^\(GCRYPT_MODULES = .*[^\ \t]\)[\ \t]*$;\1 idea.lo;' \ + -e 's;^\(GCRYPT_CIPHERS = .*[^\ \t]\)[\ \t]*$;\1 idea.lo;' \ + -e 's;^\(LIBGCRYPT_CIPHERS = .*[^\ \t]\)[\ \t]*$;\1 idea;' \ + cipher/Makefile.in + %{l_shtool} subst \ + -e 's;^\(available_ciphers="arcfour [^"][^"]*\)";\1 idea";' \ + configure +%endif %build ( echo "ac_cv_lib_pthread_pthread_create=no" @@ -64,6 +85,9 @@ ) >config.cache CC="%{l_cc}" \ CFLAGS="%{l_cflags -O}" \ +%if "%{with_idea}" == "yes" + CPPFLAGS="-DUSE_IDEA $CPPFLAGS" \ +%endif GREP="grep" \ ./configure \ --cache-file=./config.cache \