aboutsummaryrefslogtreecommitdiff
path: root/x11-toolkits/tk80/Makefile
blob: b0e352d4c6d377314f1efc9722e349669b88f537 (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
# New ports collection makefile for:	tk8.0
# Date created:		19 August 1997
# Whom:			jkh
#
# $FreeBSD$
#

PORTNAME=	tk
PORTVERSION=	8.0.5
CATEGORIES=	x11-toolkits tk80
MASTER_SITES=	${MASTER_SITE_TCLTK}
MASTER_SITE_SUBDIR=	tcl8_0
DISTNAME=	${PORTNAME}${PORTVERSION}

MAINTAINER=	ports@Freebsd.ORG

LIB_DEPENDS=	tcl80.1:${PORTSDIR}/lang/tcl80

NO_LATEST_LINK=	yes
USE_XLIB=	yes
INSTALLS_SHLIB=	yes
WRKSRC=		${WRKDIR}/tk8.0.5/unix
GNU_CONFIGURE=	yes
CONFIGURE_ARGS=	--enable-shared
CONFIGURE_ENV=	PORTSDIR=${PORTSDIR} TK_LIB_FILE=${TK_LIB_FILE}
PKGINSTALL=	${PKGDIR}/pkg-install.wish
PKGDEINSTALL=	${PKGDIR}/pkg-deinstall.wish

SHLIB_MAJOR=	1
SHLIB_MINOR=	4
MAKEFILE=	makefile
TK_LIB=		libtk80.so

.include <bsd.port.pre.mk>

.if ${PORTOBJFORMAT} == "elf"
TK_LIB_FILE=	${TK_LIB}.${SHLIB_MAJOR}
.else
TK_LIB_FILE=	${TK_LIB}.${SHLIB_MAJOR}.${SHLIB_MINOR}
.endif

post-patch:
	@${CP} ${WRKSRC}/mkLinks ${WRKSRC}/mkLinks.orig
	@${SED} -e 's/\.[3n]/&.gz/g' ${WRKSRC}/mkLinks.orig > ${WRKSRC}/mkLinks

post-configure:
	@${CP} ${FILESDIR}/Makefile.lib ${WRKSRC}
	@${CP} ${FILESDIR}/makefile     ${WRKSRC}

pre-build:
	@cd ${WRKSRC} && ${MAKE} -f Makefile.lib PREFIX=${PREFIX} \
	    SHLIB_MAJOR=${SHLIB_MAJOR} SHLIB_MINOR=${SHLIB_MINOR}

post-install:
	${LN} -sf ${TK_LIB_FILE} ${PREFIX}/lib/${TK_LIB}
.if exists(${PKGINSTALL})
	${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL}
.endif

test:
	cd ${WRKSRC}; make test

.include <bsd.port.post.mk>