diff --git a/libtpms-0.5.1-secondary.patch b/libtpms-0.5.1-secondary.patch new file mode 100644 index 0000000..04124d6 --- /dev/null +++ b/libtpms-0.5.1-secondary.patch @@ -0,0 +1,46 @@ +diff -up libtpms-0.5.1/src/tpm_crypto_freebl.c.secondary libtpms-0.5.1/src/tpm_crypto_freebl.c +--- libtpms-0.5.1/src/tpm_crypto_freebl.c.secondary 2011-12-20 17:28:41.000000000 +0100 ++++ libtpms-0.5.1/src/tpm_crypto_freebl.c 2011-12-20 17:43:53.000000000 +0100 +@@ -1841,12 +1841,17 @@ void TPM_SHA1Delete(void **context) + #if defined (__x86_64__) || \ + defined(__amd64__) || \ + defined(__ia64__) || \ +- defined(__powerpc64__) ++ defined(__powerpc64__) || \ ++ defined(__s390x__) || \ ++ defined(__sparc__) && defined(__arch64__) + #define IS_64 + typedef PRUint64 SHA_HW_t; + + #elif defined (__i386__) || \ +- defined (__powerpc__) ++ defined (__powerpc__) || \ ++ defined (__s390__) || \ ++ defined (__sparc__) || \ ++ defined (__arm__) + typedef PRUint32 SHA_HW_t; + #undef IS_64 + +diff -up libtpms-0.5.1/tests/freebl_sha1flattensize.c.secondary libtpms-0.5.1/tests/freebl_sha1flattensize.c +--- libtpms-0.5.1/tests/freebl_sha1flattensize.c.secondary 2011-12-20 18:17:02.000000000 +0100 ++++ libtpms-0.5.1/tests/freebl_sha1flattensize.c 2011-12-20 18:17:32.000000000 +0100 +@@ -8,12 +8,17 @@ + #if defined (__x86_64__) || \ + defined (__amd64__) || \ + defined (__ia64__) || \ +- defined (__powerpc64__) ++ defined (__powerpc64__) || \ ++ defined(__s390x__) || \ ++ defined(__sparc__) && defined(__arch64__) + + #define EXPECTED_LIB_FLATTENSIZE 248 + + #elif defined (__i386__) || \ +- defined (__powerpc__) ++ defined (__powerpc__) || \ ++ defined (__s390__) || \ ++ defined (__sparc__) || \ ++ defined (__arm__) + + #define EXPECTED_LIB_FLATTENSIZE 160 + diff --git a/libtpms.spec b/libtpms.spec index 6525a7d..fb713be 100644 --- a/libtpms.spec +++ b/libtpms.spec @@ -2,7 +2,7 @@ %define name libtpms %define version 0.5.1 -%define release 11 +%define release 12 # Valid crypto subsystems are 'freebl' and 'openssl' %define crypto_subsystem freebl @@ -18,6 +18,7 @@ License: BSD Group: Development/Libraries Url: http://sourceforge.net/projects/ibmswtpm Source: http://bergerstefan.users.sourceforge.net/libtpms/%{name}-%{version}.tar.gz +Patch0: %{name}-0.5.1-secondary.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root %if %{crypto_subsystem} == openssl BuildRequires: openssl-devel @@ -60,6 +61,7 @@ Libtpms header files and documentation. %prep %setup -q +%patch0 -p1 %build @@ -93,6 +95,9 @@ make %{?_smp_mflags} install DESTDIR=${RPM_BUILD_ROOT} %postun -p /sbin/ldconfig %changelog +* Tue Dec 20 2011 Dan HorĂ¡k - 0.5.1-12 +- fix build on secondary arches + * Wed Nov 2 2011 Stefan Berger - 0.5.1-11 - added (lib)gmp as runtime dependency