aboutsummaryrefslogtreecommitdiffstats
path: root/testing/ptlib
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2014-10-24 12:32:18 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2014-10-24 12:32:37 +0000
commit33bee7304af5399cfb2b9c396918c54151df53d1 (patch)
treea75a9b973e57dc86a92f4638eb755b507f756fb4 /testing/ptlib
parent24721fe3c7f2979b4031e78bdc15262b4d586593 (diff)
downloadaports-33bee7304af5399cfb2b9c396918c54151df53d1.tar.bz2
aports-33bee7304af5399cfb2b9c396918c54151df53d1.tar.xz
testing/ptlib: fix build with musl
Diffstat (limited to 'testing/ptlib')
-rw-r--r--testing/ptlib/APKBUILD15
-rw-r--r--testing/ptlib/musl-fixes.patch70
2 files changed, 80 insertions, 5 deletions
diff --git a/testing/ptlib/APKBUILD b/testing/ptlib/APKBUILD
index e40fec2796..6610f857df 100644
--- a/testing/ptlib/APKBUILD
+++ b/testing/ptlib/APKBUILD
@@ -12,9 +12,11 @@ depends_dev="expat-dev openssl-dev sdl-dev alsa-lib-dev"
makedepends="$depends_dev boost-dev v4l-utils-dev flex bison"
install=""
subpackages="$pkgname-dev"
-source="http://download.gnome.org/sources/ptlib/2.10/ptlib-$pkgver.tar.xz
+source="http://download.gnome.org/sources/ptlib/${pkgver%.*}/ptlib-$pkgver.tar.xz
ptlib-fixcamcrash.patch
- ptlib-2.10.10-bison_fixes-1.patch"
+ ptlib-2.10.10-bison_fixes-1.patch
+ musl-fixes.patch
+ "
_builddir="$srcdir"/ptlib-$pkgver
prepare() {
@@ -61,10 +63,13 @@ dev() {
md5sums="1fd609e25f101393bb7e42fbf874c174 ptlib-2.10.10.tar.xz
5a727140c59bcd71c2f41a70821e8917 ptlib-fixcamcrash.patch
-cecab82649e3fe163335f9c8883dd58b ptlib-2.10.10-bison_fixes-1.patch"
+cecab82649e3fe163335f9c8883dd58b ptlib-2.10.10-bison_fixes-1.patch
+c60887fd165ee5b0e1a70a1b3bf92c64 musl-fixes.patch"
sha256sums="7fcaabe194cbd3bc0b370b951dffd19cfe7ea0298bfff6aecee948e97f3207e4 ptlib-2.10.10.tar.xz
9d24ce87ae71b738b1744955bd0516a3b849b2fbb573e266b77046b41803f1a1 ptlib-fixcamcrash.patch
-11027b21f568b2ab84f9c25775e5a697a15304b39aaab6380922ed609aac63b9 ptlib-2.10.10-bison_fixes-1.patch"
+11027b21f568b2ab84f9c25775e5a697a15304b39aaab6380922ed609aac63b9 ptlib-2.10.10-bison_fixes-1.patch
+3a21064b147f72ec2edcbd1880a0a4e1f3a52416b4226b741f5903272f4e9425 musl-fixes.patch"
sha512sums="9b1490fa7c5c29b9295d560313b457c61091d0ddc8241f40e080acbfbb80bac685d3b2ad81d3c13628ad2816bebc142ac80de536c4cfb8cd48bfb514c0d8a820 ptlib-2.10.10.tar.xz
d0809d3b1b90cba41543e69e574c98a011d5e88181d98c42ea005ecf0a1f39c86f76be9360e11c4227c6f5157e49532468c6bcce633e28225d052a124204c35c ptlib-fixcamcrash.patch
-5c1247d78651df88bc3f3a5064beec35f03d3371ef85f893c5557545c284dbe1a325eea4b5a8ea8b698cc97aac2420431e7896250b027bab326e4547458bc119 ptlib-2.10.10-bison_fixes-1.patch"
+5c1247d78651df88bc3f3a5064beec35f03d3371ef85f893c5557545c284dbe1a325eea4b5a8ea8b698cc97aac2420431e7896250b027bab326e4547458bc119 ptlib-2.10.10-bison_fixes-1.patch
+365eff5b0ff38c44739365ec22afd7f1f1c7d8f6101d50ef71257eb8cf3429f50f87a084862deea6dc105cb7364ab72cf5c0af08bc9eab1d4e4decaf0452414f musl-fixes.patch"
diff --git a/testing/ptlib/musl-fixes.patch b/testing/ptlib/musl-fixes.patch
new file mode 100644
index 0000000000..a0819c89d5
--- /dev/null
+++ b/testing/ptlib/musl-fixes.patch
@@ -0,0 +1,70 @@
+--- ./include/ptlib/unix/ptlib/pmachdep.h.orig
++++ ./include/ptlib/unix/ptlib/pmachdep.h
+@@ -51,7 +51,7 @@
+
+ #define HAS_IFREQ
+
+-#if __GNU_LIBRARY__ < 6
++#if defined(__GNU_LIBRARY__) && __GNU_LIBRARY__ < 6
+ #define P_LINUX_LIB_OLD
+ typedef int socklen_t;
+ #endif
+--- ./src/ptlib/unix/pipechan.cxx.orig
++++ ./src/ptlib/unix/pipechan.cxx
+@@ -44,7 +44,7 @@
+ #include <signal.h>
+
+ #if defined(P_LINUX) || defined(P_SOLARIS)
+-#include <termio.h>
++#include <termios.h>
+ #endif
+
+ #include "../common/pipechan.cxx"
+--- ./src/ptlib/unix/channel.cxx.orig
++++ ./src/ptlib/unix/channel.cxx
+@@ -36,6 +36,7 @@
+
+ #include <ptlib.h>
+ #include <sys/ioctl.h>
++#include <sys/uio.h>
+
+
+ #include "../common/pchannel.cxx"
+--- ./src/ptlib/unix/osutil.cxx.orig
++++ ./src/ptlib/unix/osutil.cxx
+@@ -275,9 +275,9 @@
+ PInt64 PString::AsInt64(unsigned base) const
+ {
+ char * dummy;
+-#if defined(P_SOLARIS) || defined(__BEOS__) || defined (P_AIX) || defined(P_IRIX) || defined (P_QNX)
++#if (LONG_BIT == 32) || defined(P_SOLARIS) || defined(__BEOS__) || defined (P_AIX) || defined(P_IRIX) || defined (P_QNX)
+ return strtoll(theArray, &dummy, base);
+-#elif defined(P_VXWORKS) || defined(P_RTEMS)
++#elif (LONG_BIT == 64) || defined(P_VXWORKS) || defined(P_RTEMS)
+ return strtol(theArray, &dummy, base);
+ #else
+ return strtoq(theArray, &dummy, base);
+@@ -287,9 +287,9 @@
+ PUInt64 PString::AsUnsigned64(unsigned base) const
+ {
+ char * dummy;
+-#if defined(P_SOLARIS) || defined(__BEOS__) || defined (P_AIX) || defined (P_IRIX) || defined (P_QNX)
++#if (LONG_BIT == 32 ) || defined(P_SOLARIS) || defined(__BEOS__) || defined (P_AIX) || defined (P_IRIX) || defined (P_QNX)
+ return strtoull(theArray, &dummy, base);
+-#elif defined(P_VXWORKS) || defined(P_RTEMS)
++#elif (LONG_BIT == 64) || defined(P_VXWORKS) || defined(P_RTEMS)
+ return strtoul(theArray, &dummy, base);
+ #else
+ return strtouq(theArray, &dummy, base);
+--- ./src/ptlib/common/sockets.cxx.orig
++++ ./src/ptlib/common/sockets.cxx
+@@ -77,6 +77,9 @@
+ #endif
+ #endif
+
++#ifndef NETDB_SUCCESS
++#define NETDB_SUCCESS 0
++#endif
+
+ ///////////////////////////////////////////////////////////////////////////////
+ // PIPSocket::Address