Fri Nov 25 23:29:47 2022 UTC ()
bash: properly install shared objects; pkglint fixes


(adam)
diff -r1.107 -r1.108 pkgsrc/shells/bash/Makefile
diff -r1.75 -r1.76 pkgsrc/shells/bash/distinfo
diff -r0 -r1.1 pkgsrc/shells/bash/patches/patch-Makefile.in
diff -r0 -r1.1 pkgsrc/shells/bash/patches/patch-builtins_printf.def
diff -r0 -r1.1 pkgsrc/shells/bash/patches/patch-builtins_psize.c
diff -r0 -r1.1 pkgsrc/shells/bash/patches/patch-examples_loadables_Makefile.in
diff -r1.8 -r0 pkgsrc/shells/bash/patches/patch-af
diff -r1.4 -r0 pkgsrc/shells/bash/patches/patch-ag
diff -r1.2 -r0 pkgsrc/shells/bash/patches/patch-aj

cvs diff -r1.107 -r1.108 pkgsrc/shells/bash/Makefile (expand / switch to unified diff)

--- pkgsrc/shells/bash/Makefile 2022/11/25 18:20:46 1.107
+++ pkgsrc/shells/bash/Makefile 2022/11/25 23:29:47 1.108
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: Makefile,v 1.107 2022/11/25 18:20:46 kre Exp $ 1# $NetBSD: Makefile,v 1.108 2022/11/25 23:29:47 adam Exp $
2 2
3BASH_VERSION= 5.2 3BASH_VERSION= 5.2
4BASH_PATCHLEVEL= 12 4BASH_PATCHLEVEL= 12
5 5
6DISTNAME= bash-${BASH_VERSION} 6DISTNAME= bash-${BASH_VERSION}
7PKGNAME= bash-${BASH_VERSION}.${BASH_PATCHLEVEL} 7PKGNAME= bash-${BASH_VERSION}.${BASH_PATCHLEVEL}
8CATEGORIES= shells 8CATEGORIES= shells
9MASTER_SITES= ${MASTER_SITE_GNU:=bash/} 9MASTER_SITES= ${MASTER_SITE_GNU:=bash/}
10 10
11PATCH_SITES= ${MASTER_SITES:=bash-5.2-patches/} 11PATCH_SITES= ${MASTER_SITES:=bash-5.2-patches/}
12PATCHFILES+= bash52-001 bash52-002 bash52-003 bash52-004 bash52-005 12PATCHFILES+= bash52-001 bash52-002 bash52-003 bash52-004 bash52-005
13PATCHFILES+= bash52-006 bash52-007 bash52-008 bash52-009 bash52-010 13PATCHFILES+= bash52-006 bash52-007 bash52-008 bash52-009 bash52-010
14PATCHFILES+= bash52-011 bash52-012 14PATCHFILES+= bash52-011 bash52-012
@@ -60,27 +60,27 @@ CONFIGURE_ARGS+= --enable-job-control @@ -60,27 +60,27 @@ CONFIGURE_ARGS+= --enable-job-control
60# bash malloc() is broken on Minix and musl libc 60# bash malloc() is broken on Minix and musl libc
61.if ${OPSYS} == "Minix" || (${OPSYS} == "Linux" && empty(GLIBC_VERSION)) 61.if ${OPSYS} == "Minix" || (${OPSYS} == "Linux" && empty(GLIBC_VERSION))
62CONFIGURE_ARGS+= --with-bash-malloc=no 62CONFIGURE_ARGS+= --with-bash-malloc=no
63.endif 63.endif
64 64
65# Use "readline" package on Darwin to avoid link erros. 65# Use "readline" package on Darwin to avoid link erros.
66.if ${OPSYS} == "Darwin" 66.if ${OPSYS} == "Darwin"
67CONFIGURE_ARGS+= --with-installed-readline 67CONFIGURE_ARGS+= --with-installed-readline
68 68
69BUILDLINK_API_DEPENDS.readline+= readline>=7.0 69BUILDLINK_API_DEPENDS.readline+= readline>=7.0
70.include "../../devel/readline/buildlink3.mk" 70.include "../../devel/readline/buildlink3.mk"
71.endif 71.endif
72 72
73.if !empty(USE_CROSS_COMPILE:M[yY][eE][sS]) && ${OPSYS} == "NetBSD" 73.if ${USE_CROSS_COMPILE:U:tl} == yes && ${OPSYS} == "NetBSD"
74CONFIGURE_ENV+= CC_FOR_BUILD=${NATIVE_CC:Q} 74CONFIGURE_ENV+= CC_FOR_BUILD=${NATIVE_CC:Q}
75CONFIGURE_ENV+= ac_cv_c_long_long=yes 75CONFIGURE_ENV+= ac_cv_c_long_long=yes
76CONFIGURE_ENV+= ac_cv_c_long_double=yes 76CONFIGURE_ENV+= ac_cv_c_long_double=yes
77CONFIGURE_ENV+= bash_cv_type_rlimit=yes 77CONFIGURE_ENV+= bash_cv_type_rlimit=yes
78CONFIGURE_ENV+= bash_cv_getcwd_malloc=yes 78CONFIGURE_ENV+= bash_cv_getcwd_malloc=yes
79CONFIGURE_ENV+= bash_cv_func_sigsetjmp=yes 79CONFIGURE_ENV+= bash_cv_func_sigsetjmp=yes
80CONFIGURE_ENV+= bash_cv_printf_a_format=yes 80CONFIGURE_ENV+= bash_cv_printf_a_format=yes
81CONFIGURE_ENV+= bash_cv_job_control_missing=present 81CONFIGURE_ENV+= bash_cv_job_control_missing=present
82CONFIGURE_ENV+= bash_cv_sys_named_pipes=present 82CONFIGURE_ENV+= bash_cv_sys_named_pipes=present
83CONFIGURE_ENV+= bash_cv_unusable_rtsigs=no 83CONFIGURE_ENV+= bash_cv_unusable_rtsigs=no
84CONFIGURE_ENV+= bash_cv_func_ctype_nonascii=yes 84CONFIGURE_ENV+= bash_cv_func_ctype_nonascii=yes
85CONFIGURE_ENV+= bash_cv_wexitstatus_offset=8 85CONFIGURE_ENV+= bash_cv_wexitstatus_offset=8
86.endif 86.endif

