Lines 1-61
Link Here
|
1 |
# New ports collection makefile for: cfg |
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-cfg/Makefile,v 1.9 2011/10/24 03:32:55 stas Exp $ |
2 |
# $FreeBSD: ports/devel/ocaml-cfg/Makefile,v 1.9 2011/10/24 03:32:55 stas Exp $ |
7 |
# |
|
|
8 |
|
3 |
|
9 |
PORTNAME= cfg |
4 |
PORTNAME= cfg |
10 |
PORTVERSION= 1.7.4 |
5 |
PORTVERSION= 2.0.1 |
11 |
PORTREVISION= 2 |
|
|
12 |
CATEGORIES= devel |
6 |
CATEGORIES= devel |
13 |
MASTER_SITES= http://www.ocaml.info/ocaml_sources/ |
7 |
MASTER_SITES= http://cdn.bitbucket.org/mmottl/cfg/downloads/ |
14 |
PKGNAMEPREFIX= ocaml- |
8 |
PKGNAMEPREFIX= ocaml- |
15 |
|
9 |
|
16 |
MAINTAINER= ports@FreeBSD.org |
10 |
MAINTAINER= ports@FreeBSD.org |
17 |
COMMENT= Library for manipulation of context-free grammars |
11 |
COMMENT= Library for manipulation of context-free grammars |
18 |
|
12 |
|
19 |
USE_BZIP2= yes |
13 |
LICENSE= LGPL21 |
20 |
USE_GMAKE= yes |
14 |
|
|
|
15 |
BUILD_DEPENDS= menhir:${PORTSDIR}/devel/menhir |
16 |
|
17 |
OPTIONS_DEFINE= DOCS EXAMPLES |
18 |
|
21 |
USE_OCAML= yes |
19 |
USE_OCAML= yes |
22 |
USE_OCAML_FINDLIB=yes |
20 |
USE_OCAML_FINDLIB=yes |
|
|
21 |
USE_OCAMLFIND_PLIST=yes |
23 |
USE_OCAML_WASH= yes |
22 |
USE_OCAML_WASH= yes |
24 |
MAKE_JOBS_UNSAFE= yes |
|
|
25 |
|
23 |
|
26 |
DOCS= README |
24 |
HAS_CONFIGURE= yes |
27 |
DOCSDIR= ${PREFIX}/share/doc/ocaml/${PORTNAME} |
25 |
CONFIGURE_ARGS= --prefix ${PREFIX} --disable-docs --disable-examples |
28 |
EXAMPLESDIR= ${PREFIX}/share/examples/ocaml/${PORTNAME} |
26 |
MAKE_JOBS_UNSAFE=yes |
29 |
|
27 |
|
30 |
.include <bsd.port.pre.mk> |
28 |
DOCSDIR= ${OCAML_DOCSDIR}/${PORTNAME} |
31 |
|
29 |
EXAMPLESDIR= ${OCAML_EXAMPLESDIR}/${PORTNAME} |
32 |
post-extract: |
30 |
|
33 |
# For nonstandard prefixes |
31 |
PORTDOCS= * |
34 |
.if !exists(${OCAMLFIND_DESTDIR}) |
32 |
PORTEXAMPLES= * |
35 |
${MKDIR} ${OCAMLFIND_DESTDIR} |
33 |
|
|
|
34 |
.include <bsd.port.options.mk> |
35 |
|
36 |
.if ${PORT_OPTIONS:MDOCS} |
37 |
PLIST_DIRSTRY+= ${OCAML_DOCSDIR:S,^${PREFIX}/,,} |
38 |
.endif |
39 |
|
40 |
.if ${PORT_OPTIONS:MEXAMPLES} |
41 |
PLIST_DIRSTRY+= ${OCAML_EXAMPLESDIR:S,^${PREFIX}/,,} |
36 |
.endif |
42 |
.endif |
37 |
|
43 |
|
38 |
post-install: |
44 |
post-install: |
39 |
@${FIND} ${OCAMLFIND_DESTDIR}/${PORTNAME} -type f | \ |
45 |
.if ${PORT_OPTIONS:MDOCS} |
40 |
${SED} "s,^${PREFIX}/,," >> ${TMPPLIST} |
|
|
41 |
.if !defined(NOPORTDOCS) |
42 |
@${MKDIR} ${DOCSDIR} |
46 |
@${MKDIR} ${DOCSDIR} |
43 |
${INSTALL_DATA} ${DOCS:S,^,${WRKSRC}/,} ${DOCSDIR}/ |
47 |
.for i in AUTHORS.txt CHANGES.txt README.md |
|
|
48 |
(cd ${WRKSRC} && ${INSTALL_DATA} ${i} ${DOCSDIR}) |
49 |
.endfor |
50 |
.endif |
51 |
.if ${PORT_OPTIONS:MEXAMPLES} |
44 |
@${MKDIR} ${EXAMPLESDIR} |
52 |
@${MKDIR} ${EXAMPLESDIR} |
45 |
@(cd ${WRKSRC}/examples && ${COPYTREE_SHARE} \* ${EXAMPLESDIR}/) |
53 |
@(cd ${WRKSRC}/examples && ${COPYTREE_SHARE} . ${EXAMPLESDIR}) |
46 |
@${FIND} ${EXAMPLESDIR}/ ! -type d | \ |
|
|
47 |
${SED} 's,^${PREFIX}/,,' >> ${TMPPLIST} |
48 |
@${FIND} ${EXAMPLESDIR}/ -type d | ${SORT} -r | \ |
49 |
${SED} 's,^${PREFIX}/,@dirrm ,' >> ${TMPPLIST} |
50 |
@${FIND} ${DOCSDIR}/ ! -type d | \ |
51 |
${SED} 's,^${PREFIX}/,,' >> ${TMPPLIST} |
52 |
@${FIND} ${DOCSDIR}/ -type d | ${SORT} -r | \ |
53 |
${SED} 's,^${PREFIX}/,@dirrm ,' >> ${TMPPLIST} |
54 |
# XXX: temporary workaround for non-standard PREFIX |
55 |
@${ECHO_CMD} "@unexec rmdir %D/share/doc/ocaml 2>/dev/null || true" \ |
56 |
>> ${TMPPLIST} |
57 |
@${ECHO_CMD} "@unexec rmdir %D/share/examples/ocaml 2>/dev/null||true" \ |
58 |
>> ${TMPPLIST} |
59 |
.endif |
54 |
.endif |
60 |
|
55 |
|
61 |
.include <bsd.port.post.mk> |
56 |
.include <bsd.port.mk> |