From 31e95d12c106346948f2c16db5fc6aed85f7270b Mon Sep 17 00:00:00 2001 From: Sebastian Kemper Date: Wed, 26 Dec 2018 18:03:35 +0100 Subject: [PATCH 1/4] dahdi-tools: fix copyright In a previous commit I updated the copyright message. But that was not correct as I am not affiliated with OpenWrt. This commit reverts the change. Signed-off-by: Sebastian Kemper --- libs/dahdi-tools/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/dahdi-tools/Makefile b/libs/dahdi-tools/Makefile index 5ad82a8..234dccc 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. From 2f77859b3b3f4911612470c20e7ce34530dd744e Mon Sep 17 00:00:00 2001 From: Sebastian Kemper Date: Wed, 26 Dec 2018 18:07:01 +0100 Subject: [PATCH 2/4] dahdi-tools: update to 3.0.0 Version bump. New version does not have too many changes, but upstream cleaned up the autoconf files. As a result autoreconf is now needed to get the configure script. This commit adds a configure switch to get the make output as verbose as in the past. Signed-off-by: Sebastian Kemper --- libs/dahdi-tools/Makefile | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/libs/dahdi-tools/Makefile b/libs/dahdi-tools/Makefile index 234dccc..14444ef 100644 --- a/libs/dahdi-tools/Makefile +++ b/libs/dahdi-tools/Makefile @@ -8,17 +8,19 @@ 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_FIXUP:=autoreconf + include $(INCLUDE_DIR)/package.mk define Package/dahdi-cfg/Default @@ -46,6 +48,8 @@ define Package/dahdi-tools-libtonezone TITLE:=DAHDI tonezone library endef +CONFIGURE_ARGS+=--disable-silent-rules + define Build/Compile $(MAKE) -C $(PKG_BUILD_DIR) \ HOSTCC="$(HOSTCC)" \ From aad0887281db4946f6498b9a4df9f7b437d5e8f4 Mon Sep 17 00:00:00 2001 From: Sebastian Kemper Date: Sat, 29 Dec 2018 11:36:51 +0100 Subject: [PATCH 3/4] dahdi-tools: use default Build/Compile template Add two patches to fix general compile issues. The first masks out some glibc specific extensions if using a different libc. The second fixes a compile issue with newer compilers. Like this it's possible to easily add more executables to the packages should the need (or wish) arise. This also gets rid of the following warnings: cc1: note: someone does not honour COPTS correctly, passed 2 times Signed-off-by: Sebastian Kemper --- libs/dahdi-tools/Makefile | 9 ------- .../patches/010-fix-non-glibc-builds.patch | 26 +++++++++++++++++++ ...0-fix-undefined-reference-to-get_ver.patch | 11 ++++++++ 3 files changed, 37 insertions(+), 9 deletions(-) create mode 100644 libs/dahdi-tools/patches/010-fix-non-glibc-builds.patch create mode 100644 libs/dahdi-tools/patches/020-fix-undefined-reference-to-get_ver.patch diff --git a/libs/dahdi-tools/Makefile b/libs/dahdi-tools/Makefile index 14444ef..dc66764 100644 --- a/libs/dahdi-tools/Makefile +++ b/libs/dahdi-tools/Makefile @@ -50,15 +50,6 @@ endef CONFIGURE_ARGS+=--disable-silent-rules -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 - define Build/InstallDev $(INSTALL_DIR) $(1)/usr/lib $(CP) $(PKG_BUILD_DIR)/.libs/*.so* $(1)/usr/lib/ 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); + } From 032e2bd36e6d1079d5f8f1c4d3dee420f7db8ed6 Mon Sep 17 00:00:00 2001 From: Sebastian Kemper Date: Sat, 29 Dec 2018 11:44:56 +0100 Subject: [PATCH 4/4] dahdi-tools: add PKG_BUILD_PARALLEL & PKG_INSTALL Cleans up the install sections while replacing PKG_BUILD_DIR with PKG_INSTALL_DIR, too. Signed-off-by: Sebastian Kemper --- libs/dahdi-tools/Makefile | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/libs/dahdi-tools/Makefile b/libs/dahdi-tools/Makefile index dc66764..523f68c 100644 --- a/libs/dahdi-tools/Makefile +++ b/libs/dahdi-tools/Makefile @@ -19,8 +19,12 @@ 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 @@ -52,30 +56,28 @@ 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))