summaryrefslogtreecommitdiff
path: root/databases/mysqltcl/Makefile
blob: 34b1d2e1ba6497c3fbf415028e59e12a7616f1e8 (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
# New ports collection makefile for:	mysqltcl
# Date created:				August 31, 1999
# Whom:					Mikhail Teterin <mi@aldan.algebra.com>
#
# $FreeBSD$
#

PORTNAME=	mysqltcl
PORTVERSION=	3.01
CATEGORIES=	databases tcl83 tcl84
MASTER_SITES=	http://www.xdobry.de/mysqltcl/

MAINTAINER=	bkoenig@cs.tu-berlin.de
COMMENT=	TCL module for accessing MySQL databases based on msqltcl

LIB_DEPENDS=	${TCL_NODOT}:${PORTSDIR}/lang/${TCL_NODOT}

USE_MYSQL=	yes
TCL_VERSION?=	tcl8.4
TCL_NODOT=	${TCL_VERSION:S/.//}
SQL_DIR=	${PREFIX}/lib/${TCL_VERSION}/mysqltcl
PLIST_SUB+=	TCL_VERSION=${TCL_VERSION} LIB_NAME=${LIB_NAME}
MANN=		mysqltcl.n
MAKE_ENV+=	PORTVERSION="${PORTVERSION}" \
		TCL_VERSION="${TCL_VERSION}" \
		TCL_NODOT="${TCL_NODOT}"
MAKEFILE=	${FILESDIR}/Makefile.bsd
ALL_TARGET=	shlib
USE_REINPLACE=	yes
REINPLACE_ARGS=	-i ''

pre-patch:
	@${REINPLACE_CMD} -e 's, *
,,' ${WRKSRC}/generic/*.[ch]

do-install:
	@${MKDIR} ${SQL_DIR}
	@${INSTALL_DATA} ${WRKSRC}/${LIB_NAME} ${SQL_DIR}
	@${ECHO} "package ifneeded mysqltcl ${PORTVERSION} {load ${SQL_DIR}/${LIB_NAME}}" \
		> ${SQL_DIR}/pkgIndex.tcl
	@${INSTALL_MAN} ${WRKSRC}/doc/${MANN} ${PREFIX}/man/mann

post-install:
	@${TEST} ! -f ${PKGMESSAGE} || ${CAT} ${PKGMESSAGE}

.include <bsd.port.mk>

.if ${MYSQL_VER} == 323 || ${MYSQL_VER} == 40
PKGMESSAGE=	${PKGDIR}/pkg-message-legacy
.endif

LIB_NAME!=	${MAKE_ENV} ${MAKE} -f ${FILESDIR}/Makefile.bsd -V SHLIB_NAME