summaryrefslogtreecommitdiff
path: root/shells/ast-ksh/Makefile.common
blob: 209bd6ae7d6a882c1b554014636f9183b15c6565 (plain)
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
# $NetBSD: Makefile.common,v 1.19 2006/03/04 21:30:39 jlam Exp $

DISTNAME=	ast-ksh-${ASTKSH_VERSION}
PKGNAME=	ast-ksh-${ASTKSH_VERSION:S/-//g}
CATEGORIES=	shells
MASTER_SITES=	http://www.research.att.com/~gsf/download/tgz/ \
		http://ftp.ntua.gr/pub/linux/openpkg/sources/DST/ksh/
DISTFILES=	INIT.${ASTKSH_VERSION}.tgz ast-ksh.${ASTKSH_VERSION}.tgz

MAINTAINER=	pkgsrc-users@NetBSD.org
HOMEPAGE=	http://www.kornshell.com/
COMMENT=	Official AT&T release of KornShell 93

NOT_FOR_PLATFORM=	Interix-*-* # taking nearly a day to build and crash!

CONFLICTS=	static-ast-ksh-[0-9]*
KSH93_MAKEFLAGS=

RESTRICTED=	Terms for redistribution are not yet clear.
NO_BIN_ON_CDROM=${RESTRICTED}
NO_BIN_ON_FTP=	${RESTRICTED}
NO_SRC_ON_CDROM=${RESTRICTED}
NO_SRC_ON_FTP=	${RESTRICTED}

ASTKSH_VERSION=	2003-07-24

WRKSRC=		${WRKDIR}
MAKE_FLAGS+=	CC=${CC:Q} CCFLAGS=${CFLAGS:M*:Q}

.include "../../mk/bsd.prefs.mk"

.if ${OPSYS} == "NetBSD"
PDKSH=		/bin/ksh
.endif

PKG_SHELL=	bin/ksh93

INSTALLATION_DIRS=	bin man/man1

# ${KSH93_MAKEFLAGS} is set as "LDFLAGS=-static" only when built as a
# static binary.
#
# XXX Note that 'make' here is not an executable command name, but a target
# name which the ./bin/package script uses.
do-build:
	@cd ${WRKSRC:Q} && \
		${SETENV} SHELL=${PDKSH:Q} \
			${PDKSH:Q} ./bin/package make ${KSH93_MAKEFLAGS}

do-install:
	@set -e;							\
	arch=`${WRKSRC:Q}/bin/package host`;				\
	${INSTALL_PROGRAM} ${WRKSRC:Q}/arch/"$${arch}"/bin/ksh		\
		${PREFIX:Q}/bin/ksh93;					\
	${INSTALL_MAN} ${WRKSRC:Q}/arch/"$${arch}"/man/man1/sh.1	\
		${PREFIX:Q}/man/man1/ksh93.1

# Part of regression test
do-test:
	@cd ${WRKSRC:Q}/src/cmd/ksh93/tests && \
		${SETENV} SHELL=${PREFIX:Q}/bin/ksh93 ${PREFIX:Q}/bin/ksh93 shtests
# XXX Their 'test' target needs nmake (Korn's another tool)
#	@cd ${WRKSRC}; \
#		${SETENV} SHELL=${PDKSH} ${PDKSH} ./bin/package test