summaryrefslogtreecommitdiff
path: root/shells/ast-ksh
diff options
context:
space:
mode:
authorrichard <richard@pkgsrc.org>2016-03-22 19:31:15 +0000
committerrichard <richard@pkgsrc.org>2016-03-22 19:31:15 +0000
commit17786722741d9f60a93efa70f2a947215d3a68b5 (patch)
treef29d397e5a203ef37b9c7c743a0d2302673d6a58 /shells/ast-ksh
parent74fd5702c5ff3e963959522e1770e50f116d2a86 (diff)
downloadpkgsrc-17786722741d9f60a93efa70f2a947215d3a68b5.tar.gz
Get a working ast-ksh build for SunOS using c99 and defining _XPG6
(and __EXTENSIONS__ for strict STDC). Also needs -lm. Fix testing to work prior to [stage-]install. No revbump needed. okay'd by jperkin@ NB there are still some corner cases not working on some SunOS, but on illumos SunOS 5.11 this actually goes a real long way over stock sh/ksh!
Diffstat (limited to 'shells/ast-ksh')
-rw-r--r--shells/ast-ksh/Makefile.common17
1 files changed, 14 insertions, 3 deletions
diff --git a/shells/ast-ksh/Makefile.common b/shells/ast-ksh/Makefile.common
index 8771e6c7d30..d892a86a10c 100644
--- a/shells/ast-ksh/Makefile.common
+++ b/shells/ast-ksh/Makefile.common
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.common,v 1.33 2014/07/03 15:00:41 wiz Exp $
+# $NetBSD: Makefile.common,v 1.34 2016/03/22 19:31:15 richard Exp $
#
# used by shells/ast-ksh/Makefile
# used by shells/static-ast-ksh/Makefile
@@ -41,6 +41,14 @@ PDKSH= /bin/ksh
KSH93_MAKEFLAGS+= CCFLAGS=-lm
.endif
+.if ${OPSYS} == "SunOS"
+# need c99 and _XPG6 in order to avoid patching libast/features/standards
+# __EXTENSIONS__ is needed in case of __STDC__ == 1 (i.e. -std=c99 not gnu99)
+# for things like mamake, ratz and some others for now.
+USE_LANGUAGES+= c99
+KSH93_MAKEFLAGS+= LDFLAGS=-lm CCFLAGS="-D_XPG6 -D__EXTENSIONS__"
+.endif
+
PKG_SHELL= bin/ksh93
INSTALLATION_DIRS= bin ${PKGMANDIR}/man1
@@ -65,8 +73,11 @@ do-install:
# Part of regression test
do-test:
- @cd ${WRKSRC:Q}/src/cmd/ksh93/tests && \
- ${SETENV} SHELL=${PREFIX:Q}/bin/ksh93 ${PREFIX:Q}/bin/ksh93 shtests
+ @set -e; \
+ arch=`${WRKSRC}/bin/package host`; \
+ cd ${WRKSRC:Q}/src/cmd/ksh93/tests && \
+ ${SETENV} SHELL=${WRKSRC}/arch/"$${arch}"/bin/ksh \
+ ${WRKSRC}/arch/"$${arch}"/bin/ksh shtests
# XXX Their 'test' target needs nmake (Korn's another tool)
# @cd ${WRKSRC}; \
# ${SETENV} SHELL=${PDKSH} ${PDKSH} ./bin/package test