summaryrefslogtreecommitdiff
path: root/shells
diff options
context:
space:
mode:
authorrichard <richard>2016-03-22 19:31:15 +0000
committerrichard <richard>2016-03-22 19:31:15 +0000
commit90bf2359db7f628891ea0df101b24870a55671a3 (patch)
treef29d397e5a203ef37b9c7c743a0d2302673d6a58 /shells
parent92497d24d08f42df80b5d89e93f06d732ad21a14 (diff)
downloadpkgsrc-90bf2359db7f628891ea0df101b24870a55671a3.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')
-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