[packages/AMD] - added externc patch (avoid forcing extern C for system headers, could cause problems in C++ code -

qboosh qboosh at pld-linux.org
Fri Nov 21 20:07:50 CET 2014


commit 8251bd03ceda77f97674c377c29fa9caad72b1fb
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Fri Nov 21 20:08:34 2014 +0100

    - added externc patch (avoid forcing extern C for system headers, could cause problems in C++ code
    - release 2

 AMD.spec          |  4 +++-
 amd-externc.patch | 24 ++++++++++++++++++++++++
 2 files changed, 27 insertions(+), 1 deletion(-)
---
diff --git a/AMD.spec b/AMD.spec
index 9c2c870..bded74e 100644
--- a/AMD.spec
+++ b/AMD.spec
@@ -2,13 +2,14 @@ Summary:	AMD: Approximate Minimum Degree
 Summary(pl.UTF-8):	AMD - przybliżony algorytm minimalnego stopnia
 Name:		AMD
 Version:	2.4.0
-Release:	1
+Release:	2
 License:	LGPL v2.1+
 Group:		Libraries
 Source0:	http://www.cise.ufl.edu/research/sparse/amd/%{name}-%{version}.tar.gz
 # Source0-md5:	5044de774a2f7804d09ac0d5134d6884
 Patch0:		amd-ufconfig.patch
 Patch1:		amd-shared.patch
+Patch2:		amd-externc.patch
 URL:		http://www.cise.ufl.edu/research/sparse/amd/
 BuildRequires:	SuiteSparse_config >= 4.3.0
 BuildRequires:	gcc-fortran
@@ -95,6 +96,7 @@ Wersja statycznej biblioteki AMD dla programów napisanych w Fortranie.
 %setup -q -n %{name}
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
 
 %build
 %{__make} \
diff --git a/amd-externc.patch b/amd-externc.patch
new file mode 100644
index 0000000..a909d8c
--- /dev/null
+++ b/amd-externc.patch
@@ -0,0 +1,24 @@
+--- AMD/Include/amd.h.orig	2014-11-21 18:37:31.104213554 +0100
++++ AMD/Include/amd.h	2014-11-21 18:46:11.707525119 +0100
+@@ -35,16 +35,16 @@
+ #ifndef AMD_H
+ #define AMD_H
+ 
+-/* make it easy for C++ programs to include AMD */
+-#ifdef __cplusplus
+-extern "C" {
+-#endif
+-
+ /* get the definition of size_t: */
+ #include <stddef.h>
+ 
+ #include <SuiteSparse_config.h>
+ 
++/* make it easy for C++ programs to include AMD */
++#ifdef __cplusplus
++extern "C" {
++#endif
++
+ int amd_order                  /* returns AMD_OK, AMD_OK_BUT_JUMBLED,
+                                 * AMD_INVALID, or AMD_OUT_OF_MEMORY */
+ (
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/AMD.git/commitdiff/8251bd03ceda77f97674c377c29fa9caad72b1fb



More information about the pld-cvs-commit mailing list