Update to 1.5.0 and added win64 support

epel9
Erik van Pienbroek 13 years ago
parent cab705e017
commit 83c75eeded

1
.gitignore vendored

@ -1 +1,2 @@
libgcrypt-1.4.4.tar.bz2
/libgcrypt-1.5.0-hobbled.tar.bz2

@ -1,13 +0,0 @@
Do not abort when the fips mode flag is simply inaccessible because of
insufficient permissions.
diff -up libgcrypt-1.4.4/src/fips.c.no-access libgcrypt-1.4.4/src/fips.c
--- libgcrypt-1.4.4/src/fips.c.no-access 2009-01-29 17:37:12.000000000 +0100
+++ libgcrypt-1.4.4/src/fips.c 2009-01-29 17:37:15.000000000 +0100
@@ -155,6 +155,7 @@ _gcry_initialize_fips_mode (int force)
fclose (fp);
}
else if ((saved_errno = errno) != ENOENT
+ && saved_errno != EACCES
&& !access ("/proc/version", F_OK) )
{
/* Problem reading the fips file despite that we have the proc

@ -0,0 +1,11 @@
--- random/rndw32.c.orig 2011-07-04 19:11:18.137525831 +0200
+++ random/rndw32.c 2011-07-04 19:11:40.785404249 +0200
@@ -887,7 +887,7 @@
{
HANDLE handle;
FILETIME creationTime, exitTime, kernelTime, userTime;
- DWORD minimumWorkingSetSize, maximumWorkingSetSize;
+ PSIZE_T minimumWorkingSetSize, maximumWorkingSetSize;
handle = GetCurrentThread ();
GetThreadTimes (handle, &creationTime, &exitTime,

@ -4,13 +4,12 @@
+EXPORTS
;; libgcrypt.defs - Exported symbols for W32
;; Copyright (C) 2003, 2007 Free Software Foundation, Inc.
;;
@@ -21,8 +22,6 @@
;; Note: This file should be updated manually and the ordinals shall
;;
@@ -22,7 +23,6 @@
;; never be changed. Also check libgcrypt.vers and visibility.h.
-
-EXPORTS
gcry_check_version @1
gcry_control @2

@ -1,26 +1,29 @@
%define __strip %{mingw32_strip}
%define __objdump %{mingw32_objdump}
%?mingw_package_header
%global mingw_build_win32 1
%global mingw_build_win64 1
%define run_tests 0
Name: mingw-libgcrypt
Version: 1.4.4
Release: 9%{?dist}
Version: 1.5.0
Release: 1%{?dist}
Summary: MinGW Windows gcrypt encryption library
License: LGPLv2+ and GPLv2+
Group: Development/Libraries
URL: ftp://ftp.gnupg.org/gcrypt/libgcrypt/
Source0: libgcrypt-%{version}-hobbled.tar.bz2
# The original libgcrypt sources now contain potentially patented ECC
# cipher support. We have to remove it in the tarball we ship with
# the hobble-libgcrypt script.
Source0: ftp://ftp.gnupg.org/gcrypt/libgcrypt/libgcrypt-%{version}.tar.bz2
Source1: ftp://ftp.gnupg.org/gcrypt/libgcrypt/libgcrypt-%{version}.tar.bz2.sig
#Source0: ftp://ftp.gnupg.org/gcrypt/libgcrypt/libgcrypt-%{version}.tar.bz2
#Source1: ftp://ftp.gnupg.org/gcrypt/libgcrypt/libgcrypt-%{version}.tar.bz2.sig
Source2: wk@g10code.com
Source3: hobble-libgcrypt
Patch1: libgcrypt-1.4.4-fips-no-access.patch
Patch0: libgcrypt-mingw64-use-correct-datatype-for-GetProcessWorkingSet.patch
# Workaround a bug in libtool:
# libgcrypt-use-correct-def-file.patch
@ -28,11 +31,15 @@ Patch2: libgcrypt-use-correct-def-file.patch
BuildArch: noarch
BuildRequires: mingw32-filesystem >= 49
BuildRequires: mingw32-filesystem >= 95
BuildRequires: mingw32-gcc
BuildRequires: mingw32-binutils
BuildRequires: mingw32-libgpg-error
BuildRequires: mingw32-dlfcn
BuildRequires: mingw64-filesystem >= 95
BuildRequires: mingw64-gcc
BuildRequires: mingw64-binutils
BuildRequires: mingw64-libgpg-error
%if %run_tests
BuildRequires: wine
@ -46,6 +53,7 @@ in GNU Privacy Guard.
This is a Windows cross-compiled version of the library.
# Win32
%package -n mingw32-libgcrypt
Summary: MinGW Windows gcrypt encryption library
@ -55,19 +63,31 @@ in GNU Privacy Guard.
This is a Windows cross-compiled version of the library.
# Win64
%package -n mingw64-libgcrypt
Summary: MinGW Windows gcrypt encryption library
%description -n mingw64-libgcrypt
Libgcrypt is a general purpose crypto library based on the code used
in GNU Privacy Guard.
This is a Windows cross-compiled version of the library.
%?mingw_debug_package
%prep
%setup -q -n libgcrypt-%{version}
%{SOURCE3}
%patch1 -p1 -b .no-access
%patch0 -p0 -b .win64
%patch2 -p0 -b .def
%build
%{mingw32_configure} \
--disable-static \
--enable-pubkey-ciphers='dsa elgamal rsa'
make %{?_smp_mflags}
MINGW64_CONFIGURE_ARGS="--disable-asm"
%mingw_configure --disable-static --enable-pubkey-ciphers='dsa elgamal rsa'
%mingw_make %{?_smp_mflags}
%check
@ -75,8 +95,8 @@ make %{?_smp_mflags}
# Stupid Wine doesn't load DLLs from the PATH any
# more, so libtool scripts don't work. As a result
# we need to use the following Big Hack.
make -C tests check ||:
pushd src/.libs
make -C build_win32/tests check ||:
pushd build_win32/src/.libs
for t in $(pwd)/../../tests/*.exe; do
wine $t
done
@ -85,13 +105,17 @@ popd
%install
make DESTDIR=$RPM_BUILD_ROOT install
%mingw_make_install DESTDIR=$RPM_BUILD_ROOT
# Remove info pages which duplicate what is in Fedora natively.
rm -rf $RPM_BUILD_ROOT%{mingw32_infodir}
rm -rf $RPM_BUILD_ROOT%{mingw64_infodir}
rm $RPM_BUILD_ROOT%{mingw32_libdir}/libgcrypt.def
rm $RPM_BUILD_ROOT%{mingw64_libdir}/libgcrypt.def
rm $RPM_BUILD_ROOT%{mingw32_libdir}/libgcrypt.la
rm $RPM_BUILD_ROOT%{mingw64_libdir}/libgcrypt.la
%files -n mingw32-libgcrypt
@ -105,8 +129,23 @@ rm $RPM_BUILD_ROOT%{mingw32_libdir}/libgcrypt.la
%{mingw32_includedir}/gcrypt.h
%{mingw32_datadir}/aclocal/libgcrypt.m4
%files -n mingw64-libgcrypt
%doc COPYING COPYING.LIB
%{mingw64_bindir}/dumpsexp.exe
%{mingw64_bindir}/hmac256.exe
%{mingw64_bindir}/libgcrypt-11.dll
%{mingw64_bindir}/libgcrypt-config
%{mingw64_libdir}/libgcrypt.dll.a
%{mingw64_includedir}/gcrypt-module.h
%{mingw64_includedir}/gcrypt.h
%{mingw64_datadir}/aclocal/libgcrypt.m4
%changelog
* Sun Mar 11 2012 Erik van Pienbroek <epienbro@fedoraproject.org> - 1.5.0-1
- Update to 1.5.0
- Added win64 support
* Fri Mar 09 2012 Kalev Lember <kalevlember@gmail.com> - 1.4.4-9
- Remove .la files

@ -1 +1 @@
34105aa927e23c217741966496b97e67 libgcrypt-1.4.4.tar.bz2
35a73c1f2616ad904108ed8645c82f4c libgcrypt-1.5.0-hobbled.tar.bz2

Loading…
Cancel
Save