From db6a13f8a0accb5822aaa62221a014e183451af0 Mon Sep 17 00:00:00 2001 From: Sebastian Kemper Date: Mon, 24 Jul 2017 23:31:06 +0200 Subject: [PATCH] net/asterisk-11.x and net/asterisk-13.x: fix menuselect build - Include host-build.mk, otherwise $HOST_CONFIGURE_ARGS will be empty. - Remove --with-ncurses=PATH as the PATH is wrong. The ncurses host package does not install anything but 'tic'. - Use $HOSTCC to compile menuselect. This has the added bonus of using ccache (if selected). - Run configure with an unset $CONFIG_SITE so that it doesn't pick a cross-compile site-script, e.g. for mips. - Drop '-lxml2' from $LDFLAGS as the menuselect Makefile will add it anyway. - Move the variables in front of 'make' as they're not arguments. Signed-off-by: Sebastian Kemper --- net/asterisk-11.x/Makefile | 15 +++++++++------ net/asterisk-13.x/Makefile | 15 +++++++++------ 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/net/asterisk-11.x/Makefile b/net/asterisk-11.x/Makefile index 12d8a04..baff718 100644 --- a/net/asterisk-11.x/Makefile +++ b/net/asterisk-11.x/Makefile @@ -24,6 +24,7 @@ PKG_LICENSE_FILES:=COPYING LICENSE PKG_MAINTAINER:=Jiri Slachta include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/host-build.mk define Package/asterisk11/install/module $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules @@ -282,7 +283,6 @@ CONFIGURE_VARS += \ AST_MENUSELECT_OPTS = \ --without-newt \ --without-curses \ - --with-ncurses="$(STAGING_DIR_HOSTPKG)/usr" \ --with-libxml2="$(STAGING_DIR_HOSTPKG)/usr" define Build/Prepare @@ -307,19 +307,22 @@ define Build/Configure >> $(PKG_BUILD_DIR)/res/pjproject/user.mak; $(call Build/Configure/Default,,$(SITE_VARS)) (cd $(PKG_BUILD_DIR)/menuselect; \ + CC="$(HOSTCC)" \ + CFLAGS="$(HOST_CFLAGS) -I$(STAGING_DIR_HOSTPKG)/include/libxml2" \ + CONFIG_SITE= \ + LDFLAGS="$(HOST_LDFLAGS)" \ 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_HOSTPKG)/include/libxml2" \ ); endef define Build/Compile - $(MAKE) -C "$(PKG_BUILD_DIR)/menuselect" \ - CFLAGS="$(HOST_CFLAGS) -I$(STAGING_DIR_HOSTPKG)/include/libxml2" \ - LDFLAGS="$(HOST_LDFLAGS) -lxml2" + CC="$(HOSTCC)" \ + CFLAGS="$(HOST_CFLAGS) -I$(STAGING_DIR_HOSTPKG)/include/libxml2" \ + LDFLAGS="$(HOST_LDFLAGS)" \ + $(MAKE) -C "$(PKG_BUILD_DIR)/menuselect" $(MAKE) -C "$(PKG_BUILD_DIR)" include/asterisk/version.h \ include/asterisk/buildopts.h defaults.h \ makeopts.embed_rules diff --git a/net/asterisk-13.x/Makefile b/net/asterisk-13.x/Makefile index 71beebc..c05767e 100644 --- a/net/asterisk-13.x/Makefile +++ b/net/asterisk-13.x/Makefile @@ -25,6 +25,7 @@ PKG_LICENSE_FILES:=COPYING LICENSE PKG_MAINTAINER:=Jiri Slachta include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/host-build.mk define Package/asterisk13/install/module $(INSTALL_DIR) $(1)/usr/lib/asterisk/modules @@ -231,7 +232,6 @@ CONFIGURE_VARS += \ AST_MENUSELECT_OPTS = \ --without-newt \ --without-curses \ - --with-ncurses="$(STAGING_DIR_HOSTPKG)/usr" \ --with-libxml2="$(STAGING_DIR_HOSTPKG)/usr" define Build/Prepare @@ -248,19 +248,22 @@ define Build/Configure $(call Build/Configure/Default,,$(SITE_VARS)) (cd $(PKG_BUILD_DIR)/menuselect; \ ./bootstrap.sh; \ + CC="$(HOSTCC)" \ + CFLAGS="$(HOST_CFLAGS) -I$(STAGING_DIR_HOSTPKG)/include/libxml2" \ + CONFIG_SITE= \ + LDFLAGS="$(HOST_LDFLAGS)" \ 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_HOSTPKG)/include/libxml2" \ ); endef define Build/Compile - $(MAKE) -C "$(PKG_BUILD_DIR)/menuselect" \ - CFLAGS="$(HOST_CFLAGS) -I$(STAGING_DIR_HOSTPKG)/include/libxml2" \ - LDFLAGS="$(HOST_LDFLAGS) -lxml2" + CC="$(HOSTCC)" \ + CFLAGS="$(HOST_CFLAGS) -I$(STAGING_DIR_HOSTPKG)/include/libxml2" \ + LDFLAGS="$(HOST_LDFLAGS)" \ + $(MAKE) -C "$(PKG_BUILD_DIR)/menuselect" $(MAKE) -C "$(PKG_BUILD_DIR)" \ include/asterisk/version.h \ include/asterisk/buildopts.h defaults.h -- 2.30.2