[packages/crcutil] fix build on amd64

glen glen at pld-linux.org
Mon Jul 4 09:10:12 CEST 2016


commit ab174a3e8d6daab0d09a6543842b3b00db36cb47
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Mon Jul 4 10:08:18 2016 +0300

    fix build on amd64

 crcutil.spec        |  5 +++++
 detect-mcrc32.patch | 34 ++++++++++++++++++++++++++++++++++
 2 files changed, 39 insertions(+)
---
diff --git a/crcutil.spec b/crcutil.spec
index 8d7119f..8eb3346 100644
--- a/crcutil.spec
+++ b/crcutil.spec
@@ -11,6 +11,9 @@ License:	Apache v2.0
 Group:		Libraries
 Source0:	https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/crcutil/%{name}-%{version}.tar.gz
 # Source0-md5:	94cb7014d4078c138d3c9646fcf1fec5
+Patch0:		detect-mcrc32.patch
+Patch1:		http://storage.googleapis.com/google-code-attachments/crcutil/issue-9/comment-0/build-fix-tests.patch
+# Patch1-md5:	6b88d4eeef7e418c1eb6fc0ab729dca2
 URL:		https://code.google.com/archive/p/crcutil/
 BuildRequires:	autoconf
 BuildRequires:	automake
@@ -65,6 +68,8 @@ Dokumentacja API biblioteki %{name}.
 
 %prep
 %setup -q
+%patch0 -p1
+%patch1 -p1
 
 %build
 %{__aclocal}
diff --git a/detect-mcrc32.patch b/detect-mcrc32.patch
new file mode 100644
index 0000000..8fd90c4
--- /dev/null
+++ b/detect-mcrc32.patch
@@ -0,0 +1,34 @@
+https://code.google.com/archive/p/crcutil/issues/8
+http://storage.googleapis.com/google-code-attachments/crcutil/issue-8/comment-0/detect-mcrc32.patch
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -31,8 +31,20 @@
+ AC_C_INLINE
+ AC_TYPE_SIZE_T
+ AC_CHECK_TYPES([ptrdiff_t])
+ 
++my_save_cflags="$CFLAGS"
++CFLAGS=-mcrc32
++AC_MSG_CHECKING([whether CC supports -mcrc32])
++AC_COMPILE_IFELSE(
++    [AC_LANG_PROGRAM([])],
++    [AC_MSG_RESULT([yes])]
++    [FLAG_MCRC32=-mcrc32],
++    [AC_MSG_RESULT([no])]
++)
++CFLAGS="$my_save_cflags"
++AC_SUBST([FLAG_MCRC32])
++
+ # Checks for library functions.
+ AC_CHECK_FUNCS([memset strchr strrchr])
+ 
+ AC_OUTPUT
+--- crcutil-1.0/Makefile.am~	2011-01-25 02:07:37.000000000 +0200
++++ crcutil-1.0/Makefile.am	2016-07-04 10:05:59.411360347 +0300
+@@ -1,4 +1,4 @@
+-AM_CXXFLAGS=-DCRCUTIL_USE_MM_CRC32=1 -Wall -msse2 -Icode
++AM_CXXFLAGS=-DCRCUTIL_USE_MM_CRC32=1 -Wall $(FLAG_MCRC32) -Icode
+ AM_CFLAGS=$(AM_CXXFLAGS)
+ check_PROGRAMS=crcutil_ut
+ TESTS=crcutil_ut
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/crcutil.git/commitdiff/c9024be4a4e2263352ea07806f0ceced1bec018f



More information about the pld-cvs-commit mailing list