Lines 1-80
Link Here
|
1 |
# New ports collection makefile for: lacaml |
1 |
# Created by: Stanislav Sedov <ssedov@mbsd.msk.ru> |
2 |
# Date created: 2006-08-15 |
|
|
3 |
# Whom: Stanislav Sedov <ssedov@mbsd.msk.ru> |
4 |
# |
5 |
# $MBSDlabs$ |
6 |
# $FreeBSD: ports/devel/ocaml-lacaml/Makefile,v 1.20 2011/10/24 03:32:56 stas Exp $ |
2 |
# $FreeBSD: ports/devel/ocaml-lacaml/Makefile,v 1.20 2011/10/24 03:32:56 stas Exp $ |
7 |
# |
|
|
8 |
|
3 |
|
9 |
PORTNAME= lacaml |
4 |
PORTNAME= lacaml |
10 |
PORTVERSION= 5.4.7 |
5 |
PORTVERSION= 7.0.3 |
11 |
PORTREVISION= 1 |
|
|
12 |
CATEGORIES= devel |
6 |
CATEGORIES= devel |
13 |
MASTER_SITES= http://hg.ocaml.info/release/lacaml/archive/ |
7 |
MASTER_SITES= http://cdn.bitbucket.org/mmottl/lacaml/downloads/ |
14 |
DISTNAME= release-${PORTVERSION} |
|
|
15 |
PKGNAMEPREFIX= ocaml- |
8 |
PKGNAMEPREFIX= ocaml- |
16 |
|
9 |
|
17 |
MAINTAINER= ports@FreeBSD.org |
10 |
MAINTAINER= ports@FreeBSD.org |
18 |
COMMENT= OCaml interface to BLAS and LAPACK libraries |
11 |
COMMENT= OCaml interface to BLAS and LAPACK libraries |
19 |
|
12 |
|
20 |
LIB_DEPENDS= blas.2:${PORTSDIR}/math/blas \ |
13 |
LICENSE= LGPL21 |
21 |
lapack.4:${PORTSDIR}/math/lapack |
14 |
|
|
|
15 |
LIB_DEPENDS= blas:${PORTSDIR}/math/blas \ |
16 |
lapack:${PORTSDIR}/math/lapack |
17 |
|
18 |
OPTIONS_DEFINE= DOCS EXAMPLES |
22 |
|
19 |
|
23 |
USE_BZIP2= yes |
|
|
24 |
USE_GMAKE= yes |
25 |
USE_OCAML= yes |
20 |
USE_OCAML= yes |
26 |
USE_OCAML_FINDLIB=yes |
21 |
USE_OCAML_FINDLIB=yes |
|
|
22 |
USE_OCAMLFIND_PLIST=yes |
27 |
USE_OCAML_LDCONFIG=yes |
23 |
USE_OCAML_LDCONFIG=yes |
28 |
USE_OCAML_WASH= yes |
24 |
USE_OCAML_WASH= yes |
29 |
WRKSRC= ${WRKDIR}/lacaml-${DISTNAME} |
25 |
|
|
|
26 |
HAS_CONFIGURE= yes |
27 |
CONFIGURE_ARGS= --prefix ${PREFIX} --disable-docs --disable-examples \ |
28 |
--override conf_ccopt "${CFLAGS}" \ |
29 |
--override conf_cclib "${LDFLAGS:S,^.*[[:space:]],,}" |
30 |
MAKE_JOBS_UNSAFE=yes |
30 |
|
31 |
|
31 |
CFLAGS+= -fPIC |
32 |
CFLAGS+= -fPIC |
32 |
MAKE_ENV+= OCAMLMKLIB_FLAGS="-L${LOCALBASE}/lib" |
33 |
LDFLAGS+= -L${LOCALBASE}/lib -lblas -llapack |
33 |
MAKE_JOBS_UNSAFE= yes |
34 |
|
|
|
35 |
DOCSDIR= ${OCAML_DOCSDIR}/${PORTNAME} |
36 |
EXAMPLESDIR= ${OCAML_EXAMPLESDIR}/${PORTNAME} |
34 |
|
37 |
|
35 |
DOCS= README.txt TODO |
38 |
PORTDOCS= * |
36 |
DOCSDIR= ${PREFIX}/share/doc/ocaml/${PORTNAME} |
39 |
PORTEXAMPLES= * |
37 |
EXAMPLESDIR= ${PREFIX}/share/examples/ocaml/${PORTNAME} |
40 |
|
38 |
|
41 |
.include <bsd.port.options.mk> |
39 |
.include <bsd.port.pre.mk> |
42 |
|
40 |
|
43 |
.if ${PORT_OPTIONS:MDOCS} |
41 |
post-extract: |
44 |
PLIST_DIRSTRY+= ${OCAML_DOCSDIR:S,^${PREFIX}/,,} |
42 |
# |
|
|
43 |
# CFLAGS safety |
44 |
# |
45 |
@${REINPLACE_CMD} -E \ |
46 |
-e 's,^(CFLAGS[[:space:]]*:=[[:space:]]*).*,\1${CFLAGS},' \ |
47 |
${WRKSRC}/lib/Makefile |
48 |
|
49 |
# For nonstandard prefixes |
50 |
.if !exists(${OCAMLFIND_DESTDIR}) |
51 |
${MKDIR} ${OCAMLFIND_DESTDIR} |
52 |
.endif |
45 |
.endif |
53 |
.if !exists(${OCAMLFIND_LDCONF}) |
46 |
|
54 |
${TOUCH} ${OCAMLFIND_LDCONF} |
47 |
.if ${PORT_OPTIONS:MEXAMPLES} |
|
|
48 |
PLIST_DIRSTRY+= ${OCAML_EXAMPLESDIR:S,^${PREFIX}/,,} |
55 |
.endif |
49 |
.endif |
56 |
|
50 |
|
57 |
post-install: |
51 |
post-install: |
58 |
@${FIND} ${OCAMLFIND_DESTDIR}/${PORTNAME} -type f | \ |
52 |
.if ${PORT_OPTIONS:MDOCS} |
59 |
${SED} "s,^${PREFIX}/,," >> ${TMPPLIST} |
|
|
60 |
.if !defined(NOPORTDOCS) |
61 |
@${MKDIR} ${DOCSDIR} |
53 |
@${MKDIR} ${DOCSDIR} |
62 |
${INSTALL_DATA} ${DOCS:S,^,${WRKSRC}/,} ${DOCSDIR}/ |
54 |
.for i in AUTHORS.txt CHANGES.txt README.md TODO.md |
|
|
55 |
(cd ${WRKSRC} && ${INSTALL_DATA} ${i} ${DOCSDIR}) |
56 |
.endfor |
57 |
.endif |
58 |
.if ${PORT_OPTIONS:MEXAMPLES} |
63 |
@${MKDIR} ${EXAMPLESDIR} |
59 |
@${MKDIR} ${EXAMPLESDIR} |
64 |
@(cd ${WRKSRC}/examples && ${COPYTREE_SHARE} \* ${EXAMPLESDIR}/) |
60 |
@(cd ${WRKSRC}/examples && ${COPYTREE_SHARE} . ${EXAMPLESDIR}) |
65 |
@${FIND} ${EXAMPLESDIR}/ ! -type d | \ |
|
|
66 |
${SED} 's,^${PREFIX}/,,' >> ${TMPPLIST} |
67 |
@${FIND} ${EXAMPLESDIR}/ -type d | ${SORT} -r | \ |
68 |
${SED} 's,^${PREFIX}/,@dirrm ,' >> ${TMPPLIST} |
69 |
@${FIND} ${DOCSDIR}/ ! -type d | \ |
70 |
${SED} 's,^${PREFIX}/,,' >> ${TMPPLIST} |
71 |
@${FIND} ${DOCSDIR}/ -type d | ${SORT} -r | \ |
72 |
${SED} 's,^${PREFIX}/,@dirrm ,' >> ${TMPPLIST} |
73 |
# XXX: temporary workaround for non-standard PREFIX |
74 |
@${ECHO_CMD} "@unexec rmdir %D/share/doc/ocaml 2>/dev/null || true" \ |
75 |
>> ${TMPPLIST} |
76 |
@${ECHO_CMD} "@unexec rmdir %D/share/examples/ocaml 2>/dev/null||true" \ |
77 |
>> ${TMPPLIST} |
78 |
.endif |
61 |
.endif |
79 |
|
62 |
|
80 |
.include <bsd.port.post.mk> |
63 |
.include <bsd.port.mk> |