1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
# New ports collection makefile for: lablgl
# Date created: 13. January 2002
# Whom: Ronald Kuehn <rk@ronald.org>
#
# $FreeBSD$
#
PORTNAME= lablgl
PORTVERSION= 1.02
PORTREVISION= 0
CATEGORIES= graphics
MASTER_SITES= http://wwwfun.kurims.kyoto-u.ac.jp/soft/olabl/dist/
PKGNAMEPREFIX= ocaml-
MAINTAINER= stas@FreeBSD.org
COMMENT= OpenGL interface for Objective Caml
LIB_DEPENDS= glut.4:${PORTSDIR}/graphics/libglut
USE_GL= yes
USE_GMAKE= yes
USE_OCAML= yes
USE_OCAML_WASH= yes
ALL_TARGET= all opt
DEPENDS_ARGS+= WITH_TK=yes
MASTERPORT= ${PORTSDIR}/devel/ocaml-camlidl
PATTERN= [[:space:]]*(do|then)?[[:space:]]*)cp([[:space:]]
DOCSDIR= ${PREFIX}/share/doc/ocaml/lablgl
EXAMPLESDIR= ${PREFIX}/share/examples/ocaml/lablgl
# XXX: exists untill it will be committed to bsd.port.mk
COPYTREE_SHARE= ${SH} -c '(${FIND} -d $$0 $$2 | ${CPIO} -dumpl $$1 >/dev/null \
2>&1) && \
${CHOWN} -R ${SHAREOWN}:${SHAREGRP} $$1 && \
${FIND} $$1/ -type d -exec ${CHMOD} 755 {} \; && \
${FIND} $$1/ -type f -exec ${CHMOD} ${SHAREMODE} {} \;' --
.include <bsd.port.pre.mk>
.include "${PORTSDIR}/lang/ocaml/bsd.ocaml.mk"
post-extract:
@${CP} ${WRKSRC}/Makefile.config.freebsd ${WRKSRC}/Makefile.config
@${REINPLACE_CMD} -e "s,/usr/X11R6,${X11BASE},g" \
-e "s,/usr/local,${LOCALBASE},g" \
-e "s,^\(BINDIR[ \t]*=\).*,\1${PREFIX}/bin,g" \
-e "s,^\(RANLIB[ \t]*=\).*,\1ranlib,g" \
-e "s,^#\(LIBDIR[ \t]*=\).*,\1${PREFIX}/lib/ocaml,g" \
-e "s,^#\(DLLDIR[ \t]*=\).*,\1${PREFIX}/lib/ocaml/stublibs,g" \
${WRKSRC}/Makefile.config
@${REINPLACE_CMD} \
-e "s,^\(INSTALLDIR[ \t]*=\).*,\1${PREFIX}/lib/ocaml/lablGL,g" \
-e "s,^\(COPTS[ \t]*=\).*,\1-c ${CFLAGS},g" \
${WRKSRC}/Makefile.common ${WRKSRC}/Makefile
@${REINPLACE_CMD} -E \
-e 's,^(${PATTERN}+.*INSTALLDIR),\1\$${BSD_INSTALL_DATA} \3,' \
-e 's,^(${PATTERN}+.*BINDIR),\1\$${BSD_INSTALL_SCRIPT} \3,' \
-e 's,^(${PATTERN}+.*LIBDIR),\1\$${BSD_INSTALL_DATA} \3,' \
${WRKSRC}/src/Makefile ${WRKSRC}/LablGlut/src/Makefile \
${WRKSRC}/Togl/src/Makefile
pre-install:
#
# XXX: for incorrect PREFIX. Really should be done in bsd.ocaml.mk...
#
.if !exists(${PREFIX}/lib/ocaml/stublibs)
${MKDIR} ${PREFIX}/lib/ocaml/stublibs
.endif
post-install:
${MKDIR} ${EXAMPLESDIR}/lablglut
${MKDIR} ${EXAMPLESDIR}/togl
@(cd ${WRKSRC}/LablGlut/examples && ${COPYTREE_SHARE} \* \
${EXAMPLESDIR}/lablglut '! -name Makefile')
@(cd ${WRKSRC}/Togl/examples && ${COPYTREE_SHARE} \* \
${EXAMPLESDIR}/togl '! -name Makefile')
.if !defined(NOPORTDOCS)
${MKDIR} ${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}
.endif
.include <bsd.port.post.mk>
|