ncdu: update to 1.20
[feed/packages.git] / net / gensio / patches / 0003-Revert-ax_pkg_swig.m4-to-latest-vanilla-version.patch
1 From f53fc85ee9734dd21447ea3438b7ba1edcd1bcf8 Mon Sep 17 00:00:00 2001
2 From: Michael Heimpold <mhei@heimpold.de>
3 Date: Tue, 21 Nov 2023 23:27:45 +0100
4 Subject: [PATCH] Revert ax_pkg_swig.m4 to latest vanilla version
5
6 And instead of extending the macro, we can use the already
7 create variable 'available_swig_vernum' to compare the
8 required version number.
9
10 Signed-off-by: Michael Heimpold <mhei@heimpold.de>
11 ---
12 configure.ac | 26 ++++++++++++--------------
13 m4/ax_pkg_swig.m4 | 20 +++++++++-----------
14 2 files changed, 21 insertions(+), 25 deletions(-)
15
16 --- a/configure.ac
17 +++ b/configure.ac
18 @@ -1956,21 +1956,19 @@ AC_CHECK_LIB(nsl, main, [HAVE_LIBNSL=1;
19 SWIG_DIR=
20 SWIG_CPP_DIR=
21 SWIG=
22 -SWIG_NUMVERSION=0
23 +available_swig_vernum=0
24 if test "x$tryswig" = "xyes"; then
25 if test "x$swigprog" != "x"; then
26 SWIG="$swigprog"
27 fi
28 - AX_PKG_SWIG([1.3.21])
29 - if test "x$SWIG" != "x"; then
30 - AC_DEFINE([HAVE_SWIG], [], [Have swig installed])
31 - SWIG_DIR=swig
32 - if test $SWIG_NUMVERSION -ge 40100; then
33 - SWIG_CPP_DIR=swig
34 - else
35 - AC_MSG_WARN([SWIG version >= 4.1.0 is required for C++ swig.])
36 - fi
37 - fi
38 + AX_PKG_SWIG(4.1.0,
39 + [
40 + AC_DEFINE([HAVE_SWIG], [], [Have swig installed])
41 + SWIG_DIR=swig
42 + SWIG_CPP_DIR=swig
43 + ], [
44 + AC_MSG_WARN([SWIG version >= 4.1.0 is required for C++ swig.])
45 + ])
46 fi
47 AC_SUBST(SWIG_DIR)
48 AC_SUBST(SWIG_CPP_DIR)
49 @@ -2055,7 +2053,7 @@ AC_SUBST(PYTHON_UNDEF_LIBS)
50 PYTHON_EXECUTABLE="${PYTHON}"
51 AC_SUBST(PYTHON_EXECUTABLE)
52
53 -if test $SWIG_NUMVERSION -ge 40100 -a "${enable_shared}" = yes; then
54 +if test $available_swig_vernum -ge 40100 -a "${enable_shared}" = yes; then
55 trygo=yes
56 else
57 trygo=no
58 @@ -2076,7 +2074,7 @@ AC_ARG_WITH(go,
59 fi,
60 )
61
62 -if test $trygo = yes -a $SWIG_NUMVERSION -lt 40100; then
63 +if test $trygo = yes -a $available_swig_vernum -lt 40100; then
64 AC_MSG_ERROR([Go enabled, but swig version must be >= 4.1.0 for that])
65 fi
66 GODIR=
67 @@ -2363,7 +2361,7 @@ pr_op " shared libraries: " $enable_sh
68 pr_op " sctp sendv: " $ac_cv_lib_sctp_sctp_sendv
69 pr_vop " python: " "$ax_python_version"
70 if test "$SWIG_CPP_DIR" = "swig"; then
71 - prrw " swig: " "$SWIG_NUMVERSION"
72 + prrw " swig: " "$available_swig_vernum"
73 else
74 prrw " swig: " "no"
75 fi
76 --- a/m4/ax_pkg_swig.m4
77 +++ b/m4/ax_pkg_swig.m4
78 @@ -19,11 +19,6 @@
79 # 1.3.17), AX_PKG_SWIG checks that the swig package is this version number
80 # or higher.
81 #
82 -# If successful, SWIG_NUMVERSION is set to a numeric value for the
83 -# version found in the format NNnnpp where NN is the major version,
84 -# nn is the minor version, and pp is the patch version. This is
85 -# easy to directly compare with a number.
86 -#
87 # As usual, action-if-found is executed if SWIG is found, otherwise
88 # action-if-not-found is executed.
89 #
90 @@ -41,6 +36,8 @@
91 # Copyright (c) 2008 Rafael Laboissiere <rafael@laboissiere.net>
92 # Copyright (c) 2008 Andrew Collier
93 # Copyright (c) 2011 Murray Cumming <murrayc@openismus.com>
94 +# Copyright (c) 2018 Reini Urban <rurban@cpan.org>
95 +# Copyright (c) 2021 Vincent Danjean <Vincent.Danjean@ens-lyon.org>
96 #
97 # This program is free software; you can redistribute it and/or modify it
98 # under the terms of the GNU General Public License as published by the
99 @@ -68,14 +65,16 @@
100 # modified version of the Autoconf Macro, you may extend this special
101 # exception to the GPL to apply to your modified version as well.
102
103 -#serial 13
104 +#serial 15
105
106 AC_DEFUN([AX_PKG_SWIG],[
107 # Find path to the "swig" executable.
108 AC_PATH_PROGS([SWIG],[swig swig3.0 swig2.0])
109 if test -z "$SWIG" ; then
110 m4_ifval([$3],[$3],[:])
111 - elif test -n "$1" ; then
112 + elif test -z "$1" ; then
113 + m4_ifval([$2],[$2],[:])
114 + else
115 AC_MSG_CHECKING([SWIG version])
116 [swig_version=`$SWIG -version 2>&1 | grep 'SWIG Version' | sed 's/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/g'`]
117 AC_MSG_RESULT([$swig_version])
118 @@ -86,12 +85,12 @@ AC_DEFUN([AX_PKG_SWIG],[
119 if test -z "$required_major" ; then
120 [required_major=0]
121 fi
122 - [required=`echo $required | sed 's/[0-9]*[^0-9]//'`]
123 + [required=`echo $required. | sed 's/[0-9]*[^0-9]//'`]
124 [required_minor=`echo $required | sed 's/[^0-9].*//'`]
125 if test -z "$required_minor" ; then
126 [required_minor=0]
127 fi
128 - [required=`echo $required | sed 's/[0-9]*[^0-9]//'`]
129 + [required=`echo $required. | sed 's/[0-9]*[^0-9]//'`]
130 [required_patch=`echo $required | sed 's/[^0-9].*//'`]
131 if test -z "$required_patch" ; then
132 [required_patch=0]
133 @@ -126,10 +125,9 @@ AC_DEFUN([AX_PKG_SWIG],[
134 m4_ifval([$3],[$3],[])
135 else
136 AC_MSG_CHECKING([for SWIG library])
137 - SWIG_LIB=`$SWIG -swiglib | tail -1`
138 + SWIG_LIB=`$SWIG -swiglib | tr '\r\n' ' '`
139 AC_MSG_RESULT([$SWIG_LIB])
140 m4_ifval([$2],[$2],[])
141 - SWIG_NUMVERSION=$available_swig_vernum
142 fi
143 else
144 AC_MSG_WARN([cannot determine SWIG version])