summaryrefslogtreecommitdiff
path: root/lang/tclX/Makefile
blob: 3724038e9c17fb72ae6fe32854a53d6e08faca7d (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
70
71
72
73
74
75
76
# New ports collection makefile for:	tclX
# Date created:		6 February 1996
# Whom:			jkh
#
# $FreeBSD$
#

PORTNAME=	tclX
PORTVERSION=	8.4
PORTREVISION=	1
CATEGORIES=	lang tcl${USE_TCL} devel
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR=tclx
DISTNAME=	tclx${PORTVERSION}

MAINTAINER=	mi@aldan.algebra.com
COMMENT=	Extended TCL

BROKEN=		Regression tests fail

USE_BZIP2=	yes
USE_TCL_BUILD=	yes
USE_TCL=	yes

USE_LDCONFIG=	yes
GNU_CONFIGURE=	yes
CONFIGURE_ENV+=	CPPFLAGS="-I${TCL_INCLUDEDIR}/unix\
		-I${TCL_INCLUDEDIR}/generic"
CONFIGURE_ARGS=	--enable-shared \
		--with-help=Help \
		--with-tcl="${TCL_LIBDIR}"
PLIST_SUB=	TCLX_VER=${PORTVERSION}
ALL_TARGET=	binaries libraries test
INSTALL_TARGET=	install-binaries install-libraries
.ifndef(NOPORTDOCS)
ALL_TARGET+=	doc
INSTALL_TARGET+=install-help
.endif

MAN3=	CmdWrite.3 Handles.3 Keylist.3 ObjCmdWrite.3 TclXInit.3
MANN=	TclX.n

MLINKS=	CmdWrite.3	TclCommandWriting.3	\
	Keylist.3	TclX_NewKeyedListObj.3
.for l in Delete Get GetKeys Set TclX_Main TclX_NewKeyedListObj
MLINKS+=	Keylist.3	TclX_KeyedList$l.3
.endfor
.for l in Alloc Free TblInit TblRelease TblUseCount Walk Xlate
MLINKS+=	Handles.3	TclX_Handle$l.3
.endfor
.for l in Tclxcmd_Init TclX_Main Tkx_Init TkX_Main
MLINKS+=	TclXInit.3	$l.3
.endfor

.include <bsd.port.pre.mk>

pre-configure:
.if exists(${TCL_LIBDIR}/tclConfig-threads.sh)
	${REINPLACE_CMD} -e 's|tclConfig.sh|tclConfig-threads.sh|'	\
		${WRKSRC}/${CONFIGURE_SCRIPT}
.endif
	${REINPLACE_CMD} -e 's|-lpthread|${PTHREAD_LIBS}|'	\
		${WRKSRC}/${CONFIGURE_SCRIPT}

post-configure:
	${REINPLACE_CMD} -e	\
	    's,^TCLSH_PROG.*,TCLSH_PROG=${TCLSH},' \
	    -e 's,TCL_LIBRARY=.*,\\,' ${WRKSRC}/Makefile
	# Disabling the failing help.test
	${MV} ${WRKSRC}/tests/help.test ${WRKSRC}/tests/help.test.dis

pre-su-install:
	cd ${WRKSRC}/doc && ${INSTALL_MAN} ${MAN3} ${PREFIX}/man/man3
	cd ${WRKSRC}/doc && ${INSTALL_MAN} ${MANN} ${PREFIX}/man/mann

.include <bsd.port.post.mk>