cvs diff -r1.75 -r1.76 pkgsrc/shells/bash/distinfo (expand / switch to unified diff)

--- pkgsrc/shells/bash/distinfo 2022/11/25 18:20:46 1.75
+++ pkgsrc/shells/bash/distinfo 2022/11/25 23:29:47 1.76
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1$NetBSD: distinfo,v 1.75 2022/11/25 18:20:46 kre Exp $ 1$NetBSD: distinfo,v 1.76 2022/11/25 23:29:47 adam Exp $
2 2
3BLAKE2s (bash-5.2.tar.gz) = 430755ea2af4903dba2bdbeffd4d861edb9f54c248071362f0d14f15171764cd 3BLAKE2s (bash-5.2.tar.gz) = 430755ea2af4903dba2bdbeffd4d861edb9f54c248071362f0d14f15171764cd
4SHA512 (bash-5.2.tar.gz) = 5647636223ba336bf33e0c65e516d8ebcf6932de8b44f37bc468eedb87579c628ad44213f78534beb10f47aebb9c6fa670cb0bed3b4e7717e5faf7e9a1ef81ae 4SHA512 (bash-5.2.tar.gz) = 5647636223ba336bf33e0c65e516d8ebcf6932de8b44f37bc468eedb87579c628ad44213f78534beb10f47aebb9c6fa670cb0bed3b4e7717e5faf7e9a1ef81ae
5Size (bash-5.2.tar.gz) = 10950833 bytes 5Size (bash-5.2.tar.gz) = 10950833 bytes
6BLAKE2s (bash52-001) = 6b618f14e67c2133268a4bfec8649032adbd91a7cb438ffac51e873001fbc930 6BLAKE2s (bash52-001) = 6b618f14e67c2133268a4bfec8649032adbd91a7cb438ffac51e873001fbc930
7SHA512 (bash52-001) = d1e5d508a4a1888052434adff551732c4215372174adb19dce9514faa18c78ee690e1c0fd9858e15c76fbb910ccace7e62751c3c266f5db253dbffda8c882409 7SHA512 (bash52-001) = d1e5d508a4a1888052434adff551732c4215372174adb19dce9514faa18c78ee690e1c0fd9858e15c76fbb910ccace7e62751c3c266f5db253dbffda8c882409
8Size (bash52-001) = 1381 bytes 8Size (bash52-001) = 1381 bytes
9BLAKE2s (bash52-002) = 63fc1b73de77a9e46a7ded54564dfdd6ea5f978d14133d425fb2f783fa3e441e 9BLAKE2s (bash52-002) = 63fc1b73de77a9e46a7ded54564dfdd6ea5f978d14133d425fb2f783fa3e441e
10SHA512 (bash52-002) = 2484262d6cb32303c761793af2c352062421054149fcf3f591a590e409bb21985683a1e50669547e396eea46f1081ae0821076c3975357dc6c850f94cdd527c1 10SHA512 (bash52-002) = 2484262d6cb32303c761793af2c352062421054149fcf3f591a590e409bb21985683a1e50669547e396eea46f1081ae0821076c3975357dc6c850f94cdd527c1
11Size (bash52-002) = 1328 bytes 11Size (bash52-002) = 1328 bytes
12BLAKE2s (bash52-003) = b1e967bd7c6a231c2168c9140e0a6fd77a99b94861069188872fa597755c633e 12BLAKE2s (bash52-003) = b1e967bd7c6a231c2168c9140e0a6fd77a99b94861069188872fa597755c633e
13SHA512 (bash52-003) = c8dac54c8b1805dc756efd06be3092a4de1c45bc1e97b574ca49bf4152515a545d154a84c1d9a82747c79d676b8330254856380bc929d8e835b10af743d66cbb 13SHA512 (bash52-003) = c8dac54c8b1805dc756efd06be3092a4de1c45bc1e97b574ca49bf4152515a545d154a84c1d9a82747c79d676b8330254856380bc929d8e835b10af743d66cbb
14Size (bash52-003) = 2157 bytes 14Size (bash52-003) = 2157 bytes
@@ -29,22 +29,23 @@ SHA512 (bash52-008) = 1f317f3c2313ede7b6 @@ -29,22 +29,23 @@ SHA512 (bash52-008) = 1f317f3c2313ede7b6
29Size (bash52-008) = 1771 bytes 29Size (bash52-008) = 1771 bytes
30BLAKE2s (bash52-009) = e91a935ace0ba2650e91ce0fe7482cdccbff37c9d0ebab148e682feece5953f1 30BLAKE2s (bash52-009) = e91a935ace0ba2650e91ce0fe7482cdccbff37c9d0ebab148e682feece5953f1
31SHA512 (bash52-009) = 71fffb71e5876e7abea7e769f4438f2f8d3843d7dfec13f1ba7e79ead5b001d7543c92eb3a628b393f8652bf136e4768c1d1c7b55c155cafe83886b900396e68 31SHA512 (bash52-009) = 71fffb71e5876e7abea7e769f4438f2f8d3843d7dfec13f1ba7e79ead5b001d7543c92eb3a628b393f8652bf136e4768c1d1c7b55c155cafe83886b900396e68
32Size (bash52-009) = 1316 bytes 32Size (bash52-009) = 1316 bytes
33BLAKE2s (bash52-010) = 1c2e9c5012b29feca17550832ab8c46b371d6f46b3d5f6bf20c5dd825a1c342a 33BLAKE2s (bash52-010) = 1c2e9c5012b29feca17550832ab8c46b371d6f46b3d5f6bf20c5dd825a1c342a
34SHA512 (bash52-010) = 12d120e39593d3f23aa86e510b0eda514ec69ef42e910e5855e4c7510354e8504e5d6949770448f5632ce482c9ab468f4ba82a8a38b4a8237cdd7b54f742946a 34SHA512 (bash52-010) = 12d120e39593d3f23aa86e510b0eda514ec69ef42e910e5855e4c7510354e8504e5d6949770448f5632ce482c9ab468f4ba82a8a38b4a8237cdd7b54f742946a
35Size (bash52-010) = 2045 bytes 35Size (bash52-010) = 2045 bytes
36BLAKE2s (bash52-011) = 04bd4027dac0079da2dbbaa47a2cc00dcf4b994689693a56a51babcd55b63518 36BLAKE2s (bash52-011) = 04bd4027dac0079da2dbbaa47a2cc00dcf4b994689693a56a51babcd55b63518
37SHA512 (bash52-011) = 83a7584ca8ee512839183e329183476a2c8bcb995e3dc9d5188f04f11760bd3cb0f2d29d12bca2661b7ce8ab125d44d35d839f735992ca6c27f936d609ac4683 37SHA512 (bash52-011) = 83a7584ca8ee512839183e329183476a2c8bcb995e3dc9d5188f04f11760bd3cb0f2d29d12bca2661b7ce8ab125d44d35d839f735992ca6c27f936d609ac4683
38Size (bash52-011) = 1229 bytes 38Size (bash52-011) = 1229 bytes
39BLAKE2s (bash52-012) = b980049d0314616909334aa332dbe55e7f2c4be0cab342a2b35342ca98d4c9af 39BLAKE2s (bash52-012) = b980049d0314616909334aa332dbe55e7f2c4be0cab342a2b35342ca98d4c9af
40SHA512 (bash52-012) = 8f969cb36ee81ac47a4c3c6ee7fbe62159192fa4f14cb48973eccd55c458e6a093adc3045ee1c379544d8183d77813977a43cad5d225322d8816540a1cb8893b 40SHA512 (bash52-012) = 8f969cb36ee81ac47a4c3c6ee7fbe62159192fa4f14cb48973eccd55c458e6a093adc3045ee1c379544d8183d77813977a43cad5d225322d8816540a1cb8893b
41Size (bash52-012) = 9107 bytes 41Size (bash52-012) = 9107 bytes
42SHA1 (patch-af) = e26e3209902247263884cfebc11a2f7e43245062 42SHA1 (patch-Makefile.in) = 2e4c15afd9b50d44967ee8e1f85bdc908c0eeeb0
43SHA1 (patch-ag) = cd3b151e3bb045d2bb609c0a03d7d3df2c871f47 43SHA1 (patch-builtins_printf.def) = e26e3209902247263884cfebc11a2f7e43245062
44SHA1 (patch-aj) = 2e4c15afd9b50d44967ee8e1f85bdc908c0eeeb0 44SHA1 (patch-builtins_psize.c) = cd3b151e3bb045d2bb609c0a03d7d3df2c871f47
45SHA1 (patch-builtins_ulimit.def) = 1390069344607204eb3abbd6ddeb148ff590c55e 45SHA1 (patch-builtins_ulimit.def) = 1390069344607204eb3abbd6ddeb148ff590c55e
46SHA1 (patch-configure) = c4e1ab53a1ee85f3e6121047f0aca8ceb85e6e5d 46SHA1 (patch-configure) = c4e1ab53a1ee85f3e6121047f0aca8ceb85e6e5d
 47SHA1 (patch-examples_loadables_Makefile.in) = 0d27f82399c4ae9fae8ac0f8c48c68a23a3dcbd8
