1.1 --- a/gcrypt/gcrypt.spec Wed Feb 18 16:40:58 2009 +0100 1.2 +++ b/gcrypt/gcrypt.spec Sat Feb 21 16:39:01 2009 +0100 1.3 @@ -32,10 +32,15 @@ 1.4 Group: Cryptography 1.5 License: LGPL 1.6 Version: 1.4.3 1.7 -Release: 20080921 1.8 +Release: 20090106 1.9 + 1.10 +# package options 1.11 +%option with_idea no 1.12 1.13 # list of sources 1.14 Source0: ftp://ftp.gnupg.org/gcrypt/libgcrypt/libgcrypt-%{version}.tar.gz 1.15 +Source1: idea.c 1.16 +Patch0: gcrypt.patch 1.17 1.18 # build information 1.19 Prefix: %{l_prefix} 1.20 @@ -57,6 +62,22 @@ 1.21 1.22 %prep 1.23 %setup -q -n libgcrypt-%{version} 1.24 + %patch -p0 1.25 +%if "%{with_idea}" == "yes" 1.26 + echo $PWD 1.27 + pwd 1.28 + echo `pwd` 1.29 + cp %{SOURCE idea.c} cipher/ 1.30 + %{l_shtool} subst \ 1.31 + -e 's;^\(EXTRA_libcipher_la_SOURCES =\);\1 idea.c;' \ 1.32 + -e 's;^\(GCRYPT_MODULES = .*[^\ \t]\)[\ \t]*$;\1 idea.lo;' \ 1.33 + -e 's;^\(GCRYPT_CIPHERS = .*[^\ \t]\)[\ \t]*$;\1 idea.lo;' \ 1.34 + -e 's;^\(LIBGCRYPT_CIPHERS = .*[^\ \t]\)[\ \t]*$;\1 idea;' \ 1.35 + cipher/Makefile.in 1.36 + %{l_shtool} subst \ 1.37 + -e 's;^\(available_ciphers="arcfour [^"][^"]*\)";\1 idea";' \ 1.38 + configure 1.39 +%endif 1.40 1.41 %build 1.42 ( echo "ac_cv_lib_pthread_pthread_create=no" 1.43 @@ -64,6 +85,9 @@ 1.44 ) >config.cache 1.45 CC="%{l_cc}" \ 1.46 CFLAGS="%{l_cflags -O}" \ 1.47 +%if "%{with_idea}" == "yes" 1.48 + CPPFLAGS="-DUSE_IDEA $CPPFLAGS" \ 1.49 +%endif 1.50 GREP="grep" \ 1.51 ./configure \ 1.52 --cache-file=./config.cache \