Compare commits
1 Commits
| Author | SHA256 | Date | |
|---|---|---|---|
| 4d306914a0 |
74
cxx.patch
Normal file
74
cxx.patch
Normal file
@@ -0,0 +1,74 @@
|
||||
From: Jan Engelhardt <ej@inai.de>
|
||||
Date: 2025-06-17 12:40:56.762725897 +0200
|
||||
|
||||
Don't wrap #include statements in extern "C".
|
||||
This causes problems like
|
||||
|
||||
```
|
||||
/usr/lib64/gcc/x86_64-suse-linux/15/include/omp.h:448:1: error: template with C linkage
|
||||
448 | template<typename __T, omp_allocator_handle_t __Handle>
|
||||
rsb_common.h:32:1: note: ‘extern "C"’ linkage started here
|
||||
32 | extern "C" {
|
||||
```
|
||||
|
||||
under at least gcc-15.
|
||||
|
||||
---
|
||||
rsb_common.h | 16 ++++++++++++----
|
||||
1 file changed, 12 insertions(+), 4 deletions(-)
|
||||
|
||||
Index: librsb-1.3.0.2/rsb_common.h
|
||||
===================================================================
|
||||
--- librsb-1.3.0.2.orig/rsb_common.h
|
||||
+++ librsb-1.3.0.2/rsb_common.h
|
||||
@@ -29,9 +29,6 @@ If not, see <http://www.gnu.org/licenses
|
||||
#define RSB_COMMON_H_INCLUDED
|
||||
|
||||
#ifdef __cplusplus
|
||||
-extern "C" {
|
||||
-#endif /* __cplusplus */
|
||||
-#ifdef __cplusplus
|
||||
#define restrict /* for now, the restrict keyword is not allowed in C++ */
|
||||
#endif /* __cplusplus */
|
||||
/**
|
||||
@@ -216,7 +213,13 @@ typedef int rsb_int;
|
||||
#if RSB_WANT_ACTION
|
||||
#define RSB_SHALL_QUIT ( rsb__quit_rsbench != 0 )
|
||||
#define RSB_INTERNALS_RSBENCH_HEAD_DECLS extern int rsb__quit_rsbench;
|
||||
+#ifdef __cplusplus
|
||||
+extern "C" {
|
||||
+#endif
|
||||
void rsb__sigh(int signal);
|
||||
+#ifdef __cplusplus
|
||||
+}
|
||||
+#endif
|
||||
#define RSB_SIGHR rsb__sigr();
|
||||
#else /* RSB_WANT_ACTION */
|
||||
#define RSB_SHALL_QUIT ( 0 != 0 )
|
||||
@@ -1420,12 +1423,18 @@ struct rsb_optrace_t {
|
||||
#define RSB_MARF_EPS_NO_TEXT (0x00000800) /*!< #rsb_marf_t No text in EPS. */
|
||||
#define RSB_MARF_LATEX_RECURSION (0x00001000) /*!< #rsb_marf_t Matrix recursion as LaTeX. */
|
||||
|
||||
+#ifdef __cplusplus
|
||||
+extern "C" {
|
||||
+#endif
|
||||
rsb_err_t rsb__adddir(rsb_char_t ** filenameap, rsb_int_t * filenamenp, const rsb_char_t * matrixpath, rsb_flags_t faflags);
|
||||
void rsb__setenv(const rsb_char_t * var_val);
|
||||
rsb_real_t rsb__getenv_real_t(const char*envv, const rsb_real_t altv);
|
||||
rsb_int_t rsb__getenv_int_t(const char*envv, const rsb_int_t altv);
|
||||
const rsb_char_t * rsb__getenv_str(const char*envv, const rsb_char_t* altv);
|
||||
rsb_char_t rsb__getenv_char(const char *envv, const rsb_char_t altv);
|
||||
+#ifdef __cplusplus
|
||||
+}
|
||||
+#endif
|
||||
|
||||
#ifdef RSB_HAVE_ASSERT_H
|
||||
#ifdef RSB_USE_ASSERT
|
||||
@@ -1510,7 +1519,6 @@ rsb_char_t rsb__getenv_char(const char *
|
||||
#include "rsb_tune.h" /* */
|
||||
|
||||
#ifdef __cplusplus
|
||||
-}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* RSB_COMMON_H_INCLUDED */
|
||||
@@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Jun 17 10:41:29 UTC 2025 - Jan Engelhardt <jengelh@inai.de>
|
||||
|
||||
- Add cxx.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Feb 6 15:48:31 UTC 2023 - Jan Engelhardt <jengelh@inai.de>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package librsb
|
||||
#
|
||||
# Copyright (c) 2023 SUSE LLC
|
||||
# Copyright (c) 2025 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -24,12 +24,12 @@ Summary: Shared memory parallel sparse matrix and sparse BLAS library
|
||||
License: LGPL-3.0-or-later
|
||||
Group: Productivity/Scientific/Math
|
||||
URL: http://librsb.sf.net/
|
||||
|
||||
Source: http://downloads.sf.net/%name/%name-%version.tar.gz
|
||||
Source2: http://downloads.sf.net/%name/%name-%version.tar.gz.asc
|
||||
Source9: %name.keyring
|
||||
Patch1: pun.diff
|
||||
Patch2: reproducible.patch
|
||||
Patch3: cxx.patch
|
||||
BuildRequires: automake
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: gcc-c++
|
||||
@@ -86,8 +86,7 @@ autoreconf -fi
|
||||
rm -f "%buildroot/%_libdir"/*.la
|
||||
%fdupes %buildroot/%_prefix
|
||||
|
||||
%post -n %lname -p /sbin/ldconfig
|
||||
%postun -n %lname -p /sbin/ldconfig
|
||||
%ldconfig_scriptlets -n %lname
|
||||
|
||||
%files -n %lname
|
||||
%_libdir/librsb.so.0*
|
||||
|
||||
Reference in New Issue
Block a user