blob: 3d42e9bc45e0b9b2deb552a338a5eac06dfe84dd (
plain) (
blame)
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
|
# ex:ts=8
# Ports collection makefile for: goblin
# Date created: Mar 3, 2002
# Whom: ijliao
#
# $FreeBSD$
#
PORTNAME= goblin
DISTVERSION= 2.8b28
CATEGORIES= math
MASTER_SITES= SF/goblin2
DISTNAME= ${PORTNAME}.${DISTVERSION}
EXTRACT_SUFX= .tgz
MAINTAINER= gahr@FreeBSD.org
COMMENT= A Graph Object Library for Network Programming Problems
USE_TK= 84
USE_TCL= 84
USE_XORG= x11
USE_GMAKE= yes
USE_LDCONFIG= yes
MAKE_ARGS= CC="${CC}" CCFLAGS="${CFLAGS}" \
CXX="${CXX}" CXXFLAGS="${CXXFLAGS}" \
LD="${CXX}" LIBS="-lm ${LDFLAGS}" LISShared="-lm ${LDFLAGS}" \
libtcl=84 libtk=84 prefix=${PREFIX}
ALL_TARGET= all
PLIST_SUB+= VERSION=${PORTVERSION:R}
CFLAGS+= -I${LOCALBASE}/include/tcl8.4 -I${LOCALBASE}/include/ \
-I${LOCALBASE}/include/tk8.4 ${PTHREAD_CFLAGS}
LDFLAGS= -L${LOCALBASE}/lib -ltcl84 -ltk84 ${PTHREAD_LIBS}
WISH= ${LOCALBASE}/bin/wish8.4
post-patch:
${REINPLACE_CMD} -e 's|-lpthread|${PTHREAD_LIBS}|g' ${WRKSRC}/Makefile
${REINPLACE_CMD} -e 's|/usr/bin/wish|${WISH}|g' ${WRKSRC}/display
${REINPLACE_CMD} -e 's|%%WISH%%|${WISH}|g;s|%%PREFIX%%|${PREFIX}|g' \
${WRKSRC}/Makefile.conf
${REINPLACE_CMD} -e 's|\./gosh|${PREFIX}/bin/gosh|; \
s|\[pwd\] tcl|${PREFIX}/lib/goblin|g' \
${WRKSRC}/goblet
@${GREP} -lR "malloc\.h" ${WRKSRC} | ${XARGS} ${REINPLACE_CMD} -e \
's|malloc\.h|stdlib.h|g'
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/gosh ${PREFIX}/bin
${INSTALL_SCRIPT} ${WRKSRC}/goblet ${PREFIX}/bin
${INSTALL_SCRIPT} ${WRKSRC}/display ${PREFIX}/bin/goblin-display
${INSTALL} -d ${PREFIX}/include/${PORTNAME}
(cd ${WRKSRC}/include && ${COPYTREE_SHARE} \*.h ${PREFIX}/include/${PORTNAME})
${INSTALL} -d ${PREFIX}/lib/${PORTNAME}
(cd ${WRKSRC}/tcl && ${COPYTREE_SHARE} \* ${PREFIX}/lib/${PORTNAME})
${INSTALL_DATA} ${WRKSRC}/libglpk.a ${PREFIX}/lib
${INSTALL_DATA} ${WRKSRC}/libgoblin.a ${PREFIX}/lib
.if !defined(NOPORTDOCS)
${INSTALL} -d ${DOCSDIR}
${INSTALL} -d ${DOCSDIR}/html
(cd ${WRKSRC}/html && ${COPYTREE_SHARE} \* ${DOCSDIR}/html)
(cd ${WRKSRC}/doku && ${COPYTREE_SHARE} \* ${DOCSDIR})
.endif
.if !defined(NOPORTEXAMPLES)
${INSTALL} -d ${EXAMPLESDIR}
(cd ${WRKSRC}/samples && ${COPYTREE_SHARE} \* ${EXAMPLESDIR})
.endif
.include <bsd.port.mk>
|