From 93faf947edb19b4d4b8cb06c8253b1739faeb110 Mon Sep 17 00:00:00 2001 From: Jiri Slachta Date: Fri, 18 Jul 2014 20:12:49 +0200 Subject: [PATCH] spandsp: import from oldpackages Signed-off-by: Jiri Slachta --- libs/spandsp/Makefile | 53 ++++++++++++++++++++++++++++ libs/spandsp/patches/100-compile-fixes.patch | 23 ++++++++++++ 2 files changed, 76 insertions(+) create mode 100644 libs/spandsp/Makefile create mode 100644 libs/spandsp/patches/100-compile-fixes.patch diff --git a/libs/spandsp/Makefile b/libs/spandsp/Makefile new file mode 100644 index 0000000..4abae1f --- /dev/null +++ b/libs/spandsp/Makefile @@ -0,0 +1,53 @@ +# +# Copyright (C) 2014 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=spandsp +PKG_VERSION:=0.0.6 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.soft-switch.org/downloads/spandsp/ +PKG_MD5SUM:=897d839516a6d4edb20397d4757a7ca3 + +PKG_INSTALL:=1 +PKG_BUILD_PARALLEL:=1 +PKG_FIXUP:=autoreconf + +include $(INCLUDE_DIR)/package.mk + +define Package/libspandsp + SECTION:=libs + CATEGORY:=Libraries + TITLE:=spandsp library + DEPENDS:=+libtiff + MAINTAINER:=Jiri Slachta +endef + +TARGET_CFLAGS += $(FPIC) + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libspandsp* $(1)/usr/lib/ + + $(INSTALL_DIR) $(1)/usr/include + $(CP) $(PKG_INSTALL_DIR)/usr/include/spandsp.h $(1)/usr/include/ + + $(INSTALL_DIR) $(1)/usr/include/spandsp + $(CP) $(PKG_INSTALL_DIR)/usr/include/spandsp/*.h $(1)/usr/include/spandsp/ + + $(INSTALL_DIR) $(1)/usr/lib/pkgconfig + $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/spandsp.pc $(1)/usr/lib/pkgconfig/ +endef + +define Package/libspandsp/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libspandsp*so* $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,libspandsp)) diff --git a/libs/spandsp/patches/100-compile-fixes.patch b/libs/spandsp/patches/100-compile-fixes.patch new file mode 100644 index 0000000..59b85e6 --- /dev/null +++ b/libs/spandsp/patches/100-compile-fixes.patch @@ -0,0 +1,23 @@ +--- a/src/spandsp/fast_convert.h ++++ b/src/spandsp/fast_convert.h +@@ -195,7 +195,7 @@ extern "C" + { + return (long int) (x); + } +-#elif defined(__ppc__) || defined(__powerpc__) ++#elif defined(THISISNOTDEFINEDYADDAYADDA) + static __inline__ long int lfastrint(register double x) + { + int res[2]; +--- a/configure.ac ++++ b/configure.ac +@@ -152,9 +152,7 @@ AC_ARG_ENABLE(builtin_tiff, + + AC_FUNC_ERROR_AT_LINE + AC_FUNC_VPRINTF +-AC_FUNC_MALLOC + AC_FUNC_MEMCMP +-AC_FUNC_REALLOC + AC_FUNC_SELECT_ARGTYPES + + AX_C99_FUNC_LRINT -- 2.11.0