Sun Feb 19 20:18:16 2017 UTC ()
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.


(maya)
diff -r1.22 -r1.23 pkgsrc/shells/ast-ksh/Makefile
diff -r1.34 -r1.35 pkgsrc/shells/ast-ksh/Makefile.common
diff -r1.19 -r1.20 pkgsrc/shells/ast-ksh/distinfo
diff -r0 -r1.1 pkgsrc/shells/ast-ksh/patches/patch-src_lib_libast_comp_tmpnam.c

cvs diff -r1.22 -r1.23 pkgsrc/shells/ast-ksh/Makefile (expand / switch to unified diff)

--- pkgsrc/shells/ast-ksh/Makefile 2014/11/06 12:25:36 1.22
+++ pkgsrc/shells/ast-ksh/Makefile 2017/02/19 20:18:16 1.23
@@ -1,7 +1,7 @@ @@ -1,7 +1,7 @@
1# $NetBSD: Makefile,v 1.22 2014/11/06 12:25:36 joerg Exp $ 1# $NetBSD: Makefile,v 1.23 2017/02/19 20:18:16 maya Exp $
2 2
3.include "../../shells/ast-ksh/Makefile.common" 3.include "../../shells/ast-ksh/Makefile.common"
4 4
5PKGREVISION= 1 5PKGREVISION= 2
6 6
7.include "../../mk/bsd.pkg.mk" 7.include "../../mk/bsd.pkg.mk"

cvs diff -r1.34 -r1.35 pkgsrc/shells/ast-ksh/Makefile.common (expand / switch to unified diff)

