Accepting request 283371 from devel:libraries:c_c++
1 OBS-URL: https://build.opensuse.org/request/show/283371 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/suitesparse?expand=0&rev=16
This commit is contained in:
parent
dfda5d770e
commit
e4d8ad1d6b
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Jan 27 11:18:35 UTC 2015 - dmitry_r@opensuse.org
|
||||
|
||||
- Fix linking config
|
||||
- Add linking tests
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jan 20 19:27:14 UTC 2015 - foss@grueninger.de
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package suitesparse
|
||||
#
|
||||
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -449,7 +449,11 @@ pushd SuiteSparse_config
|
||||
popd
|
||||
|
||||
# libraries linking config [bnc#883683]
|
||||
amd_libs="libsuitesparseconfig.so"
|
||||
camd_libs="libsuitesparseconfig.so"
|
||||
ccolamd_libs="libsuitesparseconfig.so"
|
||||
cholmod_libs="libamd.so libcamd.so libcolamd.so libccolamd.so libsuitesparseconfig.so -lblas -llapack"
|
||||
colamd_libs="libsuitesparseconfig.so"
|
||||
klu_libs="libamd.so libbtf.so libcolamd.so"
|
||||
rbio_libs="libsuitesparseconfig.so"
|
||||
spqr_libs="libcholmod.so libsuitesparseconfig.so -lblas -llapack"
|
||||
@ -502,6 +506,42 @@ cp -r SuiteSparse_config/*.a %{buildroot}%{_libdir}
|
||||
mkdir %{buildroot}%{_docdir}/%{name}/SuiteSparse_config-%{configver}/
|
||||
cp -r SuiteSparse_config/README.txt %{buildroot}%{_docdir}/%{name}/SuiteSparse_config-%{configver}/
|
||||
|
||||
%check
|
||||
amd_test_symbol="amd_postorder"
|
||||
btf_test_symbol="btf_order"
|
||||
camd_test_symbol="camd_postorder"
|
||||
ccolamd_test_symbol="ccolamd"
|
||||
colamd_test_symbol="colamd"
|
||||
cholmod_test_symbol="cholmod_start"
|
||||
csparse_test_symbol="cs_sqr"
|
||||
cxsparse_test_symbol="cs_di_sqr"
|
||||
klu_test_symbol="klu_solve"
|
||||
ldl_test_symbol="ldl_symbolic"
|
||||
rbio_test_symbol="RBread"
|
||||
spqr_test_symbol="SuiteSparseQR_C_symbolic"
|
||||
umfpack_test_symbol="umfpack_toc"
|
||||
|
||||
mkdir -p linking_test
|
||||
pushd linking_test
|
||||
|
||||
cat > linking_test.c.in << 'EOF'
|
||||
char @test_symbol@ ();
|
||||
int main ()
|
||||
{
|
||||
return @test_symbol@ ();
|
||||
}
|
||||
EOF
|
||||
|
||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:%{buildroot}%{_libdir}
|
||||
for test_library in amd btf camd ccolamd colamd cholmod csparse cxsparse klu ldl rbio spqr umfpack; do
|
||||
cp linking_test.c.in linking_test.c
|
||||
test_symbol=${test_library}_test_symbol
|
||||
sed -i "s|@test_symbol@|${!test_symbol}|" linking_test.c
|
||||
gcc -o linking_test linking_test.c -L%{buildroot}%{_libdir} -l${test_library}
|
||||
done
|
||||
|
||||
popd
|
||||
|
||||
%post -n %{amdlib} -p /sbin/ldconfig
|
||||
%postun -n %{amdlib} -p /sbin/ldconfig
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user