[mingw-libgcrypt] Update to 1.5.0 and added win64 support

epienbro epienbro at fedoraproject.org
Sun Mar 11 15:35:51 UTC 2012


commit 83c75eedede2b01a23fa636d28e376159ea202dd
Author: Erik van Pienbroek <epienbro at fedoraproject.org>
Date:   Sun Mar 11 16:35:47 2012 +0100

    Update to 1.5.0 and added win64 support

 .gitignore                                         |    1 +
 libgcrypt-1.4.4-fips-no-access.patch               |   13 ----
 ...correct-datatype-for-GetProcessWorkingSet.patch |   11 +++
 libgcrypt-use-correct-def-file.patch               |    9 +--
 mingw-libgcrypt.spec                               |   73 +++++++++++++++-----
 sources                                            |    2 +-
 6 files changed, 73 insertions(+), 36 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 4358808..8066b9f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
 libgcrypt-1.4.4.tar.bz2
+/libgcrypt-1.5.0-hobbled.tar.bz2
diff --git a/libgcrypt-mingw64-use-correct-datatype-for-GetProcessWorkingSet.patch b/libgcrypt-mingw64-use-correct-datatype-for-GetProcessWorkingSet.patch
new file mode 100644
index 0000000..7d0c9fb
--- /dev/null
+++ b/libgcrypt-mingw64-use-correct-datatype-for-GetProcessWorkingSet.patch
@@ -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,
diff --git a/libgcrypt-use-correct-def-file.patch b/libgcrypt-use-correct-def-file.patch
index 7248025..86fd86d 100644
--- a/libgcrypt-use-correct-def-file.patch
+++ b/libgcrypt-use-correct-def-file.patch
@@ -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
-       
+ 
diff --git a/mingw-libgcrypt.spec b/mingw-libgcrypt.spec
index d008f1f..f4516e3 100644
--- a/mingw-libgcrypt.spec
+++ b/mingw-libgcrypt.spec
@@ -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 at 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 at fedoraproject.org> - 1.5.0-1
+- Update to 1.5.0
+- Added win64 support
+
 * Fri Mar 09 2012 Kalev Lember <kalevlember at gmail.com> - 1.4.4-9
 - Remove .la files
 
diff --git a/sources b/sources
index 72eac4f..28984ca 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-34105aa927e23c217741966496b97e67  libgcrypt-1.4.4.tar.bz2
+35a73c1f2616ad904108ed8645c82f4c  libgcrypt-1.5.0-hobbled.tar.bz2


More information about the scm-commits mailing list