public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: sys-devel/m4/files/, sys-devel/m4/
@ 2016-04-20 23:00 Anthony G. Basile
  0 siblings, 0 replies; 11+ messages in thread
From: Anthony G. Basile @ 2016-04-20 23:00 UTC (permalink / raw
  To: gentoo-commits

commit:     d2fb79b419c1da51746a75a5f55e8b10a7993673
Author:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Wed Apr 20 22:59:42 2016 +0000
Commit:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Wed Apr 20 23:00:34 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d2fb79b4

sys-devel/m4: fix spawn_h.m4 for uclibc, bug #580688

Package-Manager: portage-2.2.26

 sys-devel/m4/files/m4-1.4.17-fix-spawn_h_m4.patch | 31 +++++++++++++++++++++++
 sys-devel/m4/m4-1.4.17.ebuild                     |  8 ++++--
 2 files changed, 37 insertions(+), 2 deletions(-)

diff --git a/sys-devel/m4/files/m4-1.4.17-fix-spawn_h_m4.patch b/sys-devel/m4/files/m4-1.4.17-fix-spawn_h_m4.patch
new file mode 100644
index 0000000..dbbac65
--- /dev/null
+++ b/sys-devel/m4/files/m4-1.4.17-fix-spawn_h_m4.patch
@@ -0,0 +1,31 @@
+commit d6eab2e70fc5ccc82a73e5c988b76a229e4cd3d5
+Author: Pádraig Brady <P@draigBrady.com>
+Date:   Tue Jan 14 16:59:07 2014 +0000
+
+    spawn: fix link error on uclibc
+    
+    * m4/spawn_h.m4 (gl_HAVE_POSIX_SPAWN): use AC_SEARCH_LIBS,
+    to incorporate -lrt if needed (on uclibc for example).
+    * modules/posix_spawn: Reference the substituted LIB.
+
+diff --git a/m4/spawn_h.m4 b/m4/spawn_h.m4
+index 87fe122..3eb835c 100644
+--- a/m4/spawn_h.m4
++++ b/m4/spawn_h.m4
+@@ -64,7 +64,15 @@ AC_DEFUN([gl_HAVE_POSIX_SPAWN],
+   dnl once only, before all statements that occur in other macros.
+   AC_REQUIRE([gl_SPAWN_H_DEFAULTS])
+ 
+-  AC_CHECK_FUNCS_ONCE([posix_spawn])
++  LIB_POSIX_SPAWN=
++  AC_SUBST([LIB_POSIX_SPAWN])
++  gl_saved_libs=$LIBS
++    AC_SEARCH_LIBS([posix_spawn], [rt],
++                   [test "$ac_cv_search_posix_spawn" = "none required" ||
++                    LIB_POSIX_SPAWN=$ac_cv_search_posix_spawn])
++    AC_CHECK_FUNCS([posix_spawn])
++  LIBS=$gl_saved_libs
++
+   if test $ac_cv_func_posix_spawn != yes; then
+     HAVE_POSIX_SPAWN=0
+   fi

diff --git a/sys-devel/m4/m4-1.4.17.ebuild b/sys-devel/m4/m4-1.4.17.ebuild
index 3e45c8c..b28aa18 100644
--- a/sys-devel/m4/m4-1.4.17.ebuild
+++ b/sys-devel/m4/m4-1.4.17.ebuild
@@ -1,8 +1,10 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
-EAPI="4"
+EAPI="5"
+
+inherit eutils
 
 DESCRIPTION="GNU macro processor"
 HOMEPAGE="https://www.gnu.org/software/m4/m4.html"
@@ -18,6 +20,8 @@ DEPEND="app-arch/xz-utils"
 RDEPEND=""
 
 src_prepare() {
+	epatch "${FILESDIR}"/${P}-fix-spawn_h_m4.patch #580688
+
 	# Disable gnulib build test that has no impact on the source.
 	# Re-enable w/next version bump (and gnulib is updated). #554728
 	[[ ${PV} != "1.4.17" ]] && die "re-enable test #554728"


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-devel/m4/files/, sys-devel/m4/
@ 2016-04-25 22:57 Anthony G. Basile
  0 siblings, 0 replies; 11+ messages in thread
From: Anthony G. Basile @ 2016-04-25 22:57 UTC (permalink / raw
  To: gentoo-commits

commit:     4cd636ae6940f204fdffdad8954f5043cf93a204
Author:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Mon Apr 25 21:53:51 2016 +0000
Commit:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Mon Apr 25 22:57:36 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4cd636ae

Revert "sys-devel/m4: fix spawn_h.m4 for uclibc, bug #580688"

This reverts commit d2fb79b419c1da51746a75a5f55e8b10a7993673.

 sys-devel/m4/files/m4-1.4.17-fix-spawn_h_m4.patch | 31 -----------------------
 sys-devel/m4/m4-1.4.17.ebuild                     |  8 ++----
 2 files changed, 2 insertions(+), 37 deletions(-)

diff --git a/sys-devel/m4/files/m4-1.4.17-fix-spawn_h_m4.patch b/sys-devel/m4/files/m4-1.4.17-fix-spawn_h_m4.patch
deleted file mode 100644
index dbbac65..0000000
--- a/sys-devel/m4/files/m4-1.4.17-fix-spawn_h_m4.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-commit d6eab2e70fc5ccc82a73e5c988b76a229e4cd3d5
-Author: Pádraig Brady <P@draigBrady.com>
-Date:   Tue Jan 14 16:59:07 2014 +0000
-
-    spawn: fix link error on uclibc
-    
-    * m4/spawn_h.m4 (gl_HAVE_POSIX_SPAWN): use AC_SEARCH_LIBS,
-    to incorporate -lrt if needed (on uclibc for example).
-    * modules/posix_spawn: Reference the substituted LIB.
-
-diff --git a/m4/spawn_h.m4 b/m4/spawn_h.m4
-index 87fe122..3eb835c 100644
---- a/m4/spawn_h.m4
-+++ b/m4/spawn_h.m4
-@@ -64,7 +64,15 @@ AC_DEFUN([gl_HAVE_POSIX_SPAWN],
-   dnl once only, before all statements that occur in other macros.
-   AC_REQUIRE([gl_SPAWN_H_DEFAULTS])
- 
--  AC_CHECK_FUNCS_ONCE([posix_spawn])
-+  LIB_POSIX_SPAWN=
-+  AC_SUBST([LIB_POSIX_SPAWN])
-+  gl_saved_libs=$LIBS
-+    AC_SEARCH_LIBS([posix_spawn], [rt],
-+                   [test "$ac_cv_search_posix_spawn" = "none required" ||
-+                    LIB_POSIX_SPAWN=$ac_cv_search_posix_spawn])
-+    AC_CHECK_FUNCS([posix_spawn])
-+  LIBS=$gl_saved_libs
-+
-   if test $ac_cv_func_posix_spawn != yes; then
-     HAVE_POSIX_SPAWN=0
-   fi

diff --git a/sys-devel/m4/m4-1.4.17.ebuild b/sys-devel/m4/m4-1.4.17.ebuild
index b28aa18..3e45c8c 100644
--- a/sys-devel/m4/m4-1.4.17.ebuild
+++ b/sys-devel/m4/m4-1.4.17.ebuild
@@ -1,10 +1,8 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2015 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
-EAPI="5"
-
-inherit eutils
+EAPI="4"
 
 DESCRIPTION="GNU macro processor"
 HOMEPAGE="https://www.gnu.org/software/m4/m4.html"
@@ -20,8 +18,6 @@ DEPEND="app-arch/xz-utils"
 RDEPEND=""
 
 src_prepare() {
-	epatch "${FILESDIR}"/${P}-fix-spawn_h_m4.patch #580688
-
 	# Disable gnulib build test that has no impact on the source.
 	# Re-enable w/next version bump (and gnulib is updated). #554728
 	[[ ${PV} != "1.4.17" ]] && die "re-enable test #554728"


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-devel/m4/files/, sys-devel/m4/
@ 2016-04-25 22:57 Anthony G. Basile
  0 siblings, 0 replies; 11+ messages in thread
From: Anthony G. Basile @ 2016-04-25 22:57 UTC (permalink / raw
  To: gentoo-commits

commit:     aaf6442f3c201cd7bffe6403c03d460702e7bbba
Author:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Mon Apr 25 22:56:59 2016 +0000
Commit:     Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Mon Apr 25 22:57:39 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aaf6442f

sys-devel/m4: fix spawn_h.m4 for uclibc, bugs #580688, #581086

Package-Manager: portage-2.2.26

 sys-devel/m4/files/m4-1.4.17-posix_spawn.patch | 111 +++++++++++++++++++++++++
 sys-devel/m4/m4-1.4.17.ebuild                  |   8 +-
 2 files changed, 117 insertions(+), 2 deletions(-)

diff --git a/sys-devel/m4/files/m4-1.4.17-posix_spawn.patch b/sys-devel/m4/files/m4-1.4.17-posix_spawn.patch
new file mode 100644
index 0000000..5954cc3
--- /dev/null
+++ b/sys-devel/m4/files/m4-1.4.17-posix_spawn.patch
@@ -0,0 +1,111 @@
+This fixes the search for posix_spawn() to use AC_SEARCH_LIBS which
+is needed for uClibc which puts the function in librt [1].  The fix
+is in gnulib commit d6eab2e [2], but we can't just apply that patch
+and autoreconf because that means we must depend on autotools.eclass
+and this leads to a circular dependency.  So we have to patch
+configure directlly.
+
+[1] https://bugs.gentoo.org/show_bug.cgi?id=580688
+[2] http://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=d6eab2e70fc5ccc82a73e5c988b76a229e4cd3d5
+[3] https://bugs.gentoo.org/show_bug.cgi?id=581086
+
+Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
+
+diff -Naur m4-1.4.17.orig/configure m4-1.4.17/configure
+--- m4-1.4.17.orig/configure	2013-09-22 06:38:28.000000000 +0000
++++ m4-1.4.17/configure	2016-04-25 22:27:12.774118561 +0000
+@@ -808,6 +808,7 @@
+ GNULIB_SIGNAL_H_SIGPIPE
+ GNULIB_RAISE
+ GNULIB_PTHREAD_SIGMASK
++LIB_POSIX_SPAWN
+ REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN
+ REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2
+ REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE
+@@ -3590,7 +3591,6 @@
+ as_fn_append ac_func_list " mkstemp"
+ as_fn_append ac_func_list " nl_langinfo"
+ as_fn_append ac_func_list " pipe2"
+-as_fn_append ac_func_list " posix_spawn"
+ gl_printf_safe=yes
+ as_fn_append ac_func_list " isblank"
+ as_fn_append ac_func_list " iswctype"
+@@ -15877,8 +15881,78 @@
+ 
+ 
+ 
++  LIB_POSIX_SPAWN=
++
++  gl_saved_libs=$LIBS
++    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing posix_spawn" >&5
++$as_echo_n "checking for library containing posix_spawn... " >&6; }
++if ${ac_cv_search_posix_spawn+:} false; then :
++  $as_echo_n "(cached) " >&6
++else
++  ac_func_search_save_LIBS=$LIBS
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++
++/* Override any GCC internal prototype to avoid an error.
++   Use char because int might match the return type of a GCC
++   builtin and then its argument prototype would still apply.  */
++#ifdef __cplusplus
++extern "C"
++#endif
++char posix_spawn ();
++int
++main ()
++{
++return posix_spawn ();
++  ;
++  return 0;
++}
++_ACEOF
++for ac_lib in '' rt; do
++  if test -z "$ac_lib"; then
++    ac_res="none required"
++  else
++    ac_res=-l$ac_lib
++    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
++  fi
++  if ac_fn_c_try_link "$LINENO"; then :
++  ac_cv_search_posix_spawn=$ac_res
++fi
++rm -f core conftest.err conftest.$ac_objext \
++    conftest$ac_exeext
++  if ${ac_cv_search_posix_spawn+:} false; then :
++  break
++fi
++done
++if ${ac_cv_search_posix_spawn+:} false; then :
++
++else
++  ac_cv_search_posix_spawn=no
++fi
++rm conftest.$ac_ext
++LIBS=$ac_func_search_save_LIBS
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_posix_spawn" >&5
++$as_echo "$ac_cv_search_posix_spawn" >&6; }
++ac_res=$ac_cv_search_posix_spawn
++if test "$ac_res" != no; then :
++  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
++  test "$ac_cv_search_posix_spawn" = "none required" ||
++                    LIB_POSIX_SPAWN=$ac_cv_search_posix_spawn
++fi
++
++    for ac_func in posix_spawn
++do :
++  ac_fn_c_check_func "$LINENO" "posix_spawn" "ac_cv_func_posix_spawn"
++if test "x$ac_cv_func_posix_spawn" = xyes; then :
++  cat >>confdefs.h <<_ACEOF
++#define HAVE_POSIX_SPAWN 1
++_ACEOF
+ 
++fi
++done
+ 
++  LIBS=$gl_saved_libs
+ 
+   if test $ac_cv_func_posix_spawn != yes; then
+     HAVE_POSIX_SPAWN=0

diff --git a/sys-devel/m4/m4-1.4.17.ebuild b/sys-devel/m4/m4-1.4.17.ebuild
index 3e45c8c..59480bb 100644
--- a/sys-devel/m4/m4-1.4.17.ebuild
+++ b/sys-devel/m4/m4-1.4.17.ebuild
@@ -1,8 +1,10 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
-EAPI="4"
+EAPI="5"
+
+inherit eutils
 
 DESCRIPTION="GNU macro processor"
 HOMEPAGE="https://www.gnu.org/software/m4/m4.html"
@@ -18,6 +20,8 @@ DEPEND="app-arch/xz-utils"
 RDEPEND=""
 
 src_prepare() {
+	epatch "${FILESDIR}"/${P}-posix_spawn.patch #580688, 581086
+
 	# Disable gnulib build test that has no impact on the source.
 	# Re-enable w/next version bump (and gnulib is updated). #554728
 	[[ ${PV} != "1.4.17" ]] && die "re-enable test #554728"


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-devel/m4/files/, sys-devel/m4/
@ 2017-01-17 16:23 Lars Wendler
  0 siblings, 0 replies; 11+ messages in thread
From: Lars Wendler @ 2017-01-17 16:23 UTC (permalink / raw
  To: gentoo-commits

commit:     d41559e8def9f1e941ece3743e97b40746a8be7c
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 17 15:19:20 2017 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Tue Jan 17 16:23:01 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d41559e8

sys-devel/m4: Removed old.

Package-Manager: Portage-2.3.3, Repoman-2.3.1

 sys-devel/m4/Manifest                              |  1 -
 .../m4/files/m4-1.4.16-fix-test-readlink.patch     | 11 -----
 sys-devel/m4/files/m4-1.4.16-no-gets.patch         | 24 ----------
 sys-devel/m4/m4-1.4.16.ebuild                      | 55 ----------------------
 4 files changed, 91 deletions(-)

diff --git a/sys-devel/m4/Manifest b/sys-devel/m4/Manifest
index 6259ce1..df511a8 100644
--- a/sys-devel/m4/Manifest
+++ b/sys-devel/m4/Manifest
@@ -1,3 +1,2 @@
-DIST m4-1.4.16.tar.xz 1005264 SHA256 d5b5d51cf8f5b18f3bac39bc2f6b1e61f34d400136ae1a87d075e26a38028d5d SHA512 1123671ab3e0b1b13a4a08035e792a93af0d7d0a5b9027982fe7b5104488a0746906068a0f4774c1f1bc2648ba1bc74d690836e90ff9391464278e4ccbc7edf0 WHIRLPOOL 0438098dab71f6a66c2b18aed2941ef9a2152a8061c2f9903373a1348b261354429806c2bd313f55c7aaa612fe4c2f7628a1fff3c80819565df2a3b664485c23
 DIST m4-1.4.17.tar.xz 1149088 SHA256 f0543c3beb51fa6b3337d8025331591e0e18d8ec2886ed391f1aade43477d508 SHA512 406e6e97c3f5c5f3c8055bac748d4fe8c2e861d97e84ab6d840a2caa7df04f523cc662d6d51f6afae7d6c219d03693c7ae0c1e669a80246a3ceb5e8342b82389 WHIRLPOOL 69a9f9129dd2f2fd0f5d61771cbac2208f10aa83e0d42fe4213eb10283cc68ce1a96717aece99e92890a4135eb7e201c638d4d9bc17ac10026b0989f3a64940e
 DIST m4-1.4.18.tar.xz 1207688 SHA256 f2c1e86ca0a404ff281631bdc8377638992744b175afb806e25871a24a934e07 SHA512 06f583efc3855cd8477d8347544f4ae5153a3e50aea74d21968afa7214784ea3ddfc02d0a2b11324120d76a19f2e804d20de11a456b5da929eb6ae469519b174 WHIRLPOOL bed79746e774e17c8487e0e1c02e62d961dfcdeb3ed0852fb948b77b5baf7b7d35bcf69d6d0d01ff5e8f873fffd0dadc92ebdfcf31bf87ac302e3cfb0e6ce497

diff --git a/sys-devel/m4/files/m4-1.4.16-fix-test-readlink.patch b/sys-devel/m4/files/m4-1.4.16-fix-test-readlink.patch
deleted file mode 100644
index bb887c4..00000000
--- a/sys-devel/m4/files/m4-1.4.16-fix-test-readlink.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- tests/test-readlink.h
-+++ tests/test-readlink.h
-@@ -38,7 +38,7 @@
-   ASSERT (errno == ENOENT);
-   errno = 0;
-   ASSERT (func ("", buf, sizeof buf) == -1);
--  ASSERT (errno == ENOENT);
-+  ASSERT (errno == ENOENT || errno == EINVAL);
-   errno = 0;
-   ASSERT (func (".", buf, sizeof buf) == -1);
-   ASSERT (errno == EINVAL);

diff --git a/sys-devel/m4/files/m4-1.4.16-no-gets.patch b/sys-devel/m4/files/m4-1.4.16-no-gets.patch
deleted file mode 100644
index bb8069b..00000000
--- a/sys-devel/m4/files/m4-1.4.16-no-gets.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-https://bugs.gentoo.org/424978
-
-hack until m4 pulls a newer gnulib version
-
-From 66712c23388e93e5c518ebc8515140fa0c807348 Mon Sep 17 00:00:00 2001
-From: Eric Blake <eblake@redhat.com>
-Date: Thu, 29 Mar 2012 13:30:41 -0600
-Subject: [PATCH] stdio: don't assume gets any more
-
-Gnulib intentionally does not have a gets module, and now that C11
-and glibc have dropped it, we should be more proactive about warning
-any user on a platform that still has a declaration of this dangerous
-interface.
-
---- a/lib/stdio.in.h
-+++ b/lib/stdio.in.h
-@@ -125,7 +125,6 @@
-    so any use of gets warrants an unconditional warning.  Assume it is
-    always declared, since it is required by C89.  */
- #undef gets
--_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
- 
- #if @GNULIB_FOPEN@
- # if @REPLACE_FOPEN@

diff --git a/sys-devel/m4/m4-1.4.16.ebuild b/sys-devel/m4/m4-1.4.16.ebuild
deleted file mode 100644
index c141bf2..00000000
--- a/sys-devel/m4/m4-1.4.16.ebuild
+++ /dev/null
@@ -1,55 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI="3"
-
-inherit eutils
-
-DESCRIPTION="GNU macro processor"
-HOMEPAGE="https://www.gnu.org/software/m4/m4.html"
-SRC_URI="mirror://gnu/${PN}/${P}.tar.xz"
-
-LICENSE="GPL-3"
-SLOT="0"
-KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE="examples"
-
-# remember: cannot dep on autoconf since it needs us
-DEPEND="app-arch/xz-utils"
-RDEPEND=""
-
-src_prepare() {
-	epatch "${FILESDIR}"/${P}-fix-test-readlink.patch #376639
-	epatch "${FILESDIR}"/${P}-no-gets.patch #424978
-
-	# Disable gnulib build test that has no impact on the source.
-	echo 'exit 0' > tests/test-update-copyright.sh || die
-}
-
-src_configure() {
-	# Disable automagic dependency over libsigsegv; see bug #278026
-	export ac_cv_libsigsegv=no
-
-	local myconf=""
-	[[ ${USERLAND} != "GNU" ]] && myconf="--program-prefix=g"
-	econf --enable-changeword ${myconf}
-}
-
-src_test() {
-	[[ -d /none ]] && die "m4 tests will fail with /none/" #244396
-	emake check || die
-}
-
-src_install() {
-	emake install DESTDIR="${D}" || die
-	# autoconf-2.60 for instance, first checks gm4, then m4.  If we don't have
-	# gm4, it might find gm4 from outside the prefix on for instance Darwin
-	use prefix && dosym /usr/bin/m4 /usr/bin/gm4
-	dodoc BACKLOG ChangeLog NEWS README* THANKS TODO
-	if use examples ; then
-		docinto examples
-		dodoc examples/*
-		rm -f "${ED}"/usr/share/doc/${PF}/examples/Makefile*
-	fi
-}


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-devel/m4/files/, sys-devel/m4/
@ 2018-10-13 17:50 Sergei Trofimovich
  0 siblings, 0 replies; 11+ messages in thread
From: Sergei Trofimovich @ 2018-10-13 17:50 UTC (permalink / raw
  To: gentoo-commits

commit:     a31c6c21fb030d75256ff042e0352f90330545b2
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 13 17:21:38 2018 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sat Oct 13 17:50:35 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a31c6c21

sys-devel/m4: fix build against glibc-2.28, bug #663924

Patch by milan hodoscek.

While at it added 'epatch_user'.

Closes: https://bugs.gentoo.org/663924
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>
Package-Manager: Portage-2.3.51, Repoman-2.3.11

 sys-devel/m4/files/m4-1.4.18-glibc228.patch | 310 ++++++++++++++++++++++++++++
 sys-devel/m4/m4-1.4.18.ebuild               |   4 +-
 2 files changed, 313 insertions(+), 1 deletion(-)

diff --git a/sys-devel/m4/files/m4-1.4.18-glibc228.patch b/sys-devel/m4/files/m4-1.4.18-glibc228.patch
new file mode 100644
index 00000000000..6b5593bfa63
--- /dev/null
+++ b/sys-devel/m4/files/m4-1.4.18-glibc228.patch
@@ -0,0 +1,310 @@
+Fix build failure on glibc-2.28:
+    fseeko.c: In function 'rpl_fseeko':
+    fseeko.c:110:4: error: #error "Please port gnulib fseeko.c to your platform! Look at the code in fseeko.c, then report this to bug-gnulib."
+       #error "Please port gnulib fseeko.c to your platform! Look at the code in fseeko.c, then report this to bug-gnulib."
+
+Patch by milan hodoscek.
+
+https://bugs.gentoo.org/663924
+--- a/old/stdio-impl.h
++++ b/lib/stdio-impl.h
+@@ -1,5 +1,5 @@
+ /* Implementation details of FILE streams.
+-   Copyright (C) 2007-2008, 2010-2016 Free Software Foundation, Inc.
++   Copyright (C) 2007-2008, 2010-2018 Free Software Foundation, Inc.
+ 
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+@@ -12,12 +12,18 @@
+    GNU General Public License for more details.
+ 
+    You should have received a copy of the GNU General Public License
+-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
++   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+ 
+ /* Many stdio implementations have the same logic and therefore can share
+    the same implementation of stdio extension API, except that some fields
+    have different naming conventions, or their access requires some casts.  */
+ 
++/* Glibc 2.28 made _IO_IN_BACKUP private.  For now, work around this
++   problem by defining it ourselves.  FIXME: Do not rely on glibc
++   internals.  */
++#if !defined _IO_IN_BACKUP && defined _IO_EOF_SEEN
++# define _IO_IN_BACKUP 0x100
++#endif
+ 
+ /* BSD stdio derived implementations.  */
+ 
+@@ -29,10 +35,10 @@
+ #include <errno.h>                             /* For detecting Plan9.  */
+ 
+ #if defined __sferror || defined __DragonFly__ || defined __ANDROID__
+-  /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Android */
++  /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */
+ 
+ # if defined __DragonFly__          /* DragonFly */
+-  /* See <http://www.dragonflybsd.org/cvsweb/src/lib/libc/stdio/priv_stdio.h?rev=HEAD&content-type=text/x-cvsweb-markup>.  */
++  /* See <https://gitweb.dragonflybsd.org/dragonfly.git/blob_plain/HEAD:/lib/libc/stdio/priv_stdio.h>.  */
+ #  define fp_ ((struct { struct __FILE_public pub; \
+                          struct { unsigned char *_base; int _size; } _bf; \
+                          void *cookie; \
+@@ -49,30 +55,84 @@
+                          fpos_t _offset; \
+                          /* More fields, not relevant here.  */ \
+                        } *) fp)
+-  /* See <http://www.dragonflybsd.org/cvsweb/src/include/stdio.h?rev=HEAD&content-type=text/x-cvsweb-markup>.  */
++  /* See <https://gitweb.dragonflybsd.org/dragonfly.git/blob_plain/HEAD:/include/stdio.h>.  */
+ #  define _p pub._p
+ #  define _flags pub._flags
+ #  define _r pub._r
+ #  define _w pub._w
++# elif defined __ANDROID__ /* Android */
++  /* Up to this commit from 2015-10-12
++     <https://android.googlesource.com/platform/bionic.git/+/f0141dfab10a4b332769d52fa76631a64741297a>
++     the innards of FILE were public, and fp_ub could be defined like for OpenBSD,
++     see <https://android.googlesource.com/platform/bionic.git/+/e78392637d5086384a5631ddfdfa8d7ec8326ee3/libc/stdio/fileext.h>
++     and <https://android.googlesource.com/platform/bionic.git/+/e78392637d5086384a5631ddfdfa8d7ec8326ee3/libc/stdio/local.h>.
++     After this commit, the innards of FILE are hidden.  */
++#  define fp_ ((struct { unsigned char *_p; \
++                         int _r; \
++                         int _w; \
++                         int _flags; \
++                         int _file; \
++                         struct { unsigned char *_base; size_t _size; } _bf; \
++                         int _lbfsize; \
++                         void *_cookie; \
++                         void *_close; \
++                         void *_read; \
++                         void *_seek; \
++                         void *_write; \
++                         struct { unsigned char *_base; size_t _size; } _ext; \
++                         unsigned char *_up; \
++                         int _ur; \
++                         unsigned char _ubuf[3]; \
++                         unsigned char _nbuf[1]; \
++                         struct { unsigned char *_base; size_t _size; } _lb; \
++                         int _blksize; \
++                         fpos_t _offset; \
++                         /* More fields, not relevant here.  */ \
++                       } *) fp)
+ # else
+ #  define fp_ fp
+ # endif
+ 
+-# if (defined __NetBSD__ && __NetBSD_Version__ >= 105270000) || defined __OpenBSD__ || defined __ANDROID__ /* NetBSD >= 1.5ZA, OpenBSD, Android */
++# if (defined __NetBSD__ && __NetBSD_Version__ >= 105270000) || defined __OpenBSD__ || defined __minix /* NetBSD >= 1.5ZA, OpenBSD, Minix 3 */
+   /* See <http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libc/stdio/fileext.h?rev=HEAD&content-type=text/x-cvsweb-markup>
+-     and <http://www.openbsd.org/cgi-bin/cvsweb/src/lib/libc/stdio/fileext.h?rev=HEAD&content-type=text/x-cvsweb-markup> */
++     and <https://cvsweb.openbsd.org/cgi-bin/cvsweb/src/lib/libc/stdio/fileext.h?rev=HEAD&content-type=text/x-cvsweb-markup>
++     and <https://github.com/Stichting-MINIX-Research-Foundation/minix/blob/master/lib/libc/stdio/fileext.h> */
+   struct __sfileext
+     {
+       struct  __sbuf _ub; /* ungetc buffer */
+       /* More fields, not relevant here.  */
+     };
+ #  define fp_ub ((struct __sfileext *) fp->_ext._base)->_ub
+-# else                                         /* FreeBSD, NetBSD <= 1.5Z, DragonFly, Mac OS X, Cygwin, Android */
++# elif defined __ANDROID__                     /* Android */
++  struct __sfileext
++    {
++      struct { unsigned char *_base; size_t _size; } _ub; /* ungetc buffer */
++      /* More fields, not relevant here.  */
++    };
++#  define fp_ub ((struct __sfileext *) fp_->_ext._base)->_ub
++# else                                         /* FreeBSD, NetBSD <= 1.5Z, DragonFly, Mac OS X, Cygwin */
+ #  define fp_ub fp_->_ub
+ # endif
+ 
+ # define HASUB(fp) (fp_ub._base != NULL)
+ 
++# if defined __ANDROID__ /* Android */
++  /* Needed after this commit from 2016-01-25
++     <https://android.googlesource.com/platform/bionic.git/+/e70e0e9267d069bf56a5078c99307e08a7280de7> */
++#  ifndef __SEOF
++#   define __SLBF 1
++#   define __SNBF 2
++#   define __SRD 4
++#   define __SWR 8
++#   define __SRW 0x10
++#   define __SEOF 0x20
++#   define __SERR 0x40
++#  endif
++#  ifndef __SOFF
++#   define __SOFF 0x1000
++#  endif
++# endif
++
+ #endif
+ 
+ 
+@@ -81,7 +141,7 @@
+ #ifdef __TANDEM                     /* NonStop Kernel */
+ # ifndef _IOERR
+ /* These values were determined by the program 'stdioext-flags' at
+-   <http://lists.gnu.org/archive/html/bug-gnulib/2010-12/msg00165.html>.  */
++   <https://lists.gnu.org/r/bug-gnulib/2010-12/msg00165.html>.  */
+ #  define _IOERR   0x40
+ #  define _IOREAD  0x80
+ #  define _IOWRT    0x4
+@@ -99,6 +159,8 @@
+                          int _file; \
+                          unsigned int _flag; \
+                        } *) fp)
++# elif defined __VMS                /* OpenVMS */
++#  define fp_ ((struct _iobuf *) fp)
+ # else
+ #  define fp_ fp
+ # endif
+@@ -110,7 +172,7 @@
+ #  define _flag __flag
+ # endif
+ 
+-#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__  /* newer Windows with MSVC */
++#elif defined _WIN32 && ! defined __CYGWIN__  /* newer Windows with MSVC */
+ 
+ /* <stdio.h> does not define the innards of FILE any more.  */
+ # define WINDOWS_OPAQUE_FILE
+@@ -130,7 +192,7 @@ struct _gl_real_FILE
+ # define fp_ ((struct _gl_real_FILE *) fp)
+ 
+ /* These values were determined by a program similar to the one at
+-   <http://lists.gnu.org/archive/html/bug-gnulib/2010-12/msg00165.html>.  */
++   <https://lists.gnu.org/r/bug-gnulib/2010-12/msg00165.html>.  */
+ # define _IOREAD   0x1
+ # define _IOWRT    0x2
+ # define _IORW     0x4
+--- a/old/fseeko.c
++++ b/lib/fseeko.c
+@@ -1,5 +1,5 @@
+ /* An fseeko() function that, together with fflush(), is POSIX compliant.
+-   Copyright (C) 2007-2016 Free Software Foundation, Inc.
++   Copyright (C) 2007-2018 Free Software Foundation, Inc.
+ 
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+@@ -12,7 +12,7 @@
+    GNU General Public License for more details.
+ 
+    You should have received a copy of the GNU General Public License along
+-   with this program; if not, see <http://www.gnu.org/licenses/>.  */
++   with this program; if not, see <https://www.gnu.org/licenses/>.  */
+ 
+ #include <config.h>
+ 
+@@ -33,9 +33,9 @@ fseeko (FILE *fp, off_t offset, int whence)
+ #endif
+ #if _GL_WINDOWS_64_BIT_OFF_T
+ # undef fseeko
+-# if HAVE__FSEEKI64 /* msvc, mingw64 */
++# if HAVE__FSEEKI64 && HAVE_DECL__FSEEKI64 /* msvc, mingw since msvcrt8.0, mingw64 */
+ #  define fseeko _fseeki64
+-# else /* mingw */
++# else /* mingw before msvcrt8.0 */
+ #  define fseeko fseeko64
+ # endif
+ #endif
+@@ -47,12 +47,13 @@ fseeko (FILE *fp, off_t offset, int whence)
+ #endif
+ 
+   /* These tests are based on fpurge.c.  */
+-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
++#if defined _IO_EOF_SEEN || defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1
++  /* GNU libc, BeOS, Haiku, Linux libc5 */
+   if (fp->_IO_read_end == fp->_IO_read_ptr
+       && fp->_IO_write_ptr == fp->_IO_write_base
+       && fp->_IO_save_base == NULL)
+ #elif defined __sferror || defined __DragonFly__ || defined __ANDROID__
+-  /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Android */
++  /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */
+ # if defined __SL64 && defined __SCLE /* Cygwin */
+   if ((fp->_flags & __SL64) == 0)
+     {
+@@ -80,7 +81,7 @@ fseeko (FILE *fp, off_t offset, int whence)
+ #elif defined __minix               /* Minix */
+   if (fp_->_ptr == fp_->_buf
+       && (fp_->_ptr == NULL || fp_->_count == 0))
+-#elif defined _IOERR                /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, MSVC, NonStop Kernel */
++#elif defined _IOERR                /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, MSVC, NonStop Kernel, OpenVMS */
+   if (fp_->_ptr == fp_->_base
+       && (fp_->_ptr == NULL || fp_->_cnt == 0))
+ #elif defined __UCLIBC__            /* uClibc */
+@@ -117,18 +118,19 @@ fseeko (FILE *fp, off_t offset, int whence)
+       if (pos == -1)
+         {
+ #if defined __sferror || defined __DragonFly__ || defined __ANDROID__
+-          /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Android */
++          /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */
+           fp_->_flags &= ~__SOFF;
+ #endif
+           return -1;
+         }
+ 
+-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
++#if defined _IO_EOF_SEEN || defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1
++      /* GNU libc, BeOS, Haiku, Linux libc5 */
+       fp->_flags &= ~_IO_EOF_SEEN;
+       fp->_offset = pos;
+ #elif defined __sferror || defined __DragonFly__ || defined __ANDROID__
+-      /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Android */
+-# if defined __CYGWIN__ || (defined __NetBSD__ && __NetBSD_Version__ >= 600000000)
++      /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */
++# if defined __CYGWIN__ || (defined __NetBSD__ && __NetBSD_Version__ >= 600000000) || defined __minix
+       /* fp_->_offset is typed as an integer.  */
+       fp_->_offset = pos;
+ # else
+@@ -150,7 +152,7 @@ fseeko (FILE *fp, off_t offset, int whence)
+       fp_->_flags &= ~__SEOF;
+ #elif defined __EMX__               /* emx+gcc */
+       fp->_flags &= ~_IOEOF;
+-#elif defined _IOERR                /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, MSVC, NonStop Kernel */
++#elif defined _IOERR                /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, MSVC, NonStop Kernel, OpenVMS */
+       fp_->_flag &= ~_IOEOF;
+ #elif defined __MINT__              /* Atari FreeMiNT */
+       fp->__offset = pos;
+--- a/old/freadahead.c
++++ b/lib/freadahead.c
+@@ -1,5 +1,5 @@
+ /* Retrieve information about a FILE stream.
+-   Copyright (C) 2007-2016 Free Software Foundation, Inc.
++   Copyright (C) 2007-2018 Free Software Foundation, Inc.
+ 
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+@@ -12,7 +12,7 @@
+    GNU General Public License for more details.
+ 
+    You should have received a copy of the GNU General Public License
+-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
++   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+ 
+ #include <config.h>
+ 
+@@ -22,17 +22,26 @@
+ #include <stdlib.h>
+ #include "stdio-impl.h"
+ 
++#if defined __DragonFly__
++/* Defined in libc, but not declared in <stdio.h>.  */
++extern size_t __sreadahead (FILE *);
++#endif
++
++/* This file is not used on systems that have the __freadahead function,
++   namely musl libc.  */
++
+ size_t
+ freadahead (FILE *fp)
+ {
+-#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
++#if defined _IO_EOF_SEEN || defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1
++  /* GNU libc, BeOS, Haiku, Linux libc5 */
+   if (fp->_IO_write_ptr > fp->_IO_write_base)
+     return 0;
+   return (fp->_IO_read_end - fp->_IO_read_ptr)
+          + (fp->_flags & _IO_IN_BACKUP ? fp->_IO_save_end - fp->_IO_save_base :
+             0);
+ #elif defined __sferror || defined __DragonFly__ || defined __ANDROID__
+-  /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Android */
++  /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */
+   if ((fp_->_flags & __SWR) != 0 || fp_->_r < 0)
+     return 0;
+ # if defined __DragonFly__

diff --git a/sys-devel/m4/m4-1.4.18.ebuild b/sys-devel/m4/m4-1.4.18.ebuild
index 9c667012353..378946733ca 100644
--- a/sys-devel/m4/m4-1.4.18.ebuild
+++ b/sys-devel/m4/m4-1.4.18.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI="5"
@@ -20,6 +20,8 @@ RDEPEND=""
 
 src_prepare() {
 	epatch "${FILESDIR}"/${P}-darwin17-printf-n.patch
+	epatch "${FILESDIR}"/${P}-glibc228.patch #663924
+	epatch_user
 	default
 }
 


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-devel/m4/files/, sys-devel/m4/
@ 2021-09-04 17:35 David Seifert
  0 siblings, 0 replies; 11+ messages in thread
From: David Seifert @ 2021-09-04 17:35 UTC (permalink / raw
  To: gentoo-commits

commit:     f642cada38fd5eb7c2c4164b55d9a873551d80fe
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Sat Sep  4 17:34:17 2021 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sat Sep  4 17:34:17 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f642cada

sys-devel/m4: drop 1.4.18-r2

Signed-off-by: David Seifert <soap <AT> gentoo.org>

 sys-devel/m4/Manifest                              |   1 -
 .../m4/files/m4-1.4.18-darwin17-printf-n.patch     |  30 --
 sys-devel/m4/files/m4-1.4.18-glibc228.patch        | 310 ---------------------
 sys-devel/m4/m4-1.4.18-r2.ebuild                   |  50 ----
 4 files changed, 391 deletions(-)

diff --git a/sys-devel/m4/Manifest b/sys-devel/m4/Manifest
index c24847bf023..7b0eef3c82b 100644
--- a/sys-devel/m4/Manifest
+++ b/sys-devel/m4/Manifest
@@ -1,2 +1 @@
-DIST m4-1.4.18.tar.xz 1207688 BLAKE2B debfaa4d25af6f583e2cd703e77b73775790f48f34e878eddd820c6b244a065c69495473ce5067be1f20ca07b2d6af9f90cffd33e12c18fd719c0d234eb5462a SHA512 06f583efc3855cd8477d8347544f4ae5153a3e50aea74d21968afa7214784ea3ddfc02d0a2b11324120d76a19f2e804d20de11a456b5da929eb6ae469519b174
 DIST m4-1.4.19.tar.xz 1654908 BLAKE2B 08694485a49c542761fa9a7db4d7609f4dfb08a5c6b785b57f2e14cf1f696c2a1c788bb5eb934e8159a632b63ff071dfe42511d0109d7b1828f46d33c8bf416a SHA512 47f595845c89709727bda0b3fc78e3188ef78ec818965b395532e7041cabe9e49677ee4aca3d042930095a7f8df81de3da1026b23b6897be471f6cf13ddd512b

diff --git a/sys-devel/m4/files/m4-1.4.18-darwin17-printf-n.patch b/sys-devel/m4/files/m4-1.4.18-darwin17-printf-n.patch
deleted file mode 100644
index 1c77ed773c2..00000000000
--- a/sys-devel/m4/files/m4-1.4.18-darwin17-printf-n.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-http://lists.gnu.org/archive/html/bug-gnulib/2017-07/txtmumXtpD69v.txt
-
-extract of only the relevant hunk to avoid irrelevant conflicts
-
-From c41f233c4c38e84023a16339782ee306f03e7f59 Mon Sep 17 00:00:00 2001
-From: Paul Eggert <address@hidden>
-Date: Fri, 7 Jul 2017 14:10:20 -0700
-Subject: [PATCH] vasnprintf: port to macOS 10.13
-
-Problem reported by comex in:
-http://lists.gnu.org/archive/html/bug-gnulib/2017-07/msg00056.html
-* lib/vasnprintf.c (VASNPRINTF): Don’t use %n on macOS.
-
-diff --git a/lib/vasnprintf.c b/lib/vasnprintf.c
-index 9c2af0e..fecaf27 100644
---- a/lib/vasnprintf.c
-+++ b/lib/vasnprintf.c
-@@ -4869,7 +4869,11 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
- #endif
-                   *fbp = dp->conversion;
- #if USE_SNPRINTF
--# if !(((__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)) && !defined __UCLIBC__) || ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__))
-+# if ! (((__GLIBC__ > 2                                                 \
-+          || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3))                  \
-+         && !defined __UCLIBC__)                                        \
-+        || (defined __APPLE__ && defined __MACH__)                      \
-+        || ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__))
-                 fbp[1] = '%';
-                 fbp[2] = 'n';
-                 fbp[3] = '\0';

