Accepting request 238385 from devel:libraries:c_c++
1 OBS-URL: https://build.opensuse.org/request/show/238385 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/suitesparse?expand=0&rev=11
This commit is contained in:
parent
c0aa191dc9
commit
1f5f44b200
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Sun Jun 22 06:49:20 UTC 2014 - dmitry_r@opensuse.org
|
||||
|
||||
- Fix libraries linking [bnc#883683]
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Nov 10 16:14:00 UTC 2013 - p.drouand@gmail.com
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package suitesparse
|
||||
#
|
||||
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -435,17 +435,37 @@ rm -rf SPQR/Doc/spqr.pdf
|
||||
%patch775418 -p1
|
||||
|
||||
%build
|
||||
for dir in AMD BTF CAMD CCOLAMD CHOLMOD COLAMD CSparse CXSparse KLU LDL RBio SPQR UMFPACK; do
|
||||
mkdir -p Lib
|
||||
|
||||
#bnc775418 provides SuiteSparse_time symbol in SuiteSparse_config
|
||||
pushd SuiteSparse_config
|
||||
make CFLAGS="%{optflags} -fPIC"
|
||||
pushd ../Lib
|
||||
gcc -shared -Wl,-soname -Wl,"libsuitesparseconfig-%{configver}.so" -o "libsuitesparseconfig-%{configver}.so" ../SuiteSparse_config/*.o -lm
|
||||
ln -s "libsuitesparseconfig-%{version}.so" "libsuitesparseconfig.so"
|
||||
popd
|
||||
popd
|
||||
|
||||
# libraries linking config [bnc#883683]
|
||||
cholmod_libs="libamd.so libcamd.so libcolamd.so libccolamd.so libsuitesparseconfig.so -lblas -llapack"
|
||||
klu_libs="libamd.so libbtf.so libcolamd.so"
|
||||
rbio_libs="libsuitesparseconfig.so"
|
||||
spqr_libs="libcholmod.so libsuitesparseconfig.so -lblas -llapack"
|
||||
umfpack_libs="libamd.so libcholmod.so libsuitesparseconfig.so -lblas -llapack"
|
||||
|
||||
for dir in AMD BTF CAMD CCOLAMD COLAMD CHOLMOD CSparse CXSparse KLU LDL RBio SPQR UMFPACK; do
|
||||
pushd $dir
|
||||
ver=$(grep -E "^VERSION =" Makefile | sed "s:VERSION = ::")
|
||||
pushd Lib
|
||||
make CFLAGS="%{optflags} -fPIC"
|
||||
dir_l=$(echo "$dir" | tr "[A-Z]" "[a-z]")
|
||||
gcc -shared -Wl,-soname -Wl,"lib${dir_l}-$ver.so" -o "lib${dir_l}-$ver.so" *.o -lm
|
||||
ln -s "lib${dir_l}-$ver.so" "lib${dir_l}.so"
|
||||
popd
|
||||
make CFLAGS="%{optflags} -fPIC"
|
||||
popd
|
||||
pushd Lib
|
||||
dir_l=$(echo "$dir" | tr "[A-Z]" "[a-z]")
|
||||
linked_libs=${dir_l}_libs
|
||||
gcc -shared -Wl,-soname -Wl,"lib${dir_l}-$ver.so" -o "lib${dir_l}-$ver.so" ../${dir}/Lib/*.o ${!linked_libs} -lm
|
||||
ln -s "lib${dir_l}-$ver.so" "lib${dir_l}.so"
|
||||
popd
|
||||
done
|
||||
|
||||
# specialities
|
||||
# -- CHOLMOD
|
||||
pushd CHOLMOD
|
||||
@ -456,13 +476,6 @@ pushd CHOLMOD
|
||||
cp Supernodal/License.txt Doc/Supernodal_License.txt
|
||||
popd
|
||||
|
||||
#bnc775418 provides SuiteSparse_time symbol in SuiteSparse_config
|
||||
pushd SuiteSparse_config
|
||||
make CFLAGS="%{optflags} -fPIC"
|
||||
gcc -shared -Wl,-soname -Wl,"libsuitesparseconfig-%{configver}.so" -o "libsuitesparseconfig-%{configver}.so" *.o -lm
|
||||
ln -s "libsuitesparseconfig-%{version}.so" "libsuitesparseconfig.so"
|
||||
popd
|
||||
|
||||
%install
|
||||
mkdir -p %{buildroot}%{_includedir}/%{name}
|
||||
mkdir -p %{buildroot}%{_libdir}
|
||||
@ -470,10 +483,11 @@ mkdir -p %{buildroot}%{_docdir}/%{name}
|
||||
mkdir -p %{buildroot}%{_docdir}/%{name}-devel
|
||||
cp -a SuiteSparse_config/SuiteSparse_config.h %{buildroot}%{_includedir}/%{name}
|
||||
cp -a README.txt %{buildroot}%{_docdir}/%{name}
|
||||
cp -a Lib/*.so* %{buildroot}/%{_libdir}
|
||||
for dir in AMD BTF CAMD CCOLAMD CHOLMOD COLAMD CSparse CXSparse KLU LDL RBio SPQR UMFPACK; do
|
||||
pushd $dir
|
||||
ver=$(grep -E "^VERSION =" Makefile | sed "s:VERSION = ::")
|
||||
cp -a Lib/*.a Lib/*.so* %{buildroot}/%{_libdir}
|
||||
cp -a Lib/*.a %{buildroot}/%{_libdir}
|
||||
cp -a Include/*.h %{buildroot}%{_includedir}/%{name}
|
||||
mkdir %{buildroot}%{_docdir}/%{name}/$dir-$ver
|
||||
mkdir %{buildroot}%{_docdir}/%{name}-devel/$dir
|
||||
@ -482,7 +496,7 @@ for dir in AMD BTF CAMD CCOLAMD CHOLMOD COLAMD CSparse CXSparse KLU LDL RBio SPQ
|
||||
popd
|
||||
done
|
||||
|
||||
cp -r SuiteSparse_config/*.so* SuiteSparse_config/*.a %{buildroot}%{_libdir}
|
||||
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}/
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user