tmux: update to 3.2a.

This commit is contained in:
Đoàn Trần Công Danh 2021-07-02 08:15:32 +07:00
parent 2285fc86ba
commit 482520fd31
2 changed files with 48 additions and 19 deletions

View file

@ -1,25 +1,48 @@
Index: tmux-3.2/configure.ac Index: tmux-3.2a/configure.ac
=================================================================== ===================================================================
--- tmux-3.2.orig/configure.ac --- tmux-3.2a.orig/configure.ac
+++ tmux-3.2/configure.ac +++ tmux-3.2a/configure.ac
@@ -158,18 +158,12 @@ AC_FUNC_STRNLEN @@ -150,40 +150,12 @@ AC_REPLACE_FUNCS([ \
# system. When compiled it always returns NULL and crashes the program. To strlcpy \
# detect this we need a more complicated test. strndup \
AC_MSG_CHECKING([for working reallocarray]) strsep \
+ strtonum \
+ reallocarray \
+ recallocarray \
])
AC_FUNC_STRNLEN
-# Check if strtonum works.
-AC_MSG_CHECKING([for working strtonum])
-AC_RUN_IFELSE([AC_LANG_PROGRAM(
- [#include <stdlib.h>],
- [return (strtonum("0", 0, 1, NULL) == 0 ? 0 : 1);]
- )],
- [AC_DEFINE(HAVE_STRTONUM) AC_MSG_RESULT(yes)],
- [AC_LIBOBJ(strtonum) AC_MSG_RESULT(no)]
-)
-
-# Clang sanitizers wrap reallocarray even if it isn't available on the target
-# system. When compiled it always returns NULL and crashes the program. To
-# detect this we need a more complicated test.
-AC_MSG_CHECKING([for working reallocarray])
-AC_RUN_IFELSE([AC_LANG_PROGRAM( -AC_RUN_IFELSE([AC_LANG_PROGRAM(
- [#include <stdlib.h>], - [#include <stdlib.h>],
- [return (reallocarray(NULL, 1, 1) == NULL);] - [return (reallocarray(NULL, 1, 1) == NULL);]
- )], - )],
+AC_CHECK_FUNC(reallocarray, - AC_MSG_RESULT(yes),
AC_MSG_RESULT(yes), - [AC_LIBOBJ(reallocarray) AC_MSG_RESULT([no])],
[AC_LIBOBJ(reallocarray) AC_MSG_RESULT([no])] - [AC_LIBOBJ(reallocarray) AC_MSG_RESULT([no])]
) -)
AC_MSG_CHECKING([for working recallocarray]) -AC_MSG_CHECKING([for working recallocarray])
-AC_RUN_IFELSE([AC_LANG_PROGRAM( -AC_RUN_IFELSE([AC_LANG_PROGRAM(
- [#include <stdlib.h>], - [#include <stdlib.h>],
- [return (recallocarray(NULL, 1, 1, 1) == NULL);] - [return (recallocarray(NULL, 1, 1, 1) == NULL);]
- )], - )],
+AC_CHECK_FUNC(recallocarray, - AC_MSG_RESULT(yes),
AC_MSG_RESULT(yes), - [AC_LIBOBJ(recallocarray) AC_MSG_RESULT([no])],
[AC_LIBOBJ(recallocarray) AC_MSG_RESULT([no])] - [AC_LIBOBJ(recallocarray) AC_MSG_RESULT([no])]
) -)
# Look for clock_gettime. Must come before event_init.
AC_SEARCH_LIBS(clock_gettime, rt)

View file

@ -1,6 +1,6 @@
# Template file for 'tmux' # Template file for 'tmux'
pkgname=tmux pkgname=tmux
version=3.2 version=3.2a
revision=1 revision=1
build_style=gnu-configure build_style=gnu-configure
hostmakedepends="byacc automake pkg-config" hostmakedepends="byacc automake pkg-config"
@ -12,12 +12,18 @@ license="ISC"
homepage="https://tmux.github.io" homepage="https://tmux.github.io"
changelog="https://raw.githubusercontent.com/tmux/tmux/master/CHANGES" changelog="https://raw.githubusercontent.com/tmux/tmux/master/CHANGES"
distfiles="https://github.com/tmux/tmux/releases/download/${version}/tmux-${version}.tar.gz" distfiles="https://github.com/tmux/tmux/releases/download/${version}/tmux-${version}.tar.gz"
checksum=664d345338c11cbe429d7ff939b92a5191e231a7c1ef42f381cebacb1e08a399 checksum=551553a4f82beaa8dadc9256800bcc284d7c000081e47aa6ecbb6ff36eacd05f
pre_configure() { pre_configure() {
autoreconf -fi autoreconf -fi
} }
post_install() { post_install() {
vlicense COPYING {
echo ' * Copyright (c) 2007-2021 Nicholas Marriott <nicholas.marriott@gmail.com>'
grep -rh 'Copyright (c) .*[0-9] [a-zA-Z]' *.c compat/*.c |
grep -v 'Nicholas Marriott' | sort -u
cat COPYING
} >LICENSE
vlicense LICENSE
} }