]> git.pld-linux.org Git - packages/cryptopp.git/commitdiff
- updated to 5.6.5 (fixes CVE-2016-3995) auto/th/cryptopp-5.6.5-1
authorJakub Bogusz <qboosh@pld-linux.org>
Sat, 23 Dec 2017 22:47:46 +0000 (23:47 +0100)
committerJakub Bogusz <qboosh@pld-linux.org>
Sat, 23 Dec 2017 22:47:46 +0000 (23:47 +0100)
- removed obsolete libdir patch (cmake support dropped)
- added opt patch (disable -march=native)

cryptopp-libdir.patch [deleted file]
cryptopp-opt.patch [new file with mode: 0644]
cryptopp.spec

diff --git a/cryptopp-libdir.patch b/cryptopp-libdir.patch
deleted file mode 100644 (file)
index 91b1c39..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
---- cryptopp-5.6.4/CMakeLists.txt.orig 2016-09-11 09:07:48.000000000 +0200
-+++ cryptopp-5.6.4/CMakeLists.txt      2017-06-06 21:43:31.328699739 +0200
-@@ -306,8 +306,8 @@
- if(NOT CMAKE_VERSION VERSION_LESS 2.8.8)      # CMakePackageConfigHelpers is supported from 2.8.8\r
-       include(CMakePackageConfigHelpers)\r
-       write_basic_package_version_file("${PROJECT_BINARY_DIR}/cryptopp-config-version.cmake" VERSION ${cryptopp_VERSION_MAJOR}.${cryptopp_VERSION_MINOR}.${cryptopp_VERSION_PATCH} COMPATIBILITY SameMajorVersion)\r
--      install(FILES cryptopp-config.cmake ${PROJECT_BINARY_DIR}/cryptopp-config-version.cmake DESTINATION "lib/cmake/cryptopp")\r
--      install(EXPORT ${export_name} DESTINATION "lib/cmake/cryptopp")\r
-+      install(FILES cryptopp-config.cmake ${PROJECT_BINARY_DIR}/cryptopp-config-version.cmake DESTINATION "lib${LIB_SUFFIX}/cmake/cryptopp")\r
-+      install(EXPORT ${export_name} DESTINATION "lib${LIB_SUFFIX}/cmake/cryptopp")\r
- endif()\r
\r
- # Tests\r
diff --git a/cryptopp-opt.patch b/cryptopp-opt.patch
new file mode 100644 (file)
index 0000000..180ce73
--- /dev/null
@@ -0,0 +1,14 @@
+--- cryptopp-5.6.5/GNUmakefile.orig    2017-10-17 02:56:28.000000000 +0200
++++ cryptopp-5.6.5/GNUmakefile 2017-12-23 23:15:44.213704213 +0100
+@@ -127,9 +127,9 @@
+ # Guard use of -march=native
+ ifeq ($(GCC42_OR_LATER)$(IS_NETBSD),10)
+-   CXXFLAGS += -march=native
++   #CXXFLAGS += -march=native
+ else ifneq ($(CLANG_COMPILER)$(INTEL_COMPILER),00)
+-   CXXFLAGS += -march=native
++   #CXXFLAGS += -march=native
+ else
+   # GCC 3.3 and "unknown option -march="
+   # Ubuntu GCC 4.1 compiler crash with -march=native
index 15876d150ebacc4e6e79b16379a95af49204d6f4..807c1961410b076c0b722f79422ca52d724b2278 100644 (file)
@@ -1,22 +1,20 @@
 #
 # Conditional build:
-%bcond_without asm             # disable x86 assembly code
 %bcond_without tests           # build without tests
 
-%define                orig_ver        564
 Summary:       Cryptopp Library - a free C++ class library of cryptographic schemes
 Summary(pl.UTF-8):     Cryptopp - biblioteka klas C++ dostarczająca narzędzia do kryptografii
 Name:          cryptopp
-Version:       5.6.4
+Version:       5.6.5
+%define         f_ver  %(echo %{version} | tr -d .)
 Release:       1
 License:       Boost v1.0 (BSD-like)
 Group:         Libraries
-Source0:       http://downloads.sourceforge.net/cryptopp/%{name}%{orig_ver}.zip
-# Source0-md5: 4ee7e5cdd4a45a14756c169eaf2a77fc
+Source0:       http://downloads.sourceforge.net/cryptopp/%{name}%{f_ver}.zip
+# Source0-md5: 839aa27c70fa70037185ae7be8d8d24d
 Source1:       %{name}.pc
-Patch0:                %{name}-libdir.patch
+Patch0:                %{name}-opt.patch
 URL:           http://www.cryptopp.com/
-BuildRequires: cmake >= 2.8.5
 BuildRequires: libstdc++-devel
 BuildRequires: unzip
 Obsoletes:     cryptopp-progs
@@ -58,22 +56,21 @@ Statyczna biblioteka Cryptopp.
 %patch0 -p1
 
 %build
-install -d build
-cd build
-%cmake .. \
-       %{!?with_asm:-DDISABLE_ASM=ON}
-
-%{__make}
+CXXFLAGS="%{rpmcxxflags}" \
+%{__make} shared static %{?with_tests:cryptest.exe} \
+       CXX="%{__cxx}"
 
 %if %{with tests}
-ctest -V
+%{__make} test
 %endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
-%{__make} -C build install \
-       DESTDIR=$RPM_BUILD_ROOT
+%{__make} install \
+       DESTDIR=$RPM_BUILD_ROOT \
+       PREFIX=%{_prefix} \
+       LIBDIR=%{_libdir}
 
 install -d $RPM_BUILD_ROOT%{_pkgconfigdir}
 sed -e "
@@ -92,17 +89,21 @@ rm -rf $RPM_BUILD_ROOT
 %post  -p /sbin/ldconfig
 %postun        -p /sbin/ldconfig
 
+%triggerpostun -- cryptopp < 5.6.5
+rm -f %{_libdir}/libcryptopp.so.5.6
+/sbin/ldconfig
+
 %files
 %defattr(644,root,root,755)
 %doc License.txt Readme.txt
-%attr(755,root,root) %{_libdir}/libcryptopp.so.5.6
+%attr(755,root,root) %{_libdir}/libcryptopp.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libcryptopp.so.5.6
 
 %files devel
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_libdir}/libcryptopp.so
 %{_includedir}/cryptopp
 %{_pkgconfigdir}/cryptopp.pc
-%{_libdir}/cmake/cryptopp
 
 %files static
 %defattr(644,root,root,755)
This page took 0.151813 seconds and 4 git commands to generate.