Lines 6-19
Link Here
|
6 |
# |
6 |
# |
7 |
|
7 |
|
8 |
PORTNAME= lapack |
8 |
PORTNAME= lapack |
9 |
PORTVERSION= 3.2.1 |
9 |
PORTVERSION= 3.2.2 |
10 |
PORTREVISION= 1 |
|
|
11 |
CATEGORIES= math |
10 |
CATEGORIES= math |
12 |
MASTER_SITES= ftp://ftp.netlib.org/lapack/ \ |
11 |
MASTER_SITES= ftp://ftp.netlib.org/lapack/ \ |
13 |
http://netlib.org/lapack/ \ |
12 |
http://netlib.org/lapack/ \ |
14 |
http://scicomp.ewha.ac.kr/netlib/lapack/ \ |
13 |
http://scicomp.ewha.ac.kr/netlib/lapack/ \ |
15 |
http://service-spi.web.cern.ch/service-spi/external/tarFiles/ |
14 |
http://service-spi.web.cern.ch/service-spi/external/tarFiles/ |
16 |
DISTFILES= lapack-${PORTVERSION}.tgz manpages-3.2.0.tgz |
15 |
DISTFILES= lapack.tgz manpages-3.2.0.tgz |
17 |
|
16 |
|
18 |
MAINTAINER= maho@FreeBSD.org |
17 |
MAINTAINER= maho@FreeBSD.org |
19 |
COMMENT= A library of Fortran 77 subroutines for linear algebra |
18 |
COMMENT= A library of Fortran 77 subroutines for linear algebra |
Lines 36-46
Link Here
|
36 |
MANSRC=${WRKDIR}/lapack-3.2.0 |
35 |
MANSRC=${WRKDIR}/lapack-3.2.0 |
37 |
WRKSRC_SHARED=${WRKSRC}_shared |
36 |
WRKSRC_SHARED=${WRKSRC}_shared |
38 |
FFLAGS_SHARED=${FPIC} |
37 |
FFLAGS_SHARED=${FPIC} |
|
|
38 |
.if !(defined(NOPROFILE) || defined(NO_PROFILE) || defined(WITHOUT_PROFILE)) |
39 |
WRKSRC_PROFILE=${WRKSRC}_profile |
39 |
WRKSRC_PROFILE=${WRKSRC}_profile |
40 |
FFLAGS_PROFILE=-pg |
40 |
FFLAGS_PROFILE=-pg |
|
|
41 |
PLIST_SUB+= PROFILE="" |
42 |
.else |
43 |
PLIST_SUB+= PROFILE="@comment " |
44 |
.endif |
41 |
|
45 |
|
42 |
SVERSION=4 |
46 |
SVERSION=4 |
43 |
BLAS= -L${LOCALBASE}/lib -lblas |
47 |
BLAS?= -L${LOCALBASE}/lib -lblas |
|
|
48 |
RANLIB= ${LOCALBASE}/bin/ranlib |
49 |
AR= ${LOCALBASE}/bin/ar |
44 |
|
50 |
|
45 |
pre-fetch: |
51 |
pre-fetch: |
46 |
@${ECHO} "You can override F77 and FFLAGS on the command line." |
52 |
@${ECHO} "You can override F77 and FFLAGS on the command line." |
Lines 55-100
Link Here
|
55 |
${REINPLACE_CMD} -Ee \ |
61 |
${REINPLACE_CMD} -Ee \ |
56 |
's,cd ([^ ;]+) *; *\$$\(MAKE\) *([[:alnum:]]*) *,${MAKE} -C \1 ${_MAKE_JOBS} \2,' \ |
62 |
's,cd ([^ ;]+) *; *\$$\(MAKE\) *([[:alnum:]]*) *,${MAKE} -C \1 ${_MAKE_JOBS} \2,' \ |
57 |
${WRKSRC}/TESTING/Makefile |
63 |
${WRKSRC}/TESTING/Makefile |
58 |
@${REINPLACE_CMD} -e 's,%%F77%%,${F77},g' \ |
64 |
@${REINPLACE_CMD} -e 's;%%F77%%;${F77};g' \ |
59 |
-e 's,%%FFLAGS%%,${FFLAGS},g' \ |
65 |
-e 's;%%FFLAGS%%;${FFLAGS};g' \ |
60 |
-e 's,%%BLAS%%,${BLAS},g' \ |
66 |
-e 's;%%LDFLAGS%%;${LDFLAGS};g' \ |
|
|
67 |
-e 's;%%RANLIB%%;${RANLIB};g' \ |
68 |
-e 's;%%BLAS%%;${BLAS};g' \ |
61 |
${WRKSRC}/make.inc |
69 |
${WRKSRC}/make.inc |
62 |
@${CP} -r ${WRKSRC} ${WRKSRC_SHARED} |
70 |
@${CP} -r ${WRKSRC} ${WRKSRC_SHARED} |
|
|
71 |
.if !(defined(NOPROFILE) || defined(NO_PROFILE) || defined(WITHOUT_PROFILE)) |
63 |
@${CP} -r ${WRKSRC} ${WRKSRC_PROFILE} |
72 |
@${CP} -r ${WRKSRC} ${WRKSRC_PROFILE} |
|
|
73 |
.endif |
64 |
@${REINPLACE_CMD} -e 's,%%EXTRAFLAGS%%,,g' \ |
74 |
@${REINPLACE_CMD} -e 's,%%EXTRAFLAGS%%,,g' \ |
65 |
${WRKSRC}/make.inc |
75 |
${WRKSRC}/make.inc |
66 |
@${REINPLACE_CMD} -e 's,%%EXTRAFLAGS%%,${FFLAGS_SHARED},g' \ |
76 |
@${REINPLACE_CMD} -e 's,%%EXTRAFLAGS%%,${FFLAGS_SHARED},g' \ |
67 |
${WRKSRC_SHARED}/make.inc |
77 |
${WRKSRC_SHARED}/make.inc |
|
|
78 |
.if !(defined(NOPROFILE) || defined(NO_PROFILE) || defined(WITHOUT_PROFILE)) |
68 |
@${REINPLACE_CMD} -e 's,%%EXTRAFLAGS%%,${FFLAGS_PROFILE},g' \ |
79 |
@${REINPLACE_CMD} -e 's,%%EXTRAFLAGS%%,${FFLAGS_PROFILE},g' \ |
69 |
${WRKSRC_PROFILE}/make.inc |
80 |
${WRKSRC_PROFILE}/make.inc |
|
|
81 |
.endif |
70 |
|
82 |
|
71 |
do-build: |
83 |
do-build: |
72 |
@${ECHO_CMD} "Building static lapack library" |
84 |
@${ECHO_CMD} "Building static lapack library" |
73 |
${MAKE} -C ${WRKSRC} ${.MAKEFLAGS} ${_MAKE_JOBS} ARCH=ar |
85 |
${MAKE} -C ${WRKSRC} ${.MAKEFLAGS} ${_MAKE_JOBS} ARCH="${AR}" |
74 |
@${ECHO_CMD} "Building shared lapack library" |
86 |
@${ECHO_CMD} "Building shared lapack library" |
75 |
${MAKE} -C ${WRKSRC_SHARED} ${.MAKEFLAGS} ${_MAKE_JOBS} ARCH=ar |
87 |
${MAKE} -C ${WRKSRC_SHARED} ${.MAKEFLAGS} ${_MAKE_JOBS} ARCH="${AR}" |
|
|
88 |
.if !(defined(NOPROFILE) || defined(NO_PROFILE) || defined(WITHOUT_PROFILE)) |
76 |
@${ECHO_CMD} "Building profile lapack library" |
89 |
@${ECHO_CMD} "Building profile lapack library" |
77 |
${MAKE} -C ${WRKSRC_PROFILE} ${.MAKEFLAGS} ${_MAKE_JOBS} ARCH=ar |
90 |
${MAKE} -C ${WRKSRC_PROFILE} ${.MAKEFLAGS} ${_MAKE_JOBS} ARCH="${AR}" |
|
|
91 |
.endif |
78 |
|
92 |
|
79 |
post-build: |
93 |
post-build: |
80 |
${CP} ${WRKSRC}/lapack_FREEBSD.a ${WRKSRC}/liblapack.a |
94 |
.for lib in lapack tmglib |
81 |
${CP} ${WRKSRC}/tmglib_FREEBSD.a ${WRKSRC}/libtmglib.a |
95 |
cd ${WRKSRC_SHARED} ; ${FC} ${FFLAGS} ${FFLAGS_SHARED} ${LDFLAGS} -shared \ |
82 |
${CP} ${WRKSRC_SHARED}/lapack_FREEBSD.a ${WRKSRC_SHARED}/liblapack.a |
96 |
-o lib${lib}.so.${SVERSION} -Wl,-x -Wl,-soname,lib${lib}.so.${SVERSION} \ |
83 |
${CP} ${WRKSRC_SHARED}/tmglib_FREEBSD.a ${WRKSRC_SHARED}/libtmglib.a |
97 |
-Wl,--whole-archive lib${lib}.a -Wl,--no-whole-archive -Wl,--as-needed ${BLAS} |
84 |
${CP} ${WRKSRC_PROFILE}/lapack_FREEBSD.a ${WRKSRC_PROFILE}/liblapack_p.a |
98 |
.endfor |
85 |
${CP} ${WRKSRC_PROFILE}/tmglib_FREEBSD.a ${WRKSRC_PROFILE}/libtmglib_p.a |
|
|
86 |
cd ${WRKSRC_SHARED} ; ld -Bshareable -o liblapack.so.${SVERSION} -x -soname liblapack.so.${SVERSION} --whole-archive liblapack.a ; ${LN} -s liblapack.so.${SVERSION} liblapack.so |
87 |
cd ${WRKSRC_SHARED} ; ld -Bshareable -o libtmglib.so.${SVERSION} -x -soname libtmglib.so.${SVERSION} --whole-archive libtmglib.a ; ${LN} -s libtmglib.so.${SVERSION} libtmglib.so |
88 |
|
99 |
|
89 |
do-install: |
100 |
do-install: |
90 |
${INSTALL_DATA} ${WRKSRC}/liblapack.a ${PREFIX}/lib |
101 |
.for lib in lapack tmglib |
91 |
${INSTALL_DATA} ${WRKSRC}/libtmglib.a ${PREFIX}/lib |
102 |
${INSTALL_DATA} ${WRKSRC}/lib${lib}.a ${PREFIX}/lib |
92 |
${INSTALL_DATA} ${WRKSRC_SHARED}/liblapack.so.${SVERSION} ${PREFIX}/lib |
103 |
${INSTALL_DATA} ${WRKSRC_SHARED}/lib${lib}.so.${SVERSION} ${PREFIX}/lib |
93 |
${INSTALL_DATA} ${WRKSRC_SHARED}/libtmglib.so.${SVERSION} ${PREFIX}/lib |
104 |
${LN} -sf lib${lib}.so.${SVERSION} ${PREFIX}/lib/lib${lib}.so |
94 |
${LN} -sf liblapack.so.${SVERSION} ${PREFIX}/lib/liblapack.so |
105 |
.if !(defined(NOPROFILE) || defined(NO_PROFILE) || defined(WITHOUT_PROFILE)) |
95 |
${LN} -sf libtmglib.so.${SVERSION} ${PREFIX}/lib/libtmglib.so |
106 |
${INSTALL_DATA} ${WRKSRC_PROFILE}/lib${lib}.a ${PREFIX}/lib/lib${lib}_p.a |
96 |
${INSTALL_DATA} ${WRKSRC_PROFILE}/liblapack_p.a ${PREFIX}/lib |
107 |
.endif |
97 |
${INSTALL_DATA} ${WRKSRC_PROFILE}/libtmglib_p.a ${PREFIX}/lib |
108 |
.endfor |
98 |
${INSTALL_MAN} ${MANSRC}/manpages/man/manl/[a-c]*.l ${PREFIX}/man/manl |
109 |
${INSTALL_MAN} ${MANSRC}/manpages/man/manl/[a-c]*.l ${PREFIX}/man/manl |
99 |
${INSTALL_MAN} ${MANSRC}/manpages/man/manl/[d-l]*.l ${PREFIX}/man/manl |
110 |
${INSTALL_MAN} ${MANSRC}/manpages/man/manl/[d-l]*.l ${PREFIX}/man/manl |
100 |
${INSTALL_MAN} ${MANSRC}/manpages/man/manl/[m-s]*.l ${PREFIX}/man/manl |
111 |
${INSTALL_MAN} ${MANSRC}/manpages/man/manl/[m-s]*.l ${PREFIX}/man/manl |
Lines 102-107
Link Here
|
102 |
|
113 |
|
103 |
regression-test check test: build |
114 |
regression-test check test: build |
104 |
@${ECHO_CMD} "Testing static lapack library" |
115 |
@${ECHO_CMD} "Testing static lapack library" |
105 |
${MAKE} -C ${WRKSRC}/TESTING ${.MAKEFLAGS} ARCH=ar |
116 |
${MAKE} -C ${WRKSRC}/TESTING ${.MAKEFLAGS} ARCH="${AR}" |
106 |
|
117 |
|
107 |
.include <bsd.port.post.mk> |
118 |
.include <bsd.port.post.mk> |