Couple changes:
- Change patch to move math.h include into SuiteSparse_config.c - Fix linkage and library file permission issues
This commit is contained in:
parent
94a7461fdd
commit
f112a00452
@ -1,22 +0,0 @@
|
||||
diff -up SuiteSparse/SuiteSparse_config/SuiteSparse_config.h.include SuiteSparse/SuiteSparse_config/SuiteSparse_config.h
|
||||
--- SuiteSparse/SuiteSparse_config/SuiteSparse_config.h.include 2014-07-16 15:35:20.000000000 -0600
|
||||
+++ SuiteSparse/SuiteSparse_config/SuiteSparse_config.h 2014-09-13 11:28:42.480821742 -0600
|
||||
@@ -38,14 +38,14 @@
|
||||
#ifndef SUITESPARSE_CONFIG_H
|
||||
#define SUITESPARSE_CONFIG_H
|
||||
|
||||
-#ifdef __cplusplus
|
||||
-extern "C" {
|
||||
-#endif
|
||||
-
|
||||
#include <limits.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
|
||||
+#ifdef __cplusplus
|
||||
+extern "C" {
|
||||
+#endif
|
||||
+
|
||||
/* ========================================================================== */
|
||||
/* === SuiteSparse_long ===================================================== */
|
||||
/* ========================================================================== */
|
||||
22
suitesparse-math.patch
Normal file
22
suitesparse-math.patch
Normal file
@ -0,0 +1,22 @@
|
||||
diff -up SuiteSparse/SuiteSparse_config/SuiteSparse_config.c.math SuiteSparse/SuiteSparse_config/SuiteSparse_config.c
|
||||
--- SuiteSparse/SuiteSparse_config/SuiteSparse_config.c.math 2014-03-21 13:15:22.000000000 -0600
|
||||
+++ SuiteSparse/SuiteSparse_config/SuiteSparse_config.c 2014-09-15 16:53:50.243297000 -0600
|
||||
@@ -9,6 +9,7 @@
|
||||
* Author: Timothy A. Davis.
|
||||
*/
|
||||
|
||||
+#include <math.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifndef NPRINT
|
||||
diff -up SuiteSparse/SuiteSparse_config/SuiteSparse_config.h.math SuiteSparse/SuiteSparse_config/SuiteSparse_config.h
|
||||
--- SuiteSparse/SuiteSparse_config/SuiteSparse_config.h.math 2014-07-16 15:35:20.000000000 -0600
|
||||
+++ SuiteSparse/SuiteSparse_config/SuiteSparse_config.h 2014-09-15 16:23:31.802267503 -0600
|
||||
@@ -44,7 +44,6 @@ extern "C" {
|
||||
|
||||
#include <limits.h>
|
||||
#include <stdlib.h>
|
||||
-#include <math.h>
|
||||
|
||||
/* ========================================================================== */
|
||||
/* === SuiteSparse_long ===================================================== */
|
||||
@ -12,16 +12,15 @@
|
||||
|
||||
Name: suitesparse
|
||||
Version: 4.3.1
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?dist}
|
||||
Summary: A collection of sparse matrix libraries
|
||||
|
||||
Group: System Environment/Libraries
|
||||
License: LGPLv2+ and GPLv2+
|
||||
URL: http://www.cise.ufl.edu/research/sparse/SuiteSparse
|
||||
Source0: http://www.cise.ufl.edu/research/sparse/SuiteSparse/SuiteSparse-%{version}.tar.gz
|
||||
# Move includes out of extern "C" to allow octave compilation
|
||||
# https://savannah.gnu.org/bugs/?43063
|
||||
Patch0: suitesparse-include.patch
|
||||
# Move #include <math.h> out of StuiteSparse_config.h and into SuiteSparse_config.c
|
||||
Patch0: suitesparse-math.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
|
||||
%if %{with atlas310}
|
||||
@ -96,7 +95,7 @@ This package contains documentation files for %{name}.
|
||||
|
||||
%prep
|
||||
%setup -q -n SuiteSparse
|
||||
%patch0 -p1 -b .include
|
||||
%patch0 -p1 -b .math
|
||||
|
||||
%build
|
||||
%define amd_version 2.4.0
|
||||
@ -145,7 +144,7 @@ pushd SuiteSparse_config
|
||||
ar x libsuitesparseconfig.a
|
||||
pushd ../Lib
|
||||
gcc -shared -Wl,-soname,libsuitesparseconfig.so.%{SuiteSparse_config_major} -o \
|
||||
libsuitesparseconfig.so.%{SuiteSparse_config_ver} ../SuiteSparse_config/*.o
|
||||
libsuitesparseconfig.so.%{SuiteSparse_config_ver} ../SuiteSparse_config/*.o -lm
|
||||
ln -sf libsuitesparseconfig.so.%{SuiteSparse_config_ver} libsuitesparseconfig.so.%{SuiteSparse_config_major}
|
||||
ln -sf libsuitesparseconfig.so.%{SuiteSparse_config_ver} libsuitesparseconfig.so
|
||||
cp -p ../SuiteSparse_config/*.a ./
|
||||
@ -159,7 +158,8 @@ pushd AMD
|
||||
popd
|
||||
pushd ../Lib
|
||||
gcc -shared -Wl,-soname,libamd.so.%{amd_version_major} -o \
|
||||
libamd.so.%{amd_version} ../AMD/Lib/*.o -lm
|
||||
libamd.so.%{amd_version} ../AMD/Lib/*.o \
|
||||
libsuitesparseconfig.so.%{SuiteSparse_config_major} -lm
|
||||
ln -sf libamd.so.%{amd_version} libamd.so.%{amd_version_major}
|
||||
ln -sf libamd.so.%{amd_version} libamd.so
|
||||
cp -p ../AMD/Lib/*.a ./
|
||||
@ -189,7 +189,8 @@ pushd CAMD
|
||||
popd
|
||||
pushd ../Lib
|
||||
gcc -shared -Wl,-soname,libcamd.so.%{camd_version_major} -o \
|
||||
libcamd.so.%{camd_version} ../CAMD/Lib/*.o -lm
|
||||
libcamd.so.%{camd_version} ../CAMD/Lib/*.o \
|
||||
libsuitesparseconfig.so.%{SuiteSparse_config_major} -lm
|
||||
ln -sf libcamd.so.%{camd_version} libcamd.so.%{camd_version_major}
|
||||
ln -sf libcamd.so.%{camd_version} libcamd.so
|
||||
cp -p ../CAMD/Lib/*.a ./
|
||||
@ -204,7 +205,8 @@ pushd CCOLAMD
|
||||
popd
|
||||
pushd ../Lib
|
||||
gcc -shared -Wl,-soname,libccolamd.so.%{ccolamd_version_major} -o \
|
||||
libccolamd.so.%{ccolamd_version} ../CCOLAMD/Lib/*.o -lm
|
||||
libccolamd.so.%{ccolamd_version} ../CCOLAMD/Lib/*.o \
|
||||
libsuitesparseconfig.so.%{SuiteSparse_config_major} -lm
|
||||
ln -sf libccolamd.so.%{ccolamd_version} libccolamd.so.%{ccolamd_version_major}
|
||||
ln -sf libccolamd.so.%{ccolamd_version} libccolamd.so
|
||||
cp -p ../CCOLAMD/Lib/*.a ./
|
||||
@ -219,7 +221,8 @@ pushd COLAMD
|
||||
popd
|
||||
pushd ../Lib
|
||||
gcc -shared -Wl,-soname,libcolamd.so.%{colamd_version_major} -o \
|
||||
libcolamd.so.%{colamd_version} ../COLAMD/Lib/*.o -lm
|
||||
libcolamd.so.%{colamd_version} ../COLAMD/Lib/*.o \
|
||||
libsuitesparseconfig.so.%{SuiteSparse_config_major} -lm
|
||||
ln -sf libcolamd.so.%{colamd_version} libcolamd.so.%{colamd_version_major}
|
||||
ln -sf libcolamd.so.%{colamd_version} libcolamd.so
|
||||
cp -p ../COLAMD/Lib/*.a ./
|
||||
@ -301,7 +304,7 @@ pushd KLU
|
||||
gcc -shared -Wl,-soname,libklu.so.%{klu_version_major} -o \
|
||||
libklu.so.%{klu_version} ../KLU/Lib/*.o \
|
||||
libamd.so.%{amd_version_major} libcolamd.so.%{colamd_version_major} \
|
||||
libbtf.so.%{btf_version_major} libcholmod.so.%{cholmod_version_major} \
|
||||
libbtf.so.%{btf_version_major} \
|
||||
libsuitesparseconfig.so.%{SuiteSparse_config_major}
|
||||
ln -sf libklu.so.%{klu_version} libklu.so.%{klu_version_major}
|
||||
ln -sf libklu.so.%{klu_version} libklu.so
|
||||
@ -353,7 +356,7 @@ pushd SPQR
|
||||
g++ -shared -Wl,-soname,libspqr.so.%{spqr_version_major} -o \
|
||||
libspqr.so.%{spqr_version} ../SPQR/Lib/*.o \
|
||||
-L%{_libdir}/atlas -L%{_libdir} %{atlaslibs} \
|
||||
%{?with_tbb:-ltbb -ltbbmalloc} \
|
||||
%{?with_tbb:-ltbb} \
|
||||
libcholmod.so.%{cholmod_version_major} \
|
||||
libsuitesparseconfig.so.%{SuiteSparse_config_major} -lm
|
||||
ln -sf libspqr.so.%{spqr_version} libspqr.so.%{spqr_version_major}
|
||||
@ -390,6 +393,7 @@ pushd Lib
|
||||
cp -a $f ${RPM_BUILD_ROOT}%{_libdir}/$f
|
||||
done
|
||||
popd
|
||||
chmod 755 ${RPM_BUILD_ROOT}%{_libdir}/*.so.*
|
||||
pushd Include
|
||||
for f in *.h *.hpp; do
|
||||
cp -a $f ${RPM_BUILD_ROOT}%{_includedir}/%{name}/$f
|
||||
@ -437,6 +441,10 @@ rm -rf ${RPM_BUILD_ROOT}
|
||||
%doc Doc/*
|
||||
|
||||
%changelog
|
||||
* Mon Sep 15 2014 Orion Poplawski <orion@cora.nwra.com> - 4.3.1-3
|
||||
- Change patch to move math.h include into SuiteSparse_config.c
|
||||
- Fix linkage and library file permission issues
|
||||
|
||||
* Sat Sep 13 2014 Orion Poplawski <orion@cora.nwra.com> - 4.3.1-2
|
||||
- Add patch to allow octave compilation
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user