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