commit:     aa0f2ac8fe28b871da7d7b91844d7313daef909f
Author:     Mats Lidell <matsl <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 29 20:41:37 2020 +0000
Commit:     Mats Lidell <matsl <AT> gentoo <DOT> org>
CommitDate: Sun Aug 30 18:11:25 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aa0f2ac8

app-editors/xemacs: Compile on >=glibc-2.32

Use strsignal to compile on >=glibc-2.32.

Closes: https://bugs.gentoo.org/738396
Package-Manager: Portage-2.3.103, Repoman-2.3.23
Signed-off-by: Mats Lidell <matsl <AT> gentoo.org>

 .../xemacs/files/xemacs-21.5.34-strsignal.patch    | 92 ++++++++++++++++++++++
 app-editors/xemacs/xemacs-21.5.34-r5.ebuild        |  1 +
 2 files changed, 93 insertions(+)

diff --git a/app-editors/xemacs/files/xemacs-21.5.34-strsignal.patch 
b/app-editors/xemacs/files/xemacs-21.5.34-strsignal.patch
new file mode 100644
index 00000000000..464c6a542e8
--- /dev/null
+++ b/app-editors/xemacs/files/xemacs-21.5.34-strsignal.patch
@@ -0,0 +1,92 @@
+diff -r 3ca291c0f7e3 configure
+--- a/configure        Sun Jul 28 10:17:08 2019 +0100
++++ b/configure        Thu Aug 27 00:15:50 2020 +0200
+@@ -18090,7 +18090,7 @@
+ esac
+ 
+ 
+-for ac_func in cbrt closedir dup2 eaccess fmod fpathconf frexp fsync ftime 
ftruncate getaddrinfo gethostname getnameinfo getpagesize getrlimit 
gettimeofday getcwd link logb lrand48 matherr mkdir mktime perror poll random 
readlink rename res_init rint rmdir select setitimer setpgid setsid sigblock 
sighold sigprocmask snprintf strerror strlwr strupr symlink tzset ulimit umask 
usleep vlimit vsnprintf waitpid wcscmp wcslen
++for ac_func in cbrt closedir dup2 eaccess fmod fpathconf frexp fsync ftime 
ftruncate getaddrinfo gethostname getnameinfo getpagesize getrlimit 
gettimeofday getcwd link logb lrand48 matherr mkdir mktime perror poll random 
readlink rename res_init rint rmdir select setitimer setpgid setsid sigblock 
sighold sigprocmask snprintf strerror strlwr strsignal strupr symlink tzset 
ulimit umask usleep vlimit vsnprintf waitpid wcscmp wcslen
+ do :
+   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+diff -r 3ca291c0f7e3 configure.ac
+--- a/configure.ac     Sun Jul 28 10:17:08 2019 +0100
++++ b/configure.ac     Thu Aug 27 00:15:50 2020 +0200
+@@ -4563,7 +4563,7 @@
+ dnl Check for POSIX functions.
+ dnl ----------------------------------------------------------------
+ 
+-AC_CHECK_FUNCS(cbrt closedir dup2 eaccess fmod fpathconf frexp fsync ftime 
ftruncate getaddrinfo gethostname getnameinfo getpagesize getrlimit 
gettimeofday getcwd link logb lrand48 matherr mkdir mktime perror poll random 
readlink rename res_init rint rmdir select setitimer setpgid setsid sigblock 
sighold sigprocmask snprintf strerror strlwr strupr symlink tzset ulimit umask 
usleep vlimit vsnprintf waitpid wcscmp wcslen)
++AC_CHECK_FUNCS(cbrt closedir dup2 eaccess fmod fpathconf frexp fsync ftime 
ftruncate getaddrinfo gethostname getnameinfo getpagesize getrlimit 
gettimeofday getcwd link logb lrand48 matherr mkdir mktime perror poll random 
readlink rename res_init rint rmdir select setitimer setpgid setsid sigblock 
sighold sigprocmask snprintf strerror strlwr strsignal strupr symlink tzset 
ulimit umask usleep vlimit vsnprintf waitpid wcscmp wcslen)
+ 
+ dnl getaddrinfo() is borked under hpux11
+ if test "$ac_cv_func_getaddrinfo" != "no" ; then
+diff -r 3ca291c0f7e3 src/config.h.in
+--- a/src/config.h.in  Sun Jul 28 10:17:08 2019 +0100
++++ b/src/config.h.in  Thu Aug 27 00:15:50 2020 +0200
+@@ -417,6 +417,7 @@
+ #undef HAVE_SNPRINTF
+ #undef HAVE_STRERROR
+ #undef HAVE_STRLWR
++#undef HAVE_STRSIGNAL
+ #undef HAVE_STRUPR
+ #undef HAVE_SYMLINK
+ #undef HAVE_TZSET
+diff -r 3ca291c0f7e3 src/process.c
+--- a/src/process.c    Sun Jul 28 10:17:08 2019 +0100
++++ b/src/process.c    Thu Aug 27 00:15:50 2020 +0200
+@@ -1646,7 +1646,11 @@
+ signal_name (int signum)
+ {
+   if (signum >= 0 && signum < NSIG)
++#ifdef HAVE_STRSIGNAL
++    return strsignal (signum);
++#else
+     return (const char *) sys_siglist[signum];
++#endif
+ 
+   return (const char *) GETTEXT ("unknown signal");
+ }
+diff -r 3ca291c0f7e3 src/s/linux.h
+--- a/src/s/linux.h    Sun Jul 28 10:17:08 2019 +0100
++++ b/src/s/linux.h    Thu Aug 27 00:15:50 2020 +0200
+@@ -36,10 +36,6 @@
+ 
+ /* Deleted GNU_LIBRARY_PENDING_OUTPUT_COUNT -- unused in XEmacs */
+ 
+-/* This is needed for sysdep.c */
+-
+-#define HAVE_SYS_SIGLIST
+-
+ /* #define POSIX -- not used in XEmacs */
+ 
+ /* Deleted TERM stuff -- probably hugely obsolete */
+diff -r 3ca291c0f7e3 src/sysdep.c
+--- a/src/sysdep.c     Sun Jul 28 10:17:08 2019 +0100
++++ b/src/sysdep.c     Thu Aug 27 00:15:50 2020 +0200
+@@ -3520,7 +3520,7 @@
+ /*               Strings corresponding to defined signals               */
+ /************************************************************************/
+ 
+-#if (!defined(HAVE_DECL_SYS_SIGLIST) || !HAVE_DECL_SYS_SIGLIST ) && !defined 
(HAVE_SYS_SIGLIST)
++#if !defined(HAVE_STRSIGNAL) && (!defined(HAVE_DECL_SYS_SIGLIST) || 
!HAVE_DECL_SYS_SIGLIST )
+ 
+ #if defined(WIN32_NATIVE) || defined(CYGWIN)
+ const char *sys_siglist[] =
+diff -r 3ca291c0f7e3 src/syssignal.h
+--- a/src/syssignal.h  Sun Jul 28 10:17:08 2019 +0100
++++ b/src/syssignal.h  Thu Aug 27 00:15:50 2020 +0200
+@@ -263,10 +263,8 @@
+ # endif
+ #endif
+ 
+-/* HAVE_DECL_SYS_SIGLIST is determined by configure.  On Linux, it seems,
+-   configure incorrectly fails to find it, so s/linux.h defines
+-   HAVE_SYS_SIGLIST. */
+-#if (!defined(HAVE_DECL_SYS_SIGLIST) || !HAVE_DECL_SYS_SIGLIST ) && !defined 
(HAVE_SYS_SIGLIST)
++/* Systems that have sys_siglist but do not declare it. */
++#if !defined(HAVE_STRSIGNAL) && (!defined(HAVE_DECL_SYS_SIGLIST) || 
!HAVE_DECL_SYS_SIGLIST )
+ extern const char *sys_siglist[];
+ #endif
+ 

diff --git a/app-editors/xemacs/xemacs-21.5.34-r5.ebuild 
b/app-editors/xemacs/xemacs-21.5.34-r5.ebuild
index 6e6d7958c4e..accb1cfdff3 100644
--- a/app-editors/xemacs/xemacs-21.5.34-r5.ebuild
+++ b/app-editors/xemacs/xemacs-21.5.34-r5.ebuild
@@ -69,6 +69,7 @@ src_prepare() {
        eapply "${FILESDIR}/${P}-as-needed.patch"
        eapply "${FILESDIR}/${P}-configure-libc-version.patch"
        eapply "${FILESDIR}/${P}-ar.patch"
+       eapply "${FILESDIR}/${P}-strsignal.patch"
 
        eapply_user
 

Reply via email to