pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/shells/ast-ksh ast-ksh: fix compilation on NetBSD, pos...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/3e98268b5d66
branches:  trunk
changeset: 358748:3e98268b5d66
user:      maya <maya%pkgsrc.org@localhost>
date:      Sun Feb 19 20:18:16 2017 +0000

description:
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:

 shells/ast-ksh/Makefile                                   |   4 +-
 shells/ast-ksh/Makefile.common                            |  11 +++-----
 shells/ast-ksh/distinfo                                   |   3 +-
 shells/ast-ksh/patches/patch-src_lib_libast_comp_tmpnam.c |  20 +++++++++++++++
 4 files changed, 28 insertions(+), 10 deletions(-)

diffs (84 lines):

diff -r f55c3fd17ca3 -r 3e98268b5d66 shells/ast-ksh/Makefile
--- a/shells/ast-ksh/Makefile   Sun Feb 19 19:15:10 2017 +0000
+++ b/shells/ast-ksh/Makefile   Sun Feb 19 20:18:16 2017 +0000
@@ -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 -r f55c3fd17ca3 -r 3e98268b5d66 shells/ast-ksh/Makefile.common
--- a/shells/ast-ksh/Makefile.common    Sun Feb 19 19:15:10 2017 +0000
+++ b/shells/ast-ksh/Makefile.common    Sun Feb 19 20:18:16 2017 +0000
@@ -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 @@
 # 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 -r f55c3fd17ca3 -r 3e98268b5d66 shells/ast-ksh/distinfo
--- a/shells/ast-ksh/distinfo   Sun Feb 19 19:15:10 2017 +0000
+++ b/shells/ast-ksh/distinfo   Sun Feb 19 20:18:16 2017 +0000
@@ -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 @@
 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 -r f55c3fd17ca3 -r 3e98268b5d66 shells/ast-ksh/patches/patch-src_lib_libast_comp_tmpnam.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/shells/ast-ksh/patches/patch-src_lib_libast_comp_tmpnam.c Sun Feb 19 20:18:16 2017 +0000
@@ -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)



Home | Main Index | Thread Index | Old Index