diff --git a/libs/dahdi-tools/Makefile b/libs/dahdi-tools/Makefile index 5ad82a8..523f68c 100644 --- a/libs/dahdi-tools/Makefile +++ b/libs/dahdi-tools/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2014 - 2018 OpenWrt.org +# Copyright (C) 2014 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -8,17 +8,23 @@ include $(TOPDIR)/rules.mk PKG_NAME:=dahdi-tools -PKG_VERSION:=2.11.1 -PKG_RELEASE:=3 +PKG_VERSION:=3.0.0 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://downloads.asterisk.org/pub/telephony/dahdi-tools/releases -PKG_HASH:=53ffeb333f3e44b0c88e5b17475cdbf87d3f652eb81a6422de76250c061e2909 +PKG_HASH:=5bebb20d5ae13fa13f0e2075603013954b962be477db02271eef44b3e41557c5 PKG_LICENSE:=GPL-2.0 PKG_LICENSE_FILES:=LICENSE PKG_MAINTAINER:=Vittorio Gambaletta +PKG_BUILD_PARALLEL:=1 + +PKG_FIXUP:=autoreconf + +PKG_INSTALL:=1 + include $(INCLUDE_DIR)/package.mk define Package/dahdi-cfg/Default @@ -46,41 +52,32 @@ define Package/dahdi-tools-libtonezone TITLE:=DAHDI tonezone library endef -define Build/Compile - $(MAKE) -C $(PKG_BUILD_DIR) \ - HOSTCC="$(HOSTCC)" \ - CROSS_COMPILE="$(TARGET_CROSS)" \ - CFLAGS="$(TARGET_CFLAGS)" \ - CPPFLAGS="$(TARGET_CPPFLAGS)" \ - dahdi_cfg dahdi_monitor dahdi_scan dahdi_speed dahdi_test fxotune -endef +CONFIGURE_ARGS+=--disable-silent-rules define Build/InstallDev $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_BUILD_DIR)/.libs/*.so* $(1)/usr/lib/ - $(CP) $(PKG_BUILD_DIR)/.libs/*.a $(1)/usr/lib/ - + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtonezone.{a,so*} \ + $(1)/usr/lib/ $(INSTALL_DIR) $(1)/usr/include/dahdi - $(INSTALL_DATA) $(PKG_BUILD_DIR)/tonezone.h $(1)/usr/include/dahdi/ + $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/dahdi/tonezone.h \ + $(1)/usr/include/dahdi/ endef define Package/dahdi-cfg/install $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/dahdi_cfg $(1)/usr/sbin/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/dahdi_scan $(1)/usr/sbin/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/fxotune $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/{dahdi_cfg,dahdi_scan,fxotune} \ + $(1)/usr/sbin/ endef define Package/dahdi-monitor/install $(INSTALL_DIR) $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/dahdi_monitor $(1)/usr/sbin/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/dahdi_speed $(1)/usr/sbin/ - $(INSTALL_BIN) $(PKG_BUILD_DIR)/dahdi_test $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/{dahdi_monitor,dahdi_speed,dahdi_test} \ + $(1)/usr/sbin/ endef define Package/dahdi-tools-libtonezone/install $(INSTALL_DIR) $(1)/usr/lib - $(CP) $(PKG_BUILD_DIR)/.libs/libtonezone.so* $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtonezone.so* $(1)/usr/lib/ endef $(eval $(call BuildPackage,dahdi-cfg)) diff --git a/libs/dahdi-tools/patches/010-fix-non-glibc-builds.patch b/libs/dahdi-tools/patches/010-fix-non-glibc-builds.patch new file mode 100644 index 0000000..d60e767 --- /dev/null +++ b/libs/dahdi-tools/patches/010-fix-non-glibc-builds.patch @@ -0,0 +1,26 @@ +--- a/xpp/xtalk/debug.c ++++ b/xpp/xtalk/debug.c +@@ -26,7 +26,9 @@ + #include + #include + #include ++#ifdef __GLIBC__ + #include ++#endif + #include + #include + +@@ -61,6 +63,7 @@ void dump_packet(int loglevel, int mask, + /* from glibc info(1) */ + void print_backtrace(FILE *fp) + { ++#ifdef __GLIBC__ + void *array[10]; + size_t size; + char **strings; +@@ -71,4 +74,5 @@ void print_backtrace(FILE *fp) + for (i = 0; i < size; i++) + fprintf(fp, "%s\n", strings[i]); + free(strings); ++#endif + } diff --git a/libs/dahdi-tools/patches/020-fix-undefined-reference-to-get_ver.patch b/libs/dahdi-tools/patches/020-fix-undefined-reference-to-get_ver.patch new file mode 100644 index 0000000..f09fcad --- /dev/null +++ b/libs/dahdi-tools/patches/020-fix-undefined-reference-to-get_ver.patch @@ -0,0 +1,11 @@ +--- a/xpp/echo_loader.c ++++ b/xpp/echo_loader.c +@@ -564,7 +564,7 @@ UINT32 Oct6100UserDriverReadBurstApi(tPO + return cOCT6100_ERR_OK; + } + +-inline int get_ver(struct astribank *astribank) ++static inline int get_ver(struct astribank *astribank) + { + return spi_send(astribank, 0, 0, 1, 1); + }