spandsp: import from oldpackages
authorJiri Slachta <slachta@cesnet.cz>
Fri, 18 Jul 2014 18:12:49 +0000 (20:12 +0200)
committerJiri Slachta <slachta@cesnet.cz>
Fri, 18 Jul 2014 18:12:49 +0000 (20:12 +0200)
Signed-off-by: Jiri Slachta <slachta@cesnet.cz>
libs/spandsp/Makefile [new file with mode: 0644]
libs/spandsp/patches/100-compile-fixes.patch [new file with mode: 0644]

diff --git a/libs/spandsp/Makefile b/libs/spandsp/Makefile
new file mode 100644 (file)
index 0000000..4abae1f
--- /dev/null
@@ -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 <slachta@cesnet.cz>
+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 (file)
index 0000000..59b85e6
--- /dev/null
@@ -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