summaryrefslogtreecommitdiff
path: root/shells
diff options
context:
space:
mode:
authormaya <maya>2017-02-19 20:18:16 +0000
committermaya <maya>2017-02-19 20:18:16 +0000
commit7e9c2815831737f558975bc2e536bad52d7a852a (patch)
tree98c1a7c5abc74d3b7229c02b3672f0c640474e0a /shells
parenta7fac018394bc5538014895074fd9f90650c006b (diff)
downloadpkgsrc-7e9c2815831737f558975bc2e536bad52d7a852a.tar.gz
ast-ksh: fix compilation on NetBSD, possibly linux too.
Fix "storage size of buf is not known" likely caused by it being defined to be something with sizeof(). add LDFLAGS -lm to all operating systems (I see undefined reference to frexpl/ldexpl), remove duplicate from other operating systems. bump PKGREVISION sinze L_tmpnam will be changed for the few who can build the package.
Diffstat (limited to 'shells')
-rw-r--r--shells/ast-ksh/Makefile4
-rw-r--r--shells/ast-ksh/Makefile.common11
-rw-r--r--shells/ast-ksh/distinfo3
-rw-r--r--shells/ast-ksh/patches/patch-src_lib_libast_comp_tmpnam.c20
4 files changed, 28 insertions, 10 deletions
diff --git a/shells/ast-ksh/Makefile b/shells/ast-ksh/Makefile
index 96c01fc9589..15c17f9a093 100644
--- a/shells/ast-ksh/Makefile
+++ b/shells/ast-ksh/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.22 2014/11/06 12:25:36 joerg Exp $
+# $NetBSD: Makefile,v 1.23 2017/02/19 20:18:16 maya Exp $
.include "../../shells/ast-ksh/Makefile.common"
-PKGREVISION= 1
+PKGREVISION= 2
.include "../../mk/bsd.pkg.mk"
diff --git a/shells/ast-ksh/Makefile.common b/shells/ast-ksh/Makefile.common
index d892a86a10c..769f3fb59b5 100644
--- a/shells/ast-ksh/Makefile.common
+++ b/shells/ast-ksh/Makefile.common
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.common,v 1.34 2016/03/22 19:31:15 richard Exp $
+# $NetBSD: Makefile.common,v 1.35 2017/02/19 20:18:16 maya Exp $
#
# used by shells/ast-ksh/Makefile
# used by shells/static-ast-ksh/Makefile
@@ -36,17 +36,14 @@ PDKSH= /bin/ksh
# this is kind of a hack -
# better would be to fix the 'meta makefile' to pass this
# or to use the ksh-provided math routines.
-
-.if ${OPSYS} == "DragonFly"
-KSH93_MAKEFLAGS+= CCFLAGS=-lm
-.endif
+KSH93_MAKEFLAGS+= LDFLAGS=-lm
.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__"
+USE_LANGUAGES+= c99
+KSH93_MAKEFLAGS+= CCFLAGS="-D_XPG6 -D__EXTENSIONS__"
.endif
PKG_SHELL= bin/ksh93
diff --git a/shells/ast-ksh/distinfo b/shells/ast-ksh/distinfo
index 33cd6034e80..0012c150e82 100644
--- a/shells/ast-ksh/distinfo
+++ b/shells/ast-ksh/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.19 2015/11/02 23:00:34 agc Exp $
+$NetBSD: distinfo,v 1.20 2017/02/19 20:18:16 maya Exp $
SHA1 (INIT.2012-08-01.tgz) = 0b472a615db384fe707042baaa3347dc1aa1c81e
RMD160 (INIT.2012-08-01.tgz) = 48f1830bc85a26125dd986256d38be435668d445
@@ -10,6 +10,7 @@ SHA512 (ast-ksh.2012-08-01.tgz) = 244df8c4cbcd719da24bfc6e52272488e0a06a7274725c
Size (ast-ksh.2012-08-01.tgz) = 2053532 bytes
SHA1 (patch-ab) = 98ec5d5e90f3f9bf45bdbd7199f85e932e07eada
SHA1 (patch-ad) = a85c7ac72c3443e4c140ee36bbc35b2a4eb42062
+SHA1 (patch-src_lib_libast_comp_tmpnam.c) = 829fbedaffb46a5a2dd18dc4782cb7074521357d
SHA1 (patch-src_lib_libast_features_lib) = 28bee8d00364a415c46bef63899329bc3326fe34
SHA1 (patch-src_lib_libast_features_map.c) = efc25164d5e153ee3fc3b519d4d2abbc7c3f2f6b
SHA1 (patch-src_lib_libast_features_sys) = 32a3f793395bb06e23c58e31ef534415da0d626b
diff --git a/shells/ast-ksh/patches/patch-src_lib_libast_comp_tmpnam.c b/shells/ast-ksh/patches/patch-src_lib_libast_comp_tmpnam.c
new file mode 100644
index 00000000000..bd0b2df63f8
--- /dev/null
+++ b/shells/ast-ksh/patches/patch-src_lib_libast_comp_tmpnam.c
@@ -0,0 +1,20 @@
+$NetBSD: patch-src_lib_libast_comp_tmpnam.c,v 1.1 2017/02/19 20:18:16 maya Exp $
+
+Workaround "storage size of 'buf' isn't known",
+likely from #define P_tmpdir in ast_stdio.h.
+
+just define it to be a sensible size.
+
+--- src/lib/libast/comp/tmpnam.c.orig 2006-09-22 15:28:13.000000000 +0000
++++ src/lib/libast/comp/tmpnam.c
+@@ -38,9 +38,8 @@
+ #define extern __EXPORT__
+ #endif
+
+-#ifndef L_tmpnam
++#undef L_tmpnam /* Defined as sizeof(P_tmpdir) but P_tmpdir is defined as empty */
+ #define L_tmpnam 25
+-#endif
+
+ extern char*
+ tmpnam(char* s)