--- pkgsrc/shells/ast-ksh/Makefile.common 2016/03/22 19:31:15 1.34
+++ pkgsrc/shells/ast-ksh/Makefile.common 2017/02/19 20:18:16 1.35
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: Makefile.common,v 1.34 2016/03/22 19:31:15 richard Exp $ 1# $NetBSD: Makefile.common,v 1.35 2017/02/19 20:18:16 maya Exp $
2# 2#
3# used by shells/ast-ksh/Makefile 3# used by shells/ast-ksh/Makefile
4# used by shells/static-ast-ksh/Makefile 4# used by shells/static-ast-ksh/Makefile
5 5
6DISTNAME= ast-ksh-${ASTKSH_VERSION} 6DISTNAME= ast-ksh-${ASTKSH_VERSION}
7PKGNAME= ast-ksh-${ASTKSH_VERSION:S/-//g} 7PKGNAME= ast-ksh-${ASTKSH_VERSION:S/-//g}
8CATEGORIES= shells 8CATEGORIES= shells
9# originally at http://www2.research.att.com/~gsf/download/tgz/ 9# originally at http://www2.research.att.com/~gsf/download/tgz/
10# but it requires authentication 10# but it requires authentication
11MASTER_SITES= ${MASTER_SITE_LOCAL} 11MASTER_SITES= ${MASTER_SITE_LOCAL}
12DISTFILES= INIT.${ASTKSH_VERSION}.tgz ast-ksh.${ASTKSH_VERSION}.tgz 12DISTFILES= INIT.${ASTKSH_VERSION}.tgz ast-ksh.${ASTKSH_VERSION}.tgz
13 13
14MAINTAINER= pkgsrc-users@NetBSD.org 14MAINTAINER= pkgsrc-users@NetBSD.org
@@ -26,37 +26,34 @@ ASTKSH_VERSION= 2012-08-01 @@ -26,37 +26,34 @@ ASTKSH_VERSION= 2012-08-01
26WRKSRC= ${WRKDIR} 26WRKSRC= ${WRKDIR}
27MAKE_FLAGS+= CC=${CC:Q} CCFLAGS=${CFLAGS:M*:Q} 27MAKE_FLAGS+= CC=${CC:Q} CCFLAGS=${CFLAGS:M*:Q}
28 28
29.include "../../mk/bsd.prefs.mk" 29.include "../../mk/bsd.prefs.mk"
30 30
31.if ${OPSYS} == "NetBSD" 31.if ${OPSYS} == "NetBSD"
32PDKSH= /bin/ksh 32PDKSH= /bin/ksh
33.endif 33.endif
34 34
35# Link with libm to fix sfcvt link error - 35# Link with libm to fix sfcvt link error -
36# this is kind of a hack - 36# this is kind of a hack -
37# better would be to fix the 'meta makefile' to pass this 37# better would be to fix the 'meta makefile' to pass this
38# or to use the ksh-provided math routines. 38# or to use the ksh-provided math routines.
39 39KSH93_MAKEFLAGS+= LDFLAGS=-lm
40.if ${OPSYS} == "DragonFly" 
41KSH93_MAKEFLAGS+= CCFLAGS=-lm 
42.endif 
43 40
44.if ${OPSYS} == "SunOS" 41.if ${OPSYS} == "SunOS"
45# need c99 and _XPG6 in order to avoid patching libast/features/standards 42# need c99 and _XPG6 in order to avoid patching libast/features/standards
46# __EXTENSIONS__ is needed in case of __STDC__ == 1 (i.e. -std=c99 not gnu99) 43# __EXTENSIONS__ is needed in case of __STDC__ == 1 (i.e. -std=c99 not gnu99)
47# for things like mamake, ratz and some others for now. 44# for things like mamake, ratz and some others for now.
48USE_LANGUAGES+= c99 45USE_LANGUAGES+= c99
49KSH93_MAKEFLAGS+= LDFLAGS=-lm CCFLAGS="-D_XPG6 -D__EXTENSIONS__" 46KSH93_MAKEFLAGS+= CCFLAGS="-D_XPG6 -D__EXTENSIONS__"
50.endif 47.endif
51 48
52PKG_SHELL= bin/ksh93 49PKG_SHELL= bin/ksh93
53 50
54INSTALLATION_DIRS= bin ${PKGMANDIR}/man1 51INSTALLATION_DIRS= bin ${PKGMANDIR}/man1
55 52
56# ${KSH93_MAKEFLAGS} is set as "LDFLAGS=-static" only when built as a 53# ${KSH93_MAKEFLAGS} is set as "LDFLAGS=-static" only when built as a
57# static binary. 54# static binary.
58# 55#
59# XXX Note that 'make' here is not an executable command name, but a target 56# XXX Note that 'make' here is not an executable command name, but a target
60# name which the ./bin/package script uses. 57# name which the ./bin/package script uses.
61do-build: 58do-build:
62 @cd ${WRKSRC:Q} && \ 59 @cd ${WRKSRC:Q} && \

cvs diff -r1.19 -r1.20 pkgsrc/shells/ast-ksh/distinfo (expand / switch to unified diff)

--- pkgsrc/shells/ast-ksh/distinfo 2015/11/02 23:00:34 1.19
+++ pkgsrc/shells/ast-ksh/distinfo 2017/02/19 20:18:16 1.20
@@ -1,18 +1,19 @@ @@ -1,18 +1,19 @@
1$NetBSD: distinfo,v 1.19 2015/11/02 23:00:34 agc Exp $ 1$NetBSD: distinfo,v 1.20 2017/02/19 20:18:16 maya Exp $
2 2
3SHA1 (INIT.2012-08-01.tgz) = 0b472a615db384fe707042baaa3347dc1aa1c81e 3SHA1 (INIT.2012-08-01.tgz) = 0b472a615db384fe707042baaa3347dc1aa1c81e
4RMD160 (INIT.2012-08-01.tgz) = 48f1830bc85a26125dd986256d38be435668d445 4RMD160 (INIT.2012-08-01.tgz) = 48f1830bc85a26125dd986256d38be435668d445
5SHA512 (INIT.2012-08-01.tgz) = 4a598e862ecaf9e5bd820f54404f3898b8f3c0fe95f4820a79565ae3c5fc973e3010b7d475dfb762ad716a3e4fb5ab9d184e20bfcec889ce742c3ff30d0233c4 5SHA512 (INIT.2012-08-01.tgz) = 4a598e862ecaf9e5bd820f54404f3898b8f3c0fe95f4820a79565ae3c5fc973e3010b7d475dfb762ad716a3e4fb5ab9d184e20bfcec889ce742c3ff30d0233c4
6Size (INIT.2012-08-01.tgz) = 377769 bytes 6Size (INIT.2012-08-01.tgz) = 377769 bytes
7SHA1 (ast-ksh.2012-08-01.tgz) = 316428e9937806183a134aa1669dea40c3a73695 7SHA1 (ast-ksh.2012-08-01.tgz) = 316428e9937806183a134aa1669dea40c3a73695
8RMD160 (ast-ksh.2012-08-01.tgz) = 74bf4735182a6b527e3eb5c5ae6d7854ea72d78b 8RMD160 (ast-ksh.2012-08-01.tgz) = 74bf4735182a6b527e3eb5c5ae6d7854ea72d78b
9SHA512 (ast-ksh.2012-08-01.tgz) = 244df8c4cbcd719da24bfc6e52272488e0a06a7274725cb7490db183a021a7c035a305c2c3682b8cddc84bb14ac7f31903ef46c59ff32bcb19317b3b05fa9353 9SHA512 (ast-ksh.2012-08-01.tgz) = 244df8c4cbcd719da24bfc6e52272488e0a06a7274725cb7490db183a021a7c035a305c2c3682b8cddc84bb14ac7f31903ef46c59ff32bcb19317b3b05fa9353
10Size (ast-ksh.2012-08-01.tgz) = 2053532 bytes 10Size (ast-ksh.2012-08-01.tgz) = 2053532 bytes
11SHA1 (patch-ab) = 98ec5d5e90f3f9bf45bdbd7199f85e932e07eada 11SHA1 (patch-ab) = 98ec5d5e90f3f9bf45bdbd7199f85e932e07eada
12SHA1 (patch-ad) = a85c7ac72c3443e4c140ee36bbc35b2a4eb42062 12SHA1 (patch-ad) = a85c7ac72c3443e4c140ee36bbc35b2a4eb42062
 13SHA1 (patch-src_lib_libast_comp_tmpnam.c) = 829fbedaffb46a5a2dd18dc4782cb7074521357d
13SHA1 (patch-src_lib_libast_features_lib) = 28bee8d00364a415c46bef63899329bc3326fe34 14SHA1 (patch-src_lib_libast_features_lib) = 28bee8d00364a415c46bef63899329bc3326fe34
14SHA1 (patch-src_lib_libast_features_map.c) = efc25164d5e153ee3fc3b519d4d2abbc7c3f2f6b 15SHA1 (patch-src_lib_libast_features_map.c) = efc25164d5e153ee3fc3b519d4d2abbc7c3f2f6b
15SHA1 (patch-src_lib_libast_features_sys) = 32a3f793395bb06e23c58e31ef534415da0d626b 16SHA1 (patch-src_lib_libast_features_sys) = 32a3f793395bb06e23c58e31ef534415da0d626b
16SHA1 (patch-src_lib_libast_features_vmalloc) = 714b1437cac8f49618581c6284a362163b37feba 17SHA1 (patch-src_lib_libast_features_vmalloc) = 714b1437cac8f49618581c6284a362163b37feba
17SHA1 (patch-src_lib_libast_include_vmalloc.h) = 165a39666a4f9c155e8c1af6220e351ac3b8189a 18SHA1 (patch-src_lib_libast_include_vmalloc.h) = 165a39666a4f9c155e8c1af6220e351ac3b8189a
18SHA1 (patch-src_lib_libast_vmalloc_malloc.c) = 1256ade4a1bee59dccde6c549736a84bf14f0ae4 19SHA1 (patch-src_lib_libast_vmalloc_malloc.c) = 1256ade4a1bee59dccde6c549736a84bf14f0ae4

File Added: pkgsrc/shells/ast-ksh/patches/patch-src_lib_libast_comp_tmpnam.c
$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)