47SHA1 (patch-examples_loadables_fdflags.c) = dce409c76b7d6c838eb25c3ccc7a89ee57ca69b8 48SHA1 (patch-examples_loadables_fdflags.c) = dce409c76b7d6c838eb25c3ccc7a89ee57ca69b8
48SHA1 (patch-examples_loadables_getconf.c) = a71df9f54d77ee14de453b67bd4b3658ad7123eb 49SHA1 (patch-examples_loadables_getconf.c) = a71df9f54d77ee14de453b67bd4b3658ad7123eb
49SHA1 (patch-lib_malloc_malloc.c) = 6e500228972eac0cb4d4defb02e9cf573b7fa207 50SHA1 (patch-lib_malloc_malloc.c) = 6e500228972eac0cb4d4defb02e9cf573b7fa207
50SHA1 (patch-support_shobj-conf) = 010d5058262a23add420deed6c44a605bb16aa26 51SHA1 (patch-support_shobj-conf) = 010d5058262a23add420deed6c44a605bb16aa26

File Added: pkgsrc/shells/bash/patches/patch-Makefile.in
$NetBSD: patch-Makefile.in,v 1.1 2022/11/25 23:29:47 adam Exp $

This patch fixes the build on MirBSD and OpenBSD, where LIBINTL and
LIBICONV are incorrectly set.

