From 482520fd315766e8536cbd38871ea7bc2d922e20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Fri, 2 Jul 2021 08:15:32 +0700 Subject: [PATCH] tmux: update to 3.2a. --- srcpkgs/tmux/patches/reallocarray.patch | 55 ++++++++++++++++++------- srcpkgs/tmux/template | 12 ++++-- 2 files changed, 48 insertions(+), 19 deletions(-) diff --git a/srcpkgs/tmux/patches/reallocarray.patch b/srcpkgs/tmux/patches/reallocarray.patch index ca96defd308..4e93acf7f31 100644 --- a/srcpkgs/tmux/patches/reallocarray.patch +++ b/srcpkgs/tmux/patches/reallocarray.patch @@ -1,25 +1,48 @@ -Index: tmux-3.2/configure.ac +Index: tmux-3.2a/configure.ac =================================================================== ---- tmux-3.2.orig/configure.ac -+++ tmux-3.2/configure.ac -@@ -158,18 +158,12 @@ AC_FUNC_STRNLEN - # 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]) +--- tmux-3.2a.orig/configure.ac ++++ tmux-3.2a/configure.ac +@@ -150,40 +150,12 @@ AC_REPLACE_FUNCS([ \ + strlcpy \ + strndup \ + strsep \ ++ strtonum \ ++ reallocarray \ ++ recallocarray \ + ]) + AC_FUNC_STRNLEN + +-# Check if strtonum works. +-AC_MSG_CHECKING([for working strtonum]) +-AC_RUN_IFELSE([AC_LANG_PROGRAM( +- [#include ], +- [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( - [#include ], - [return (reallocarray(NULL, 1, 1) == NULL);] - )], -+AC_CHECK_FUNC(reallocarray, - AC_MSG_RESULT(yes), - [AC_LIBOBJ(reallocarray) AC_MSG_RESULT([no])] - ) - AC_MSG_CHECKING([for working recallocarray]) +- AC_MSG_RESULT(yes), +- [AC_LIBOBJ(reallocarray) AC_MSG_RESULT([no])], +- [AC_LIBOBJ(reallocarray) AC_MSG_RESULT([no])] +-) +-AC_MSG_CHECKING([for working recallocarray]) -AC_RUN_IFELSE([AC_LANG_PROGRAM( - [#include ], - [return (recallocarray(NULL, 1, 1, 1) == NULL);] - )], -+AC_CHECK_FUNC(recallocarray, - AC_MSG_RESULT(yes), - [AC_LIBOBJ(recallocarray) AC_MSG_RESULT([no])] - ) +- AC_MSG_RESULT(yes), +- [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) diff --git a/srcpkgs/tmux/template b/srcpkgs/tmux/template index 25a22045bb7..a755478b725 100644 --- a/srcpkgs/tmux/template +++ b/srcpkgs/tmux/template @@ -1,6 +1,6 @@ # Template file for 'tmux' pkgname=tmux -version=3.2 +version=3.2a revision=1 build_style=gnu-configure hostmakedepends="byacc automake pkg-config" @@ -12,12 +12,18 @@ license="ISC" homepage="https://tmux.github.io" changelog="https://raw.githubusercontent.com/tmux/tmux/master/CHANGES" distfiles="https://github.com/tmux/tmux/releases/download/${version}/tmux-${version}.tar.gz" -checksum=664d345338c11cbe429d7ff939b92a5191e231a7c1ef42f381cebacb1e08a399 +checksum=551553a4f82beaa8dadc9256800bcc284d7c000081e47aa6ecbb6ff36eacd05f pre_configure() { autoreconf -fi } post_install() { - vlicense COPYING + { + echo ' * Copyright (c) 2007-2021 Nicholas Marriott ' + grep -rh 'Copyright (c) .*[0-9] [a-zA-Z]' *.c compat/*.c | + grep -v 'Nicholas Marriott' | sort -u + cat COPYING + } >LICENSE + vlicense LICENSE }