From 7e9c4857254c6608b7afe84b5de9f863ea634c65 Mon Sep 17 00:00:00 2001 From: Sebastian Kemper Date: Sat, 22 Jul 2017 16:46:00 +0200 Subject: [PATCH] net/asterisk-13.x: bump to 13.17.0 - Version bump to 13.17.0 - Remove makeopts.embed_rules as the target got removed. - Refresh patches. - $(STAGING_DIR)/host doesn't work anymore resulting in libxml2 host headers not being found. Replace with $(STAGING_DIR_HOSTPGK). - Prevent Asterisk from adding -march=native when cross-compiling (patch for configure.ac). Signed-off-by: Sebastian Kemper --- net/asterisk-13.x/Makefile | 18 +++++++++--------- .../patches/001-disable-semaphores-check.patch | 2 +- .../patches/002-undef-res-ninit.patch | 2 +- .../patches/052-musl-libcap.patch | 6 +++--- .../patches/054-fix-cross-compile.patch | 14 ++++++++++++++ 5 files changed, 28 insertions(+), 14 deletions(-) create mode 100644 net/asterisk-13.x/patches/054-fix-cross-compile.patch diff --git a/net/asterisk-13.x/Makefile b/net/asterisk-13.x/Makefile index 3691c49..a3b7361 100644 --- a/net/asterisk-13.x/Makefile +++ b/net/asterisk-13.x/Makefile @@ -10,12 +10,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=asterisk13 -PKG_VERSION:=13.15.0 -PKG_RELEASE:=2 +PKG_VERSION:=13.17.0 +PKG_RELEASE:=1 PKG_SOURCE:=asterisk-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://downloads.asterisk.org/pub/telephony/asterisk/releases/ -PKG_HASH:=8b8a55557d9c882f9b68f61b62f5f8af5c9ad68b6da6a1aa3506fa1894fb5844 +PKG_HASH:=c4a89386d7db58520391fcbd3202902584b4434289094ca2e4a6b8dada1e90a4 PKG_BUILD_DIR:=$(BUILD_DIR)/asterisk-$(PKG_VERSION) PKG_BUILD_DEPENDS:=libxml2/host @@ -231,8 +231,8 @@ CONFIGURE_VARS += \ AST_MENUSELECT_OPTS = \ --without-newt \ --without-curses \ - --with-ncurses="$(STAGING_DIR_HOST)/usr" \ - --with-libxml2="$(STAGING_DIR_HOST)/usr" + --with-ncurses="$(STAGING_DIR_HOSTPKG)/usr" \ + --with-libxml2="$(STAGING_DIR_HOSTPKG)/usr" define Build/Prepare $(call Build/Prepare/Default) @@ -248,22 +248,22 @@ define Build/Configure $(call Build/Configure/Default,,$(SITE_VARS)) (cd $(PKG_BUILD_DIR)/menuselect; \ ./bootstrap.sh; \ + ac_cv_path_ac_pt_CONFIG_LIBXML2=$(STAGING_DIR_HOSTPKG)/bin/xml2-config \ ./configure \ $(HOST_CONFIGURE_ARGS) \ $(AST_MENUSELECT_OPTS) \ LDFLAGS="$(HOST_LDFLAGS) -lxml2" \ - CFLAGS="$(HOST_CFLAGS) -I$(STAGING_DIR)/host/include/libxml2" \ + CFLAGS="$(HOST_CFLAGS) -I$(STAGING_DIR_HOSTPKG)/include/libxml2" \ ); endef define Build/Compile $(MAKE) -C "$(PKG_BUILD_DIR)/menuselect" \ - CFLAGS="$(HOST_CFLAGS) -I$(STAGING_DIR)/host/include/libxml2" \ + CFLAGS="$(HOST_CFLAGS) -I$(STAGING_DIR_HOSTPKG)/include/libxml2" \ LDFLAGS="$(HOST_LDFLAGS) -lxml2" $(MAKE) -C "$(PKG_BUILD_DIR)" \ include/asterisk/version.h \ - include/asterisk/buildopts.h defaults.h \ - makeopts.embed_rules + include/asterisk/buildopts.h defaults.h ASTCFLAGS="$(EXTRA_CFLAGS) -DLOW_MEMORY" ASTLDFLAGS="$(EXTRA_LDFLAGS)" $(MAKE) -C "$(PKG_BUILD_DIR)" \ diff --git a/net/asterisk-13.x/patches/001-disable-semaphores-check.patch b/net/asterisk-13.x/patches/001-disable-semaphores-check.patch index 66381ef..59b7907 100644 --- a/net/asterisk-13.x/patches/001-disable-semaphores-check.patch +++ b/net/asterisk-13.x/patches/001-disable-semaphores-check.patch @@ -1,6 +1,6 @@ --- a/configure.ac +++ b/configure.ac -@@ -961,19 +961,6 @@ AC_LINK_IFELSE( +@@ -962,19 +962,6 @@ AC_LINK_IFELSE( ] ) diff --git a/net/asterisk-13.x/patches/002-undef-res-ninit.patch b/net/asterisk-13.x/patches/002-undef-res-ninit.patch index 74043b5..e118e49 100644 --- a/net/asterisk-13.x/patches/002-undef-res-ninit.patch +++ b/net/asterisk-13.x/patches/002-undef-res-ninit.patch @@ -1,6 +1,6 @@ --- a/configure.ac +++ b/configure.ac -@@ -1291,7 +1291,6 @@ AC_LINK_IFELSE( +@@ -1279,7 +1279,6 @@ AC_LINK_IFELSE( #include ], [int foo = res_ninit(NULL);])], AC_MSG_RESULT(yes) diff --git a/net/asterisk-13.x/patches/052-musl-libcap.patch b/net/asterisk-13.x/patches/052-musl-libcap.patch index 815e7be..90150d9 100644 --- a/net/asterisk-13.x/patches/052-musl-libcap.patch +++ b/net/asterisk-13.x/patches/052-musl-libcap.patch @@ -26,12 +26,12 @@ AST_C_DEFINE_CHECK([DAHDI], [DAHDI_DEFAULT_MTU_MRU], [dahdi/user.h], [220]) --- a/main/Makefile +++ b/main/Makefile -@@ -47,7 +47,7 @@ AST_LIBS+=$(UUID_LIB) +@@ -47,7 +47,7 @@ AST_LIBS+=$(AST_CLANG_BLOCKS_LIBS) AST_LIBS+=$(RT_LIB) AST_LIBS+=$(SYSTEMD_LIB) -ifneq ($(findstring $(OSARCH), linux-gnu uclinux linux-uclibc kfreebsd-gnu),) +ifneq ($(findstring $(OSARCH), linux-gnu uclinux linux-uclibc linux-musl kfreebsd-gnu),) - ifneq ($(findstring LOADABLE_MODULES,$(MENUSELECT_CFLAGS)),) AST_LIBS+=-ldl - endif + ifneq (x$(CAP_LIB),x) + AST_LIBS+=$(CAP_LIB) diff --git a/net/asterisk-13.x/patches/054-fix-cross-compile.patch b/net/asterisk-13.x/patches/054-fix-cross-compile.patch new file mode 100644 index 0000000..dd1f2ea --- /dev/null +++ b/net/asterisk-13.x/patches/054-fix-cross-compile.patch @@ -0,0 +1,14 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -1226,7 +1226,10 @@ fi + AC_SUBST(AST_SHADOW_WARNINGS) + + AC_MSG_CHECKING(for -march=native support) +-if $(${CC} -march=native -S -o /dev/null -xc /dev/null > /dev/null 2>&1); then ++if test "${cross_compiling}" = "yes"; then ++ AC_MSG_RESULT(cross-compile) ++ AST_NATIVE_ARCH=0 ++elif $(${CC} -march=native -S -o /dev/null -xc /dev/null > /dev/null 2>&1); then + AC_MSG_RESULT(yes) + AST_NATIVE_ARCH=1 + else -- 2.30.2