--- Makefile.in.orig	2014-01-25 21:27:30.000000000 +0000
+++ Makefile.in
@@ -353,7 +353,7 @@ INTL_LIBDIR = $(dot)/$(LIBSUBDIR)/intl
 INTL_ABSSRC = ${topdir}/$(INTL_LIB)
 INTL_BUILDDIR = ${LIBBUILD}/intl
 
-INTL_LIB     = @LIBINTL@
+INTL_LIB     = @LTLIBINTL@
 INTL_LIBRARY = $(INTL_LIBDIR)/libintl.a
 INTL_DEP = @INTL_DEP@
 INTL_INC = @INTL_INC@
@@ -361,7 +361,7 @@ INTL_INC = @INTL_INC@
 LIBINTL_H = @LIBINTL_H@
 
 # libiconv
-LIBICONV = @LIBICONV@
+LIBICONV = @LTLIBICONV@
 
 # tests
 LIBINTL = @LIBINTL@

File Added: pkgsrc/shells/bash/patches/patch-builtins_printf.def
$NetBSD: patch-builtins_printf.def,v 1.1 2022/11/25 23:29:47 adam Exp $

Fixes PRIdMAX and PRIuMAX on AIX < 5.1.

--- builtins/printf.def.orig	2014-01-03 15:35:33.000000000 +0000
+++ builtins/printf.def
@@ -95,6 +95,11 @@ $END
 #  undef PRIdMAX
 #endif
 
