wok-next view umfpack/receipt @ rev 20577
More fix libtool
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Sat Apr 14 03:34:33 2018 +0300 (2018-04-14) |
parents | c76d30df5ef0 |
children | d5aab818505e |
line source
1 # SliTaz package receipt v2.
3 PACKAGE="umfpack"
4 VERSION="4.4.4"
5 CATEGORY="development"
6 SHORT_DESC="Multifrontal LU factorization"
7 MAINTAINER="pascal.bellard@slitaz.org"
8 LICENSE="GPL2"
9 WEB_SITE="http://faculty.cse.tamu.edu/davis/suitesparse.html"
11 TARBALL="SuiteSparse-$VERSION.tar.gz"
12 WGET_URL="http://faculty.cse.tamu.edu/davis/SuiteSparse/$TARBALL"
14 BUILD_DEPENDS="blas lapack libgfortran"
15 SPLIT="umfpack-dev"
17 compile_rules() {
18 cat > dynlink.sh <<EOT
19 lib=\$1
20 shift
21 gcc -shared \$@ -lm -Wl,-soname -Wl,\$(basename \$lib) -o \$lib
22 EOT
23 for i in */Doc/ChangeLog; do
24 VERSION=$(sed 's/.* version //;q' $i)
25 sed -i 's/\(.*cd Lib.*MAKE.\)\(.*\)/\1\2\n\1 -f Makefile.d\2/' \
26 ${i%%/*}/Makefile
27 i=${i%%/*}/Lib
28 sed -e "/RANLIB/d;s/\.a/.so.$VERSION/" \
29 -e 's/\.o/.oo/g;s/ -c / -fPIC&/' \
30 -e 's|CC.*/\([^/]*\)c$|& -o \1oo|' -e 's|\$<$|$< -o $@|' \
31 -e "s|\$(AR[A-Z]*)|sh $src/dynlink.sh|" \
32 < $i/Makefile > $i/Makefile.d
33 done
34 mkdir -p $DESTDIR/usr/lib $DESTDIR/usr/include
35 sed -i "s/lopenblas/lblas/;s|/usr/local|$DESTDIR/usr|" \
36 SuiteSparse_config/*.mk
38 make -j 1 && make install
40 for i in */Lib/*.so.*; do
41 cp $i $DESTDIR/usr/lib
42 l=$(basename $i)
43 ln -s $l $DESTDIR/usr/lib/${l%.*.*}
44 ln -s $l $DESTDIR/usr/lib/${l%so*}so
45 done
46 }
48 genpkg_rules() {
49 case $PACKAGE in
50 umfpack)
51 copy @std
52 DEPENDS="blas lapack"
53 ;;
54 *-dev)
55 copy @dev
56 ;;
57 esac
58 }