From 3b0a9ac8c85c14da1b8cba91bb3773f497633cf1 Mon Sep 17 00:00:00 2001 From: Sebastian Kemper Date: Sat, 18 Mar 2023 17:42:35 +0100 Subject: [PATCH] asterisk-chan-sccp: autoconf fixes Since OpenWrt updated autoconf to 2.71 configure fails, because "$ac_dir" is now empty when configure attempts to run "./tools/versioncheck". With previous autoconf "$ac_dir" contained "autoconf" at this point in the script. As a workaround "$ac_dir" is replaced with "$ac_aux_dir", which incidentally contains "autoconf". Also a build dependency is added for gettext-full, as it provides iconv.m4. Previously this was provided by libiconv, but not anymore. Without iconv.m4 autoreconf fails. Some patches were refreshed to allow CI to pass. Signed-off-by: Sebastian Kemper --- net/asterisk-chan-sccp/Makefile | 5 ++++- .../patches/01-prevent-extra-optimization.patch | 4 ++-- net/asterisk-chan-sccp/patches/02-autoconf-2.70.patch | 11 +++++++++++ .../patches/100-reproducible-builds.patch | 8 +++----- 4 files changed, 20 insertions(+), 8 deletions(-) create mode 100644 net/asterisk-chan-sccp/patches/02-autoconf-2.70.patch diff --git a/net/asterisk-chan-sccp/Makefile b/net/asterisk-chan-sccp/Makefile index 7f5e8dc..8e35062 100644 --- a/net/asterisk-chan-sccp/Makefile +++ b/net/asterisk-chan-sccp/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=asterisk-chan-sccp -PKG_RELEASE:=1 +PKG_RELEASE:=2 # Updated to v4.3.3 release PKG_SOURCE_URL:=https://github.com/chan-sccp/chan-sccp.git @@ -26,6 +26,9 @@ PKG_MAINTAINER:=Jiri Slachta PKG_INSTALL:=1 +# need iconv.m4, otherwise error during autoreconf +PKG_BUILD_DEPENDS:=gettext-full + include $(INCLUDE_DIR)/package.mk # chan-sccp needs iconv include $(INCLUDE_DIR)/nls.mk diff --git a/net/asterisk-chan-sccp/patches/01-prevent-extra-optimization.patch b/net/asterisk-chan-sccp/patches/01-prevent-extra-optimization.patch index c6dc4ac..6d4b8ef 100644 --- a/net/asterisk-chan-sccp/patches/01-prevent-extra-optimization.patch +++ b/net/asterisk-chan-sccp/patches/01-prevent-extra-optimization.patch @@ -1,6 +1,6 @@ --- a/autoconf/extra.m4 +++ b/autoconf/extra.m4 -@@ -491,17 +491,6 @@ AC_DEFUN([CS_ENABLE_OPTIMIZATION], [ +@@ -516,17 +516,6 @@ AC_DEFUN([CS_ENABLE_OPTIMIZATION], [ ], SUPPORTED_CFLAGS) ]) AC_SUBST([strip_binaries]) @@ -16,5 +16,5 @@ - esac - CFLAGS_saved="${CFLAGS_saved} ${optimize_flag} " ]) - + AS_IF([test "X${enable_debug}" == "Xyes"], [ diff --git a/net/asterisk-chan-sccp/patches/02-autoconf-2.70.patch b/net/asterisk-chan-sccp/patches/02-autoconf-2.70.patch new file mode 100644 index 0000000..40ed199 --- /dev/null +++ b/net/asterisk-chan-sccp/patches/02-autoconf-2.70.patch @@ -0,0 +1,11 @@ +--- a/autoconf/acinclude.m4 ++++ b/autoconf/acinclude.m4 +@@ -497,7 +497,7 @@ AC_DEFUN([CS_GET_VERSION], [ + SCCP_REVISION="unknown" + + CURRENT=`pwd` +- BASE=`dirname $ac_dir` ++ BASE=`dirname $ac_aux_dir` + cd $BASE >/dev/null + . ./tools/versioncheck silent + cd $CURRENT >/dev/null diff --git a/net/asterisk-chan-sccp/patches/100-reproducible-builds.patch b/net/asterisk-chan-sccp/patches/100-reproducible-builds.patch index f10a750..db1cac9 100644 --- a/net/asterisk-chan-sccp/patches/100-reproducible-builds.patch +++ b/net/asterisk-chan-sccp/patches/100-reproducible-builds.patch @@ -1,8 +1,6 @@ -Index: chan-sccp-v4.3.0-20171123/src/chan_sccp.c -=================================================================== ---- chan-sccp-v4.3.0-20171123.orig/src/chan_sccp.c -+++ chan-sccp-v4.3.0-20171123/src/chan_sccp.c -@@ -186,7 +186,7 @@ boolean_t sccp_postPBX_load(void) +--- a/src/chan_sccp.c ++++ b/src/chan_sccp.c +@@ -198,7 +198,7 @@ boolean_t sccp_postPBX_load(void) #else snprintf(SCCP_REVISIONSTR, sizeof(SCCP_REVISIONSTR), "%s", SCCP_REVISION); #endif -- 2.30.2