+#if defined (_AIX) && !defined (_AIX51)
+   /* AIX defines do not work.  Undefine them.  */
+#  undef PRIdMAX
+#  undef PRIuMAX
+#endif
 #if !defined (PRIdMAX)
 #  if HAVE_LONG_LONG
 #    define PRIdMAX	"lld"
@@ -102,6 +107,13 @@ $END
 #    define PRIdMAX	"ld"
 #  endif
 #endif
+#if !defined (PRIuMAX) && defined (_AIX)
+#  if HAVE_LONG_LONG
+#    define PRIuMAX "llu"
+#  else
+#    define PRIuMAX "lu"
+#  endif
+#endif
 
 #if !defined (errno)
 extern int errno;
@@ -594,7 +606,11 @@ printf_builtin (list)
 		p = pp = getintmax ();
 		if (p != pp)
 		  {
+#if defined (_AIX) && !defined (_AIX51)
+		    f = mklong (start, PRIdMAX, sizeof (intmax_t) - 2);
+#else
 		    f = mklong (start, PRIdMAX, sizeof (PRIdMAX) - 2);
+#endif
 		    PF (f, pp);
 		  }
 		else
@@ -621,7 +637,11 @@ printf_builtin (list)
 		p = pp = getuintmax ();
 		if (p != pp)
 		  {
+#if defined (_AIX) && !defined (_AIX51)
+		    f = mklong (start, PRIuMAX, sizeof (uintmax_t) - 2);
+#else
 		    f = mklong (start, PRIdMAX, sizeof (PRIdMAX) - 2);
+#endif
 		    PF (f, pp);
 		  }
 		else

File Added: pkgsrc/shells/bash/patches/patch-builtins_psize.c
$NetBSD: patch-builtins_psize.c,v 1.1 2022/11/25 23:29:47 adam Exp $

Use the definition of errno from <errno.h>.

--- builtins/psize.c.orig	2008-08-14 19:56:53.000000000 +0000
+++ builtins/psize.c
@@ -41,10 +41,6 @@
 #include "../general.h"
 #include "../sig.h"
 
-#ifndef errno
-extern int errno;
-#endif
-
 int nw;
 
 sighandler

File Added: pkgsrc/shells/bash/patches/patch-examples_loadables_Makefile.in
$NetBSD: patch-examples_loadables_Makefile.in,v 1.1 2022/11/25 23:29:47 adam Exp $

Correctly install shared objects (e.g. unstripped on some platforms).

--- examples/loadables/Makefile.in.orig	2022-11-25 23:21:05.000000000 +0000
+++ examples/loadables/Makefile.in
@@ -281,7 +281,7 @@ install-supported:	all installdirs insta
 	@echo installing example loadable builtins in $(DESTDIR)${loadablesdir}
 	@for prog in ${ALLPROG}; do \
 		echo $$prog ; \
-		$(INSTALL_PROGRAM) $(INSTALLMODE) $$prog $(DESTDIR)$(loadablesdir)/$$prog ;\
+		${BSD_INSTALL_LIB} $(INSTALLMODE) $$prog $(DESTDIR)$(loadablesdir)/$$prog ;\
 	done
 
 uninstall-dev:

File Deleted: pkgsrc/shells/bash/patches/Attic/patch-af

File Deleted: pkgsrc/shells/bash/patches/Attic/patch-ag

File Deleted: pkgsrc/shells/bash/patches/Attic/patch-aj