diff --git a/sys-devel/m4/files/m4-1.4.18-glibc228.patch b/sys-devel/m4/files/m4-1.4.18-glibc228.patch
deleted file mode 100644
index 6b5593bfa63..00000000000
--- a/sys-devel/m4/files/m4-1.4.18-glibc228.patch
+++ /dev/null
@@ -1,310 +0,0 @@
-Fix build failure on glibc-2.28:
-    fseeko.c: In function 'rpl_fseeko':
-    fseeko.c:110:4: error: #error "Please port gnulib fseeko.c to your platform! Look at the code in fseeko.c, then report this to bug-gnulib."
-       #error "Please port gnulib fseeko.c to your platform! Look at the code in fseeko.c, then report this to bug-gnulib."
-
-Patch by milan hodoscek.
-
-https://bugs.gentoo.org/663924
---- a/old/stdio-impl.h
-+++ b/lib/stdio-impl.h
-@@ -1,5 +1,5 @@
- /* Implementation details of FILE streams.
--   Copyright (C) 2007-2008, 2010-2016 Free Software Foundation, Inc.
-+   Copyright (C) 2007-2008, 2010-2018 Free Software Foundation, Inc.
- 
-    This program is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-@@ -12,12 +12,18 @@
-    GNU General Public License for more details.
- 
-    You should have received a copy of the GNU General Public License
--   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
- 
- /* Many stdio implementations have the same logic and therefore can share
-    the same implementation of stdio extension API, except that some fields
-    have different naming conventions, or their access requires some casts.  */
- 
-+/* Glibc 2.28 made _IO_IN_BACKUP private.  For now, work around this
-+   problem by defining it ourselves.  FIXME: Do not rely on glibc
-+   internals.  */
-+#if !defined _IO_IN_BACKUP && defined _IO_EOF_SEEN
-+# define _IO_IN_BACKUP 0x100
-+#endif
- 
- /* BSD stdio derived implementations.  */
- 
-@@ -29,10 +35,10 @@
- #include <errno.h>                             /* For detecting Plan9.  */
- 
- #if defined __sferror || defined __DragonFly__ || defined __ANDROID__
--  /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Android */
-+  /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */
- 
- # if defined __DragonFly__          /* DragonFly */
--  /* See <http://www.dragonflybsd.org/cvsweb/src/lib/libc/stdio/priv_stdio.h?rev=HEAD&content-type=text/x-cvsweb-markup>.  */
-+  /* See <https://gitweb.dragonflybsd.org/dragonfly.git/blob_plain/HEAD:/lib/libc/stdio/priv_stdio.h>.  */
- #  define fp_ ((struct { struct __FILE_public pub; \
-                          struct { unsigned char *_base; int _size; } _bf; \
-                          void *cookie; \
-@@ -49,30 +55,84 @@
-                          fpos_t _offset; \
-                          /* More fields, not relevant here.  */ \
-                        } *) fp)
--  /* See <http://www.dragonflybsd.org/cvsweb/src/include/stdio.h?rev=HEAD&content-type=text/x-cvsweb-markup>.  */
-+  /* See <https://gitweb.dragonflybsd.org/dragonfly.git/blob_plain/HEAD:/include/stdio.h>.  */
- #  define _p pub._p
- #  define _flags pub._flags
- #  define _r pub._r
- #  define _w pub._w
-+# elif defined __ANDROID__ /* Android */
-+  /* Up to this commit from 2015-10-12
-+     <https://android.googlesource.com/platform/bionic.git/+/f0141dfab10a4b332769d52fa76631a64741297a>
-+     the innards of FILE were public, and fp_ub could be defined like for OpenBSD,
-+     see <https://android.googlesource.com/platform/bionic.git/+/e78392637d5086384a5631ddfdfa8d7ec8326ee3/libc/stdio/fileext.h>
-+     and <https://android.googlesource.com/platform/bionic.git/+/e78392637d5086384a5631ddfdfa8d7ec8326ee3/libc/stdio/local.h>.
-+     After this commit, the innards of FILE are hidden.  */
-+#  define fp_ ((struct { unsigned char *_p; \
-+                         int _r; \
-+                         int _w; \
-+                         int _flags; \
-+                         int _file; \
-+                         struct { unsigned char *_base; size_t _size; } _bf; \
-+                         int _lbfsize; \
-+                         void *_cookie; \
-+                         void *_close; \
-+                         void *_read; \
-+                         void *_seek; \
-+                         void *_write; \
-+                         struct { unsigned char *_base; size_t _size; } _ext; \
-+                         unsigned char *_up; \
-+                         int _ur; \
-+                         unsigned char _ubuf[3]; \
-+                         unsigned char _nbuf[1]; \
-+                         struct { unsigned char *_base; size_t _size; } _lb; \
-+                         int _blksize; \
-+                         fpos_t _offset; \
-+                         /* More fields, not relevant here.  */ \
-+                       } *) fp)
- # else
- #  define fp_ fp
- # endif
- 
--# if (defined __NetBSD__ && __NetBSD_Version__ >= 105270000) || defined __OpenBSD__ || defined __ANDROID__ /* NetBSD >= 1.5ZA, OpenBSD, Android */
-+# if (defined __NetBSD__ && __NetBSD_Version__ >= 105270000) || defined __OpenBSD__ || defined __minix /* NetBSD >= 1.5ZA, OpenBSD, Minix 3 */
-   /* See <http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libc/stdio/fileext.h?rev=HEAD&content-type=text/x-cvsweb-markup>
--     and <http://www.openbsd.org/cgi-bin/cvsweb/src/lib/libc/stdio/fileext.h?rev=HEAD&content-type=text/x-cvsweb-markup> */
-+     and <https://cvsweb.openbsd.org/cgi-bin/cvsweb/src/lib/libc/stdio/fileext.h?rev=HEAD&content-type=text/x-cvsweb-markup>
-+     and <https://github.com/Stichting-MINIX-Research-Foundation/minix/blob/master/lib/libc/stdio/fileext.h> */
-   struct __sfileext
-     {
-       struct  __sbuf _ub; /* ungetc buffer */
-       /* More fields, not relevant here.  */
-     };
- #  define fp_ub ((struct __sfileext *) fp->_ext._base)->_ub
--# else                                         /* FreeBSD, NetBSD <= 1.5Z, DragonFly, Mac OS X, Cygwin, Android */
-+# elif defined __ANDROID__                     /* Android */
-+  struct __sfileext
-+    {
-+      struct { unsigned char *_base; size_t _size; } _ub; /* ungetc buffer */
-+      /* More fields, not relevant here.  */
-+    };
-+#  define fp_ub ((struct __sfileext *) fp_->_ext._base)->_ub
-+# else                                         /* FreeBSD, NetBSD <= 1.5Z, DragonFly, Mac OS X, Cygwin */
- #  define fp_ub fp_->_ub
- # endif
- 
- # define HASUB(fp) (fp_ub._base != NULL)
- 
-+# if defined __ANDROID__ /* Android */
-+  /* Needed after this commit from 2016-01-25
-+     <https://android.googlesource.com/platform/bionic.git/+/e70e0e9267d069bf56a5078c99307e08a7280de7> */
-+#  ifndef __SEOF
-+#   define __SLBF 1
-+#   define __SNBF 2
-+#   define __SRD 4
-+#   define __SWR 8
-+#   define __SRW 0x10
-+#   define __SEOF 0x20
-+#   define __SERR 0x40
-+#  endif
-+#  ifndef __SOFF
-+#   define __SOFF 0x1000
-+#  endif
-+# endif
-+
- #endif
- 
- 
-@@ -81,7 +141,7 @@
- #ifdef __TANDEM                     /* NonStop Kernel */
- # ifndef _IOERR
- /* These values were determined by the program 'stdioext-flags' at
--   <http://lists.gnu.org/archive/html/bug-gnulib/2010-12/msg00165.html>.  */
-+   <https://lists.gnu.org/r/bug-gnulib/2010-12/msg00165.html>.  */
- #  define _IOERR   0x40
- #  define _IOREAD  0x80
- #  define _IOWRT    0x4
-@@ -99,6 +159,8 @@
-                          int _file; \
-                          unsigned int _flag; \
-                        } *) fp)
-+# elif defined __VMS                /* OpenVMS */
-+#  define fp_ ((struct _iobuf *) fp)
- # else
- #  define fp_ fp
- # endif
-@@ -110,7 +172,7 @@
- #  define _flag __flag
- # endif
- 
--#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__  /* newer Windows with MSVC */
-+#elif defined _WIN32 && ! defined __CYGWIN__  /* newer Windows with MSVC */
- 
- /* <stdio.h> does not define the innards of FILE any more.  */
- # define WINDOWS_OPAQUE_FILE
-@@ -130,7 +192,7 @@ struct _gl_real_FILE
- # define fp_ ((struct _gl_real_FILE *) fp)
- 
- /* These values were determined by a program similar to the one at
--   <http://lists.gnu.org/archive/html/bug-gnulib/2010-12/msg00165.html>.  */
-+   <https://lists.gnu.org/r/bug-gnulib/2010-12/msg00165.html>.  */
- # define _IOREAD   0x1
- # define _IOWRT    0x2
- # define _IORW     0x4
---- a/old/fseeko.c
-+++ b/lib/fseeko.c
-@@ -1,5 +1,5 @@
- /* An fseeko() function that, together with fflush(), is POSIX compliant.
--   Copyright (C) 2007-2016 Free Software Foundation, Inc.
-+   Copyright (C) 2007-2018 Free Software Foundation, Inc.
- 
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-@@ -12,7 +12,7 @@
-    GNU General Public License for more details.
- 
-    You should have received a copy of the GNU General Public License along
--   with this program; if not, see <http://www.gnu.org/licenses/>.  */
-+   with this program; if not, see <https://www.gnu.org/licenses/>.  */
- 
- #include <config.h>
- 
-@@ -33,9 +33,9 @@ fseeko (FILE *fp, off_t offset, int whence)
- #endif
- #if _GL_WINDOWS_64_BIT_OFF_T
- # undef fseeko
--# if HAVE__FSEEKI64 /* msvc, mingw64 */
-+# if HAVE__FSEEKI64 && HAVE_DECL__FSEEKI64 /* msvc, mingw since msvcrt8.0, mingw64 */
- #  define fseeko _fseeki64
--# else /* mingw */
-+# else /* mingw before msvcrt8.0 */
- #  define fseeko fseeko64
- # endif
- #endif
-@@ -47,12 +47,13 @@ fseeko (FILE *fp, off_t offset, int whence)
- #endif
- 
-   /* These tests are based on fpurge.c.  */
--#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
-+#if defined _IO_EOF_SEEN || defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1
-+  /* GNU libc, BeOS, Haiku, Linux libc5 */
-   if (fp->_IO_read_end == fp->_IO_read_ptr
-       && fp->_IO_write_ptr == fp->_IO_write_base
-       && fp->_IO_save_base == NULL)
- #elif defined __sferror || defined __DragonFly__ || defined __ANDROID__
--  /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Android */
-+  /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */
- # if defined __SL64 && defined __SCLE /* Cygwin */
-   if ((fp->_flags & __SL64) == 0)
-     {
-@@ -80,7 +81,7 @@ fseeko (FILE *fp, off_t offset, int whence)
- #elif defined __minix               /* Minix */
-   if (fp_->_ptr == fp_->_buf
-       && (fp_->_ptr == NULL || fp_->_count == 0))
--#elif defined _IOERR                /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, MSVC, NonStop Kernel */
-+#elif defined _IOERR                /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, MSVC, NonStop Kernel, OpenVMS */
-   if (fp_->_ptr == fp_->_base
-       && (fp_->_ptr == NULL || fp_->_cnt == 0))
- #elif defined __UCLIBC__            /* uClibc */
-@@ -117,18 +118,19 @@ fseeko (FILE *fp, off_t offset, int whence)
-       if (pos == -1)
-         {
- #if defined __sferror || defined __DragonFly__ || defined __ANDROID__
--          /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Android */
-+          /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */
-           fp_->_flags &= ~__SOFF;
- #endif
-           return -1;
-         }
- 
--#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
-+#if defined _IO_EOF_SEEN || defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1
-+      /* GNU libc, BeOS, Haiku, Linux libc5 */
-       fp->_flags &= ~_IO_EOF_SEEN;
-       fp->_offset = pos;
- #elif defined __sferror || defined __DragonFly__ || defined __ANDROID__
--      /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Android */
--# if defined __CYGWIN__ || (defined __NetBSD__ && __NetBSD_Version__ >= 600000000)
-+      /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */
-+# if defined __CYGWIN__ || (defined __NetBSD__ && __NetBSD_Version__ >= 600000000) || defined __minix
-       /* fp_->_offset is typed as an integer.  */
-       fp_->_offset = pos;
- # else
-@@ -150,7 +152,7 @@ fseeko (FILE *fp, off_t offset, int whence)
-       fp_->_flags &= ~__SEOF;
- #elif defined __EMX__               /* emx+gcc */
-       fp->_flags &= ~_IOEOF;
--#elif defined _IOERR                /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, MSVC, NonStop Kernel */
-+#elif defined _IOERR                /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw, MSVC, NonStop Kernel, OpenVMS */
-       fp_->_flag &= ~_IOEOF;
- #elif defined __MINT__              /* Atari FreeMiNT */
-       fp->__offset = pos;
---- a/old/freadahead.c
-+++ b/lib/freadahead.c
-@@ -1,5 +1,5 @@
- /* Retrieve information about a FILE stream.
--   Copyright (C) 2007-2016 Free Software Foundation, Inc.
-+   Copyright (C) 2007-2018 Free Software Foundation, Inc.
- 
-    This program is free software: you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-@@ -12,7 +12,7 @@
-    GNU General Public License for more details.
- 
-    You should have received a copy of the GNU General Public License
--   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
- 
- #include <config.h>
- 
-@@ -22,17 +22,26 @@
- #include <stdlib.h>
- #include "stdio-impl.h"
- 
-+#if defined __DragonFly__
-+/* Defined in libc, but not declared in <stdio.h>.  */
-+extern size_t __sreadahead (FILE *);
-+#endif
-+
-+/* This file is not used on systems that have the __freadahead function,
-+   namely musl libc.  */
-+
- size_t
- freadahead (FILE *fp)
- {
--#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
-+#if defined _IO_EOF_SEEN || defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1
-+  /* GNU libc, BeOS, Haiku, Linux libc5 */
-   if (fp->_IO_write_ptr > fp->_IO_write_base)
-     return 0;
-   return (fp->_IO_read_end - fp->_IO_read_ptr)
-          + (fp->_flags & _IO_IN_BACKUP ? fp->_IO_save_end - fp->_IO_save_base :
-             0);
- #elif defined __sferror || defined __DragonFly__ || defined __ANDROID__
--  /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Android */
-+  /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */
-   if ((fp_->_flags & __SWR) != 0 || fp_->_r < 0)
-     return 0;
- # if defined __DragonFly__

diff --git a/sys-devel/m4/m4-1.4.18-r2.ebuild b/sys-devel/m4/m4-1.4.18-r2.ebuild
deleted file mode 100644
index 6350bc24bdc..00000000000
--- a/sys-devel/m4/m4-1.4.18-r2.ebuild
+++ /dev/null
@@ -1,50 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-DESCRIPTION="GNU macro processor"
-HOMEPAGE="https://www.gnu.org/software/m4/m4.html"
-SRC_URI="mirror://gnu/${PN}/${P}.tar.xz"
-
-LICENSE="GPL-3"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE="examples"
-
-# remember: cannot dep on autoconf since it needs us
-BDEPEND="app-arch/xz-utils"
-
-PATCHES=(
-	"${FILESDIR}"/${P}-darwin17-printf-n.patch
-	"${FILESDIR}"/${P}-glibc228.patch #663924
-)
-
-src_configure() {
-	local -a myeconfargs=(
-		--enable-changeword
-
-		# Disable automagic dependency over libsigsegv; see bug #278026
-		ac_cv_libsigsegv=no
-	)
-
-	[[ ${USERLAND} != GNU ]] && myeconfargs+=( --program-prefix=g )
-
-	econf "${myeconfargs[@]}"
-}
-
-src_test() {
-	[[ -d /none ]] && die "m4 tests will fail with /none/" #244396
-	emake check
-}
-
-src_install() {
-	default
-	# autoconf-2.60 for instance, first checks gm4, then m4.  If we don't have
-	# gm4, it might find gm4 from outside the prefix on for instance Darwin
-	use prefix && dosym m4 /usr/bin/gm4
-	if use examples ; then
-		dodoc -r examples
-		rm -f "${ED}"/usr/share/doc/${PF}/examples/Makefile*
-	fi
-}


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-devel/m4/files/, sys-devel/m4/
@ 2021-11-17  2:41 Georgy Yakovlev
  0 siblings, 0 replies; 11+ messages in thread
From: Georgy Yakovlev @ 2021-11-17  2:41 UTC (permalink / raw
  To: gentoo-commits

commit:     e355b4dd3328425db3613f4136620e4a5ac95d6c
Author:     Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
AuthorDate: Wed Nov 17 02:14:05 2021 +0000
Commit:     Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Wed Nov 17 02:39:06 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e355b4dd

sys-devel/m4: add ppc32 musl patch

Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>

 sys-devel/m4/files/ppc-musl.patch | 14 ++++++++++++++
 sys-devel/m4/m4-1.4.19.ebuild     |  2 ++
 2 files changed, 16 insertions(+)

diff --git a/sys-devel/m4/files/ppc-musl.patch b/sys-devel/m4/files/ppc-musl.patch
new file mode 100644
index 000000000000..6ba37f233591
--- /dev/null
+++ b/sys-devel/m4/files/ppc-musl.patch
@@ -0,0 +1,14 @@
+--- a/lib/sigsegv.c
++++ b/lib/sigsegv.c
+@@ -221,8 +221,10 @@ int libsigsegv_version = LIBSIGSEGV_VERSION;
+ /* both should be equivalent */
+ #   if 0
+ #    define SIGSEGV_FAULT_STACKPOINTER  ((ucontext_t *) ucp)->uc_mcontext.regs->gpr[1]
+-#   else
++#   elif defined(__GLIBC__)
+ #    define SIGSEGV_FAULT_STACKPOINTER  ((ucontext_t *) ucp)->uc_mcontext.uc_regs->gregs[1]
++#   else
++#    define SIGSEGV_FAULT_STACKPOINTER  ((ucontext_t *) ucp)->uc_mcontext.gregs[1]
+ #   endif
+ #  endif
+ 

diff --git a/sys-devel/m4/m4-1.4.19.ebuild b/sys-devel/m4/m4-1.4.19.ebuild
index 7713695a5daf..96bbad225664 100644
--- a/sys-devel/m4/m4-1.4.19.ebuild
+++ b/sys-devel/m4/m4-1.4.19.ebuild
@@ -30,6 +30,8 @@ DEPEND="${RDEPEND}"
 BDEPEND="app-arch/xz-utils
 	nls? ( sys-devel/gettext )"
 
+PATCHES=( "${FILESDIR}/ppc-musl.patch" )
+
 src_configure() {
 	local -a myeconfargs=(
 		--enable-changeword


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-devel/m4/files/, sys-devel/m4/
@ 2022-04-25 10:11 WANG Xuerui
  0 siblings, 0 replies; 11+ messages in thread
From: WANG Xuerui @ 2022-04-25 10:11 UTC (permalink / raw
  To: gentoo-commits

commit:     43dd58338de06e5f214e616425c17578908adfec
Author:     WANG Xuerui <xen0n <AT> gentoo <DOT> org>
AuthorDate: Mon Apr 25 04:31:54 2022 +0000
Commit:     WANG Xuerui <xen0n <AT> gentoo <DOT> org>
CommitDate: Mon Apr 25 10:11:14 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=43dd5833

sys-devel/m4: fix build on loong

Upstream has updated gnulib but hasn't tagged a new release yet, so only
add the bare minimum to fix build on loong.

This has been inside loongson-overlay for a while, and is tested on real
loong hardware.

See: https://github.com/gentoo/gentoo/pull/25189
Acked-by: Andreas K. Hüttel <dilfridge <AT> gentoo.org>
Signed-off-by: WANG Xuerui <xen0n <AT> gentoo.org>

 sys-devel/m4/files/loong-fix-build.patch | 26 ++++++++++++++++++++++++++
 sys-devel/m4/m4-1.4.19.ebuild            |  1 +
 2 files changed, 27 insertions(+)

diff --git a/sys-devel/m4/files/loong-fix-build.patch b/sys-devel/m4/files/loong-fix-build.patch
new file mode 100644
index 000000000000..cd06fa8df5e4
--- /dev/null
+++ b/sys-devel/m4/files/loong-fix-build.patch
@@ -0,0 +1,26 @@
+From 34add045fd2ec3f1031dee961c4d9cc4285486a7 Mon Sep 17 00:00:00 2001
+From: Sun Haiyong <youbest@sina.com>
+Date: Tue, 31 Aug 2021 11:11:52 +0800
+Subject: [PATCH] stack-direction: Add support for loongarch CPU
+
+* m4/stack-direction.m4 (SV_STACK_DIRECTION): When the CPU is loongarch,
+set "sv_cv_stack_direction" to "-1" .
+---
+ m4/stack-direction.m4 | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/m4/stack-direction.m4 b/m4/stack-direction.m4
+index 93287254b..e6c3284ce 100644
+--- a/m4/stack-direction.m4
++++ b/m4/stack-direction.m4
+@@ -32,6 +32,7 @@ AC_DEFUN([SV_STACK_DIRECTION],
+       i?86 | x86_64 | \
+       i860 | \
+       ia64 | \
++      loongarch* | \
+       m32r | \
+       m68* | \
+       m88k | \
+-- 
+2.17.2
+

diff --git a/sys-devel/m4/m4-1.4.19.ebuild b/sys-devel/m4/m4-1.4.19.ebuild
index 744de66535d5..8c29c255fee5 100644
--- a/sys-devel/m4/m4-1.4.19.ebuild
+++ b/sys-devel/m4/m4-1.4.19.ebuild
@@ -38,6 +38,7 @@ BDEPEND="app-arch/xz-utils
 
 PATCHES=(
 	"${FILESDIR}"/ppc-musl.patch
+	"${FILESDIR}"/loong-fix-build.patch
 	"${WORKDIR}"/${P}-test-198-sysval-r1.patch
 )
 


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-devel/m4/files/, sys-devel/m4/
@ 2022-04-26  4:03 Sam James
  0 siblings, 0 replies; 11+ messages in thread
From: Sam James @ 2022-04-26  4:03 UTC (permalink / raw
  To: gentoo-commits

commit:     4abfea67ec79d3983c7221b0d755f5316eb5d59b
Author:     WANG Xuerui <xen0n <AT> gentoo <DOT> org>
AuthorDate: Tue Apr 26 03:20:21 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Apr 26 04:03:08 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4abfea67

sys-devel/m4: avoid invoking autoconf

Normally we'd just eautoreconf, but this is base-system and we cannot
depend on autoconf, so we have to patch the generated files ourselves.
This can go away once the loong fix patch is no longer necessary.

Fixes: 43dd58338de ("sys-devel/m4: fix build on loong")
Closes: https://github.com/gentoo/gentoo/pull/25195
Closes: https://github.com/gentoo/gentoo/pull/25205
Signed-off-by: WANG Xuerui <xen0n <AT> gentoo.org>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-devel/m4/files/loong-fix-build.patch | 20 ++++++++++++--------
 sys-devel/m4/m4-1.4.19.ebuild            | 10 ++++++++++
 2 files changed, 22 insertions(+), 8 deletions(-)

diff --git a/sys-devel/m4/files/loong-fix-build.patch b/sys-devel/m4/files/loong-fix-build.patch
index cd06fa8df5e4..d5243357928b 100644
--- a/sys-devel/m4/files/loong-fix-build.patch
+++ b/sys-devel/m4/files/loong-fix-build.patch
@@ -1,19 +1,23 @@
-From 34add045fd2ec3f1031dee961c4d9cc4285486a7 Mon Sep 17 00:00:00 2001
+[xen0n: this is https://github.com/sunhaiyong1978/CLFS-for-LoongArch/blob/1.0/patches/stack-direction-add-loongarch.patch with line number tweak, and change to generated file added as well.]
 From: Sun Haiyong <youbest@sina.com>
 Date: Tue, 31 Aug 2021 11:11:52 +0800
 Subject: [PATCH] stack-direction: Add support for loongarch CPU
 
 * m4/stack-direction.m4 (SV_STACK_DIRECTION): When the CPU is loongarch,
 set "sv_cv_stack_direction" to "-1" .
----
- m4/stack-direction.m4 | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/m4/stack-direction.m4 b/m4/stack-direction.m4
-index 93287254b..e6c3284ce 100644
 --- a/m4/stack-direction.m4
 +++ b/m4/stack-direction.m4
-@@ -32,6 +32,7 @@ AC_DEFUN([SV_STACK_DIRECTION],
+@@ -31,6 +31,7 @@ AC_DEFUN([SV_STACK_DIRECTION],
+       i?86 | x86_64 | \
+       i860 | \
+       ia64 | \
++      loongarch* | \
+       m32r | \
+       m68* | \
+       m88k | \
+--- a/configure
++++ b/configure
+@@ -46399,6 +46399,7 @@ else $as_nop
        i?86 | x86_64 | \
        i860 | \
        ia64 | \

diff --git a/sys-devel/m4/m4-1.4.19.ebuild b/sys-devel/m4/m4-1.4.19.ebuild
index 8c29c255fee5..e3ceb0429850 100644
--- a/sys-devel/m4/m4-1.4.19.ebuild
+++ b/sys-devel/m4/m4-1.4.19.ebuild
@@ -51,6 +51,16 @@ src_unpack() {
 	default
 }
 
+src_prepare() {
+	default
+
+	# touch generated files after patching m4, to avoid activating maintainer
+	# mode
+	# remove when loong-fix-build.patch is no longer necessary
+	touch ./aclocal.m4 ./lib/config.hin ./configure || die
+	find . -name Makefile.in -exec touch {} + || die
+}
+
 src_configure() {
 	local -a myeconfargs=(
 		--enable-changeword


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-devel/m4/files/, sys-devel/m4/
@ 2022-12-13  5:12 Sam James
  0 siblings, 0 replies; 11+ messages in thread
From: Sam James @ 2022-12-13  5:12 UTC (permalink / raw
  To: gentoo-commits

commit:     46157aa6b7e7bd9f041e5ac61a4a218fc33280e4
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 13 05:09:23 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Dec 13 05:09:23 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=46157aa6

sys-devel/m4: fix tests w/ make 4.4

Test-only fix so no revbump.

Closes: https://bugs.gentoo.org/879061
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-devel/m4/files/m4-1.4.19-make-4.4-tests.patch | 38 +++++++++++++++++++++++
 sys-devel/m4/m4-1.4.19.ebuild                     |  1 +
 2 files changed, 39 insertions(+)

diff --git a/sys-devel/m4/files/m4-1.4.19-make-4.4-tests.patch b/sys-devel/m4/files/m4-1.4.19-make-4.4-tests.patch
new file mode 100644
index 000000000000..f7bc3f0e9b35
--- /dev/null
+++ b/sys-devel/m4/files/m4-1.4.19-make-4.4-tests.patch
@@ -0,0 +1,38 @@
+https://bugs.gentoo.org/879061
+
+https://savannah.gnu.org/bugs/index.php?63307 (make bug)
+https://savannah.gnu.org/support/?110767 (M4 bug)
+
+https://lists.gnu.org/archive/html/bug-m4/2022-11/msg00003.html
+https://savannah.gnu.org/support/download.php?file_id=53951
+
+From ed64def45d68b2af53f1d3d783cc98e9dbe2ff74 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex@linutronix.de>
+Date: Sat, 12 Nov 2022 15:18:41 +0100
+Subject: [PATCH] test-execute-main.c: set default handler for SIGPIPE in tests
+ 3 and 4
+
+make 4.4 sets this to SIG_IGN and the tests fail
+
+Signed-off-by: Alexander Kanavin <alex@linutronix.de>
+--- a/tests/test-execute-main.c
++++ b/tests/test-execute-main.c
+@@ -132,6 +132,7 @@ main (int argc, char *argv[])
+       #if !(defined _WIN32 && !defined __CYGWIN__)
+       {
+         /* Check SIGPIPE handling with ignore_sigpipe = false.  */
++        signal(SIGPIPE, SIG_DFL);
+         const char *prog_argv[3] = { prog_path, "3", NULL };
+         int termsig = 0x7DEADBEE;
+         int ret = execute (progname, prog_argv[0], prog_argv, NULL,
+@@ -145,6 +146,7 @@ main (int argc, char *argv[])
+       #if !(defined _WIN32 && !defined __CYGWIN__)
+       {
+         /* Check SIGPIPE handling with ignore_sigpipe = true.  */
++        signal(SIGPIPE, SIG_DFL);
+         const char *prog_argv[3] = { prog_path, "4", NULL };
+         int termsig = 0x7DEADBEE;
+         int ret = execute (progname, prog_argv[0], prog_argv, NULL,
+-- 
+2.30.2
+

diff --git a/sys-devel/m4/m4-1.4.19.ebuild b/sys-devel/m4/m4-1.4.19.ebuild
index fcfe153e5958..fab597f0fcad 100644
--- a/sys-devel/m4/m4-1.4.19.ebuild
+++ b/sys-devel/m4/m4-1.4.19.ebuild
@@ -39,6 +39,7 @@ BDEPEND="app-arch/xz-utils
 PATCHES=(
 	"${FILESDIR}"/ppc-musl.patch
 	"${FILESDIR}"/loong-fix-build.patch
+	"${FILESDIR}"/${PN}-1.4.19-make-4.4-tests.patch
 	"${WORKDIR}"/${P}-test-198-sysval-r1.patch
 )
 


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: sys-devel/m4/files/, sys-devel/m4/
@ 2023-01-09  9:45 Sam James
  0 siblings, 0 replies; 11+ messages in thread
From: Sam James @ 2023-01-09  9:45 UTC (permalink / raw
  To: gentoo-commits

commit:     34ace9fe79667dfcfd0ab651cc246c85a7706ae6
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Jan  9 08:17:11 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Jan  9 09:45:01 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=34ace9fe

sys-devel/m4: stop downgrading FORTIFY_SOURCE

Closes: https://bugs.gentoo.org/890273
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-devel/m4/files/m4-1.4.19-fortify-source.patch |  49 +++++++++++
 sys-devel/m4/m4-1.4.19-r1.ebuild                  | 101 ++++++++++++++++++++++
 2 files changed, 150 insertions(+)

diff --git a/sys-devel/m4/files/m4-1.4.19-fortify-source.patch b/sys-devel/m4/files/m4-1.4.19-fortify-source.patch
new file mode 100644
index 000000000000..69e5405b6f2b
--- /dev/null
+++ b/sys-devel/m4/files/m4-1.4.19-fortify-source.patch
@@ -0,0 +1,49 @@
+https://bugs.gentoo.org/890273
+
+From 960b9b4d0774f78d286932251d6f53f638aefb19 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Mon, 9 Jan 2023 08:00:34 +0000
+Subject: [PATCH] build: Don't add _FORTIFY_SOURCE if already set by
+ user/toolchain
+
+Newer toolchains (GCC 12+ or Clang 9+, glibc-2.34) allow _FORTIFY_SOURCE=3.
+
+The current macro used in configure.ac will forcefully downgrade to F_S=2
+and emit a warning if the user set something else:
+```
+x86_64-pc-linux-gnu-gcc -DEXEEXT=\"\" -I. -I../lib  -DIN_M4_GNULIB_TESTS=1 -I. -I. -I.. -I./.. -I../lib -I./../lib   -O2 -pipe -march=native -fdiagnostics-color=always -frecord-gcc-switches -Wreturn-type      -ggdb3 -Werror=implicit-function-declaration -Werror=implicit-int -c -o glthread/thread.o glthread/thread.c
+In file included from glthread/thread.c:20:
+../lib/config.h:202: warning: "_FORTIFY_SOURCE" redefined
+  202 |    # define _FORTIFY_SOURCE 2
+      |
+<built-in>: note: this is the location of the previous definition
+```
+
+See: 390d259efe8e1c7e4b6babb4738fef7427416857
+Signed-off-by: Sam James <sam@gentoo.org>
+--- a/configure.ac
++++ b/configure.ac
+@@ -133,7 +133,9 @@ if test "$gl_gcc_warnings" = yes; then
+   [/* Enable compile-time and run-time bounds-checking, and some warnings,
+       without upsetting newer glibc. */
+    #if defined __OPTIMIZE__ && __OPTIMIZE__
+-   # define _FORTIFY_SOURCE 2
++   # ifndef _FORTIFY_SOURCE
++   #  define _FORTIFY_SOURCE 2
++   # endif
+    #endif
+   ])
+ fi
+--- a/lib/config.hin
++++ b/lib/config.hin
+@@ -198,7 +198,9 @@
+ /* Enable compile-time and run-time bounds-checking, and some warnings,
+       without upsetting newer glibc. */
+    #if defined __OPTIMIZE__ && __OPTIMIZE__
+-   # define _FORTIFY_SOURCE 2
++   # ifndef _FORTIFY_SOURCE
++   #  define _FORTIFY_SOURCE 2
++   # endif
+    #endif
+   
+ 

diff --git a/sys-devel/m4/m4-1.4.19-r1.ebuild b/sys-devel/m4/m4-1.4.19-r1.ebuild
new file mode 100644
index 000000000000..83b5384aa9a8
--- /dev/null
+++ b/sys-devel/m4/m4-1.4.19-r1.ebuild
@@ -0,0 +1,101 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/m4.asc
+inherit verify-sig
+
+DESCRIPTION="GNU macro processor"
+HOMEPAGE="https://www.gnu.org/software/m4/m4.html"
+if [[ ${PV} == *_beta* ]] ; then
+	MY_P="${PN}-1.4.18d"
+	SRC_URI="https://alpha.gnu.org/gnu/${PN}/${MY_P}.tar.xz"
+	SRC_URI+=" verify-sig? ( https://alpha.gnu.org/gnu/${PN}/${MY_P}.tar.xz.sig )"
+	S="${WORKDIR}/${MY_P}"
+else
+	SRC_URI="mirror://gnu/${PN}/${P}.tar.xz"
+	SRC_URI+=" https://dev.gentoo.org/~floppym/dist/${P}-test-198-sysval-r1.patch.gz"
+	SRC_URI+=" verify-sig? ( mirror://gnu/${PN}/${P}.tar.xz.sig )"
+	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+fi
+
+LICENSE="GPL-3"
+SLOT="0"
+IUSE="examples nls"
+
+RDEPEND="
+	virtual/libiconv
+	nls? (
+		sys-devel/gettext
+		virtual/libintl
+	)"
+DEPEND="${RDEPEND}"
+# Remember: cannot dep on autoconf since it needs us
+BDEPEND="app-arch/xz-utils
+	nls? ( sys-devel/gettext )
+	verify-sig? ( sec-keys/openpgp-keys-m4 )"
+
+PATCHES=(
+	"${FILESDIR}"/ppc-musl.patch
+	"${FILESDIR}"/loong-fix-build.patch
+	"${FILESDIR}"/${PN}-1.4.19-make-4.4-tests.patch
+	"${WORKDIR}"/${P}-test-198-sysval-r1.patch
+	"${FILESDIR}"/${PN}-1.4.19-fortify-source.patch
+)
+
+src_unpack() {
+	if use verify-sig ; then
+		# Needed for downloaded patch (which is unsigned, which is fine)
+		verify-sig_verify_detached "${DISTDIR}"/${P}.tar.xz{,.sig}
+	fi
+
+	default
+}
+
+src_prepare() {
+	default
+
+	# touch generated files after patching m4, to avoid activating maintainer
+	# mode
+	# remove when loong-fix-build.patch is no longer necessary
+	touch ./aclocal.m4 ./lib/config.hin ./configure ./doc/stamp-vti || die
+	find . -name Makefile.in -exec touch {} + || die
+}
+
+src_configure() {
+	local -a myeconfargs=(
+		--enable-changeword
+
+		--with-packager="Gentoo Linux"
+		--with-packager-version="${PVR}"
+		--with-packager-bug-reports="https://bugs.gentoo.org/"
+
+		$(usex nls '' '--disable-nls')
+
+		# Disable automagic dependency over libsigsegv; see bug #278026
+		ac_cv_libsigsegv=no
+	)
+
+	[[ ${USERLAND} != GNU ]] && myeconfargs+=( --program-prefix=g )
+
+	econf "${myeconfargs[@]}"
+}
+
+src_test() {
+	[[ -d /none ]] && die "m4 tests will fail with /none/" #244396
+	emake check
+}
+
+src_install() {
+	default
+
+	# autoconf-2.60 for instance, first checks gm4, then m4.  If we don't have
+	# gm4, it might find gm4 from outside the prefix on for instance Darwin
+	use prefix && dosym m4 /usr/bin/gm4
+
+	if use examples ; then
+		dodoc -r examples
+		rm -f "${ED}"/usr/share/doc/${PF}/examples/Makefile*
+	fi
+}


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2023-01-09  9:45 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-26  4:03 [gentoo-commits] repo/gentoo:master commit in: sys-devel/m4/files/, sys-devel/m4/ Sam James
  -- strict thread matches above, loose matches on Subject: below --
2023-01-09  9:45 Sam James
2022-12-13  5:12 Sam James
2022-04-25 10:11 WANG Xuerui
2021-11-17  2:41 Georgy Yakovlev
2021-09-04 17:35 David Seifert
2018-10-13 17:50 Sergei Trofimovich
2017-01-17 16:23 Lars Wendler
2016-04-25 22:57 Anthony G. Basile
2016-04-25 22:57 Anthony G. Basile
2016-04-20 23:00 Anthony G. Basile

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox