[Pkg-voip-commits] [asterisk] 01/02: Fix trivial build issues

tzafrir at debian.org tzafrir at debian.org
Tue Oct 28 06:33:21 UTC 2014


This is an automated email from the git hooks/post-receive script.

tzafrir pushed a commit to branch master
in repository asterisk.

commit 908c7664d46608ec7ad022a82a5c0ee98eda8f81
Author: Tzafrir Cohen <tzafrir at debian.org>
Date:   Mon Oct 27 23:11:22 2014 +0200

    Fix trivial build issues
---
 debian/patches/Makefile_kfreebsd | 19 +++++++++++++++++++
 debian/patches/bigendian.patch   | 15 +++++++++++++++
 debian/patches/series            |  2 ++
 3 files changed, 36 insertions(+)

diff --git a/debian/patches/Makefile_kfreebsd b/debian/patches/Makefile_kfreebsd
new file mode 100644
index 0000000..d103f12
--- /dev/null
+++ b/debian/patches/Makefile_kfreebsd
@@ -0,0 +1,19 @@
+From: Tzafrir Cohen <tzafrir at debian.org>
+Subject: install service and init.d files on GNU/kFreeBSD
+
+The only effect this patch has is to install the systemd service on
+kFreeBSD. Not very useful, but keeps from breaking our configuration.
+
+And yes, the HURD is missing from here as well.
+
+--- a/Makefile
++++ b/Makefile
+@@ -790,7 +790,7 @@ install-logrotate:
+ 	rm -f contrib/scripts/asterisk.logrotate.tmp
+ 
+ config:
+-	@if [ "${OSARCH}" = "linux-gnu" ]; then \
++	@if [ "${OSARCH}" = "linux-gnu" -o "${OSARCH}" = "kfreebsd-gnu" ]; then \
+ 		$(INSTALL) -d $(DESTDIR)/lib/systemd/system; \
+ 		./build_tools/install_subst -d contrib/asterisk.service $(DESTDIR)/lib/systemd/system/asterisk.service; \
+ 		if [ -f /etc/redhat-release -o -f /etc/fedora-release ]; then \
diff --git a/debian/patches/bigendian.patch b/debian/patches/bigendian.patch
new file mode 100644
index 0000000..f39b754
--- /dev/null
+++ b/debian/patches/bigendian.patch
@@ -0,0 +1,15 @@
+From: Tzafrir Cohen <tzafrir at debian.org>
+Subject: Fix building chan_phone on big endian systems
+Bug: https://issues.asterisk.org/jira/browse/ASTERISK-24458
+
+--- a/channels/chan_phone.c
++++ b/channels/chan_phone.c
+@@ -827,7 +827,7 @@ static int phone_write(struct ast_channe
+ 		} else {
+ 			int swap = 0;
+ #if __BYTE_ORDER == __BIG_ENDIAN
+-			if (frame->subclass.format.id == AST_FORMAT_SLINEAR)
++			if (ast_format_cmp(frame->subclass.format, ast_format_slin) == AST_FORMAT_CMP_EQUAL)
+ 				swap = 1; /* Swap big-endian samples to little-endian as we copy */
+ #endif
+ 			res = phone_write_buf(p, pos, expected, maxfr, swap);
diff --git a/debian/patches/series b/debian/patches/series
index dec8d9d..7859572 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -22,3 +22,5 @@ reenable
 smsq_enable.patch
 aelparse_enable.patch
 systemd.patch
+Makefile_kfreebsd
+bigendian.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-voip/asterisk.git



More information about the Pkg-voip-commits mailing list