- fix PLIST when jabber option is disabled
- fix compile problem on newer NetBSD systems that have newlocale support - fix a couple of cases where ctype functions called with plain char - last two items from joerg@
This commit is contained in:
parent
a6088c9eae
commit
80ce56f277
9 changed files with 189 additions and 24 deletions
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: Makefile,v 1.92 2013/06/06 12:54:09 wiz Exp $
|
||||
# $NetBSD: Makefile,v 1.93 2013/06/14 04:26:55 jnemeth Exp $
|
||||
#
|
||||
# NOTE: when updating this package, there are two places that sound
|
||||
# tarballs need to be checked
|
||||
|
@ -7,7 +7,7 @@ DISTNAME= asterisk-11.4.0
|
|||
DIST_SUBDIR= ${PKGNAME_NOREV}
|
||||
DISTFILES= ${DEFAULT_DISTFILES}
|
||||
EXTRACT_ONLY= ${DISTNAME}.tar.gz
|
||||
PKGREVISION= 4
|
||||
PKGREVISION= 5
|
||||
CATEGORIES= comms net audio
|
||||
MASTER_SITES= http://downloads.asterisk.org/pub/telephony/asterisk/ \
|
||||
http://downloads.asterisk.org/pub/telephony/asterisk/old-releases/ \
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
@comment $NetBSD: PLIST,v 1.3 2013/05/12 18:14:21 jnemeth Exp $
|
||||
@comment $NetBSD: PLIST,v 1.4 2013/06/14 04:26:55 jnemeth Exp $
|
||||
include/asterisk.h
|
||||
include/asterisk/_private.h
|
||||
include/asterisk/abstract_jb.h
|
||||
|
@ -233,7 +233,7 @@ lib/asterisk/modules/chan_bridge.so
|
|||
lib/asterisk/modules/chan_iax2.so
|
||||
lib/asterisk/modules/chan_local.so
|
||||
${PLIST.mgcp}lib/asterisk/modules/chan_mgcp.so
|
||||
lib/asterisk/modules/chan_motif.so
|
||||
${PLIST.jabber}lib/asterisk/modules/chan_motif.so
|
||||
lib/asterisk/modules/chan_multicast_rtp.so
|
||||
lib/asterisk/modules/chan_oss.so
|
||||
lib/asterisk/modules/chan_sip.so
|
||||
|
@ -354,7 +354,7 @@ lib/asterisk/modules/res_speech.so
|
|||
lib/asterisk/modules/res_stun_monitor.so
|
||||
${PLIST.kqueue}lib/asterisk/modules/res_timing_kqueue.so
|
||||
lib/asterisk/modules/res_timing_pthread.so
|
||||
lib/asterisk/modules/res_xmpp.so
|
||||
${PLIST.jabber}lib/asterisk/modules/res_xmpp.so
|
||||
lib/libasteriskssl.so
|
||||
lib/libasteriskssl.so.1
|
||||
lib/pkgconfig/asterisk.pc
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
$NetBSD: distinfo,v 1.56 2013/05/18 03:40:17 jnemeth Exp $
|
||||
$NetBSD: distinfo,v 1.57 2013/06/14 04:26:55 jnemeth Exp $
|
||||
|
||||
SHA1 (asterisk-11.4.0/asterisk-11.4.0.tar.gz) = 8ec0d10834c87a2bff58f23d961c67f16a26d01a
|
||||
RMD160 (asterisk-11.4.0/asterisk-11.4.0.tar.gz) = 00f44e59e3c4258b52594787b30da6a81c662aa8
|
||||
|
@ -13,14 +13,15 @@ SHA1 (patch-apps_app__queue.c) = 5bdb602a709060a1ffca688830930f1ca6bc5841
|
|||
SHA1 (patch-apps_app__sms.c) = d89b27a9df04d4da98d562241c07d25d182baefc
|
||||
SHA1 (patch-build__tools_mkpkgconfig) = 2bd3c0e24bc6d721cc234feb19b64a57106fcbe4
|
||||
SHA1 (patch-channels_chan__oss.c) = fccfa6fca010294ed2d3ab87fc31f436d67f49fa
|
||||
SHA1 (patch-configure) = 55be28610dd62a4c4c5b3e41e3ff932eb0aa3d10
|
||||
SHA1 (patch-configure.ac) = fa39e67fe998d0fe7dfb5fb3988f2be712b3b29f
|
||||
SHA1 (patch-configure) = 88619fe9072ff69ed8da0a1917ac3852d10998a4
|
||||
SHA1 (patch-configure.ac) = 2fdae524cfc95f152b86a32405b80f6edae6fa20
|
||||
SHA1 (patch-contrib_scripts_autosupport) = c6c1d917dd0544c4f54ae760f68cbcd1f35030f4
|
||||
SHA1 (patch-contrib_scripts_vmail.cgi) = 650b9bbf3e322d1ad351932cfe6f747baa8f35e4
|
||||
SHA1 (patch-include_asterisk_autoconfig.h.in) = 1d658b1997b3664cf34d01f1903fa38c8c986ee2
|
||||
SHA1 (patch-include_asterisk_autoconfig.h.in) = 09a8f8d5398612fdadba25f221b16c19429f81e2
|
||||
SHA1 (patch-include_asterisk_endian.h) = 41c1a9a9e02fe394bc9261f5559e931b1378ea28
|
||||
SHA1 (patch-include_asterisk_inline__api.h) = ff43d14e2608dd08d7d03799dfe9847f9f7f5666
|
||||
SHA1 (patch-include_asterisk_lock.h) = fc7b4934e5f53a09066802daa054300895cf7bcf
|
||||
SHA1 (patch-include_asterisk_lock.h) = 8147210ae994f95a1d730beb85a6488dc9653cc4
|
||||
SHA1 (patch-include_asterisk_strings.h) = fc5987a98429ca470f7e9bdcf170d49b0c1f3407
|
||||
SHA1 (patch-main_Makefile) = 5f9238a528d2b96777e17a4ac6d3e7876dfffb98
|
||||
SHA1 (patch-main_acl.c) = 1eac532a15127c25981d2db9462a8ccce2c58620
|
||||
SHA1 (patch-main_asterisk.c) = df7bcdaeb2fc90f9fdc1b16388fbb5cf7eba141c
|
||||
|
@ -28,6 +29,7 @@ SHA1 (patch-main_features.c) = 1c11207c60ce53c1101141e07ae04d0ddb838450
|
|||
SHA1 (patch-main_manager.c) = 4ca84daac55a39a04c49e018e8b036b92e9b7117
|
||||
SHA1 (patch-main_netsock.c) = 015796266b9806425180c9bb05a1907116ef086d
|
||||
SHA1 (patch-main_sched.c) = 73759369470b575e73ca78f9cff096ebb477c9b1
|
||||
SHA1 (patch-main_stdtime_localtime.c) = 1a5fe07f174fc81d1a59e08a8e5768e99ec46da1
|
||||
SHA1 (patch-main_utils.c) = e509c0ea81624b7404a535a3e8be563ce58039f6
|
||||
SHA1 (patch-pbx_pbx__dundi.c) = 2823c48d64d2b96abb5cf627045d17282629521b
|
||||
SHA1 (patch-res_pjproject_aconfigure) = 0095894c5daac2dec6a9ec745c0ecb8d46c0b73a
|
||||
|
|
|
@ -1,7 +1,16 @@
|
|||
$NetBSD: patch-configure,v 1.3 2013/05/18 03:40:17 jnemeth Exp $
|
||||
$NetBSD: patch-configure,v 1.4 2013/06/14 04:26:55 jnemeth Exp $
|
||||
|
||||
--- configure.orig 2013-02-27 12:22:30.000000000 +0000
|
||||
+++ configure
|
||||
@@ -14200,7 +14200,7 @@ fi
|
||||
done
|
||||
|
||||
|
||||
-for ac_func in asprintf atexit closefrom dup2 eaccess endpwent euidaccess ffsll ftruncate getcwd gethostbyname gethostname getloadavg gettimeofday glob htonll ioperm inet_ntoa isascii memchr memmove memset mkdir mkdtemp munmap ntohll newlocale ppoll putenv re_comp regcomp select setenv socket strcasecmp strcasestr strchr strcspn strdup strerror strlcat strlcpy strncasecmp strndup strnlen strrchr strsep strspn strstr strtod strtol strtold strtoq unsetenv utime vasprintf getpeereid sysctl swapctl
|
||||
+for ac_func in asprintf atexit closefrom dup2 eaccess endpwent euidaccess ffsll ftruncate getcwd gethostbyname gethostname getloadavg gettimeofday glob htonll ioperm inet_ntoa isascii memchr memmove memset mkdir mkdtemp munmap ntohll newlocale ppoll putenv re_comp regcomp select setenv socket strcasecmp strcasestr strchr strcspn strdup strerror strlcat strlcpy strncasecmp strndup strnlen strrchr strsep strspn strstr strptime_l strftime_l strtod strtol strtold strtoq unsetenv utime vasprintf getpeereid sysctl swapctl
|
||||
do :
|
||||
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
|
||||
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
|
||||
@@ -16195,16 +16195,16 @@ if $(${CC} -march=native -S -o /dev/null
|
||||
if test "${CONFIG_CFLAGS}" = ""; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
|
|
|
@ -1,8 +1,17 @@
|
|||
$NetBSD: patch-configure.ac,v 1.1 2012/12/11 08:22:49 jnemeth Exp $
|
||||
$NetBSD: patch-configure.ac,v 1.2 2013/06/14 04:26:55 jnemeth Exp $
|
||||
|
||||
--- configure.ac.orig 2012-08-09 19:11:01.000000000 +0000
|
||||
--- configure.ac.orig 2013-02-26 19:45:09.000000000 +0000
|
||||
+++ configure.ac
|
||||
@@ -1004,7 +1004,7 @@ if $(${CC} -march=native -S -o /dev/null
|
||||
@@ -584,7 +584,7 @@ AC_FUNC_STRNLEN
|
||||
AC_FUNC_STRTOD
|
||||
AC_FUNC_UTIME_NULL
|
||||
AC_FUNC_VPRINTF
|
||||
-AC_CHECK_FUNCS([asprintf atexit closefrom dup2 eaccess endpwent euidaccess ffsll ftruncate getcwd gethostbyname gethostname getloadavg gettimeofday glob htonll ioperm inet_ntoa isascii memchr memmove memset mkdir mkdtemp munmap ntohll newlocale ppoll putenv re_comp regcomp select setenv socket strcasecmp strcasestr strchr strcspn strdup strerror strlcat strlcpy strncasecmp strndup strnlen strrchr strsep strspn strstr strtod strtol strtold strtoq unsetenv utime vasprintf getpeereid sysctl swapctl])
|
||||
+AC_CHECK_FUNCS([asprintf atexit closefrom dup2 eaccess endpwent euidaccess ffsll ftruncate getcwd gethostbyname gethostname getloadavg gettimeofday glob htonll ioperm inet_ntoa isascii memchr memmove memset mkdir mkdtemp munmap ntohll newlocale ppoll putenv re_comp regcomp select setenv socket strcasecmp strcasestr strchr strcspn strdup strerror strlcat strlcpy strncasecmp strndup strnlen strrchr strsep strspn strstr strptime_l strftime_l strtod strtol strtold strtoq unsetenv utime vasprintf getpeereid sysctl swapctl])
|
||||
|
||||
# NOTE: we use AC_CHECK_LIB to get -lm into the arguments for later checks,
|
||||
# so that AC_CHECK_FUNCS can detect functions in that library.
|
||||
@@ -1036,7 +1036,7 @@ if $(${CC} -march=native -S -o /dev/null
|
||||
fi
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
|
@ -11,7 +20,7 @@ $NetBSD: patch-configure.ac,v 1.1 2012/12/11 08:22:49 jnemeth Exp $
|
|||
fi
|
||||
AC_SUBST(AST_NATIVE_ARCH)
|
||||
|
||||
@@ -1084,6 +1084,9 @@ AST_C_DEFINE_CHECK([IP_MTU_DISCOVER], [I
|
||||
@@ -1160,6 +1160,9 @@ AST_C_DEFINE_CHECK([IP_MTU_DISCOVER], [I
|
||||
AC_CHECK_HEADER([libkern/OSAtomic.h],
|
||||
[AC_DEFINE_UNQUOTED([HAVE_OSX_ATOMICS], 1, [Define to 1 if OSX atomic operations are supported.])])
|
||||
|
||||
|
|
|
@ -1,8 +1,21 @@
|
|||
$NetBSD: patch-include_asterisk_autoconfig.h.in,v 1.1 2012/12/11 08:22:49 jnemeth Exp $
|
||||
$NetBSD: patch-include_asterisk_autoconfig.h.in,v 1.2 2013/06/14 04:26:55 jnemeth Exp $
|
||||
|
||||
--- include/asterisk/autoconfig.h.in.orig 2012-08-09 19:11:01.000000000 +0000
|
||||
--- include/asterisk/autoconfig.h.in.orig 2013-02-27 12:22:30.000000000 +0000
|
||||
+++ include/asterisk/autoconfig.h.in
|
||||
@@ -899,6 +899,9 @@
|
||||
@@ -839,6 +839,12 @@
|
||||
/* Define to 1 if you have the `strstr' function. */
|
||||
#undef HAVE_STRSTR
|
||||
|
||||
+/* Define to 1 if you have the `strftime_l' function. */
|
||||
+#undef HAVE_STRFTIME_L
|
||||
+
|
||||
+/* Define to 1 if you have the `strptime_l' function. */
|
||||
+#undef HAVE_STRPTIME_L
|
||||
+
|
||||
/* Define to 1 if you have the `strtod' function. */
|
||||
#undef HAVE_STRTOD
|
||||
|
||||
@@ -914,6 +920,9 @@
|
||||
/* Define to 1 if you have the <syslog.h> header file. */
|
||||
#undef HAVE_SYSLOG_H
|
||||
|
||||
|
|
|
@ -1,8 +1,26 @@
|
|||
$NetBSD: patch-include_asterisk_lock.h,v 1.1 2012/12/11 08:22:49 jnemeth Exp $
|
||||
$NetBSD: patch-include_asterisk_lock.h,v 1.2 2013/06/14 04:26:55 jnemeth Exp $
|
||||
|
||||
--- include/asterisk/lock.h.orig 2011-01-31 07:52:48.000000000 +0000
|
||||
--- include/asterisk/lock.h.orig 2012-11-22 23:58:08.000000000 +0000
|
||||
+++ include/asterisk/lock.h
|
||||
@@ -569,7 +569,7 @@ static void __attribute__((destructor))
|
||||
@@ -561,6 +561,17 @@ static void __attribute__((destructor))
|
||||
#define AST_RWLOCK_DEFINE_STATIC(rwlock) __AST_RWLOCK_DEFINE(static, rwlock, AST_RWLOCK_INIT_VALUE, 1)
|
||||
#define AST_RWLOCK_DEFINE_STATIC_NOTRACKING(rwlock) __AST_RWLOCK_DEFINE(static, rwlock, AST_RWLOCK_INIT_VALUE_NOTRACKING, 0)
|
||||
|
||||
+#undef pthread_mutex_lock
|
||||
+#undef pthread_mutex_unlock
|
||||
+#undef pthread_mutex_trylock
|
||||
+#undef pthread_mutex_init
|
||||
+#undef pthread_mutex_destroy
|
||||
+#undef pthread_cond_init
|
||||
+#undef pthread_cond_destroy
|
||||
+#undef pthread_cond_signal
|
||||
+#undef pthread_cond_broadcast
|
||||
+#undef pthread_cond_wait
|
||||
+#undef pthread_cond_timedwait
|
||||
#ifndef __CYGWIN__ /* temporary disabled for cygwin */
|
||||
#define pthread_mutex_t use_ast_mutex_t_instead_of_pthread_mutex_t
|
||||
#define pthread_cond_t use_ast_cond_t_instead_of_pthread_cond_t
|
||||
@@ -581,7 +592,7 @@ static void __attribute__((destructor))
|
||||
|
||||
#define gethostbyname __gethostbyname__is__not__reentrant__use__ast_gethostbyname__instead__
|
||||
|
||||
|
@ -11,7 +29,7 @@ $NetBSD: patch-include_asterisk_lock.h,v 1.1 2012/12/11 08:22:49 jnemeth Exp $
|
|||
#define pthread_create __use_ast_pthread_create_instead__
|
||||
#endif
|
||||
|
||||
@@ -591,6 +591,10 @@ int ast_atomic_fetchadd_int_slow(volatil
|
||||
@@ -603,6 +614,10 @@ int ast_atomic_fetchadd_int_slow(volatil
|
||||
#include "libkern/OSAtomic.h"
|
||||
#endif
|
||||
|
||||
|
@ -22,7 +40,7 @@ $NetBSD: patch-include_asterisk_lock.h,v 1.1 2012/12/11 08:22:49 jnemeth Exp $
|
|||
/*! \brief Atomically add v to *p and return * the previous value of *p.
|
||||
* This can be used to handle reference counts, and the return value
|
||||
* can be used to generate unique identifiers.
|
||||
@@ -610,6 +614,12 @@ AST_INLINE_API(int ast_atomic_fetchadd_i
|
||||
@@ -622,6 +637,12 @@ AST_INLINE_API(int ast_atomic_fetchadd_i
|
||||
AST_INLINE_API(int ast_atomic_fetchadd_int(volatile int *p, int v),
|
||||
{
|
||||
return OSAtomicAdd64(v, (int64_t *) p) - v;
|
||||
|
@ -35,7 +53,7 @@ $NetBSD: patch-include_asterisk_lock.h,v 1.1 2012/12/11 08:22:49 jnemeth Exp $
|
|||
#elif defined (__i386__) || defined(__x86_64__)
|
||||
#ifdef sun
|
||||
AST_INLINE_API(int ast_atomic_fetchadd_int(volatile int *p, int v),
|
||||
@@ -656,6 +666,12 @@ AST_INLINE_API(int ast_atomic_dec_and_te
|
||||
@@ -668,6 +689,12 @@ AST_INLINE_API(int ast_atomic_dec_and_te
|
||||
AST_INLINE_API(int ast_atomic_dec_and_test(volatile int *p),
|
||||
{
|
||||
return OSAtomicAdd64( -1, (int64_t *) p) == 0;
|
||||
|
|
22
comms/asterisk/patches/patch-include_asterisk_strings.h
Normal file
22
comms/asterisk/patches/patch-include_asterisk_strings.h
Normal file
|
@ -0,0 +1,22 @@
|
|||
$NetBSD: patch-include_asterisk_strings.h,v 1.1 2013/06/14 04:26:55 jnemeth Exp $
|
||||
|
||||
--- include/asterisk/strings.h.orig 2013-01-09 20:07:07.000000000 +0000
|
||||
+++ include/asterisk/strings.h
|
||||
@@ -947,7 +947,7 @@ char *ast_tech_to_upper(char *dev_str),
|
||||
}
|
||||
|
||||
for (pos = dev_str; *pos && *pos != '/'; pos++) {
|
||||
- *pos = toupper(*pos);
|
||||
+ *pos = toupper((unsigned char)*pos);
|
||||
}
|
||||
return dev_str;
|
||||
}
|
||||
@@ -1006,7 +1006,7 @@ static force_inline int attribute_pure a
|
||||
int hash = 5381;
|
||||
|
||||
while (*str) {
|
||||
- hash = hash * 33 ^ tolower(*str++);
|
||||
+ hash = hash * 33 ^ tolower((unsigned char)*str++);
|
||||
}
|
||||
|
||||
return abs(hash);
|
92
comms/asterisk/patches/patch-main_stdtime_localtime.c
Normal file
92
comms/asterisk/patches/patch-main_stdtime_localtime.c
Normal file
|
@ -0,0 +1,92 @@
|
|||
$NetBSD: patch-main_stdtime_localtime.c,v 1.1 2013/06/14 04:26:55 jnemeth Exp $
|
||||
|
||||
--- main/stdtime/localtime.c.orig 2012-12-03 20:43:03.000000000 +0000
|
||||
+++ main/stdtime/localtime.c
|
||||
@@ -2232,6 +2232,23 @@ static struct locale_entry *find_by_name
|
||||
return NULL;
|
||||
}
|
||||
|
||||
+#if HAVE_STRFTIME_L || HAVE_STRPTIME_L
|
||||
+static locale_t ast_getlocale(const char *locale)
|
||||
+{
|
||||
+ struct locale_entry *cur;
|
||||
+
|
||||
+ AST_LIST_LOCK(&localelist);
|
||||
+ if ((cur = find_by_name(locale)) == NULL) {
|
||||
+ cur->locale = newlocale(LC_ALL_MASK, locale, NULL);
|
||||
+ strcpy(cur->name, locale); /* SAFE */
|
||||
+ AST_LIST_INSERT_TAIL(&localelist, cur, list);
|
||||
+ }
|
||||
+ AST_LIST_UNLOCK(&localelist);
|
||||
+ return cur->locale;
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
+#if !HAVE_STRFTIME_L || !HAVE_STRPTIME_L
|
||||
static const char *store_by_locale(locale_t prevlocale)
|
||||
{
|
||||
struct locale_entry *cur;
|
||||
@@ -2289,6 +2306,7 @@ const char *ast_setlocale(const char *lo
|
||||
AST_LIST_UNLOCK(&localelist);
|
||||
return store_by_locale(prevlocale);
|
||||
}
|
||||
+#endif
|
||||
#else
|
||||
const char *ast_setlocale(const char *unused)
|
||||
{
|
||||
@@ -2302,7 +2320,9 @@ int ast_strftime_locale(char *buf, size_
|
||||
char *format = ast_calloc(1, fmtlen), *fptr = format, *newfmt;
|
||||
int decimals = -1, i, res;
|
||||
long fraction;
|
||||
+#if !HAVE_STRFTIME_L
|
||||
const char *prevlocale;
|
||||
+#endif
|
||||
|
||||
if (!format) {
|
||||
return -1;
|
||||
@@ -2356,6 +2376,14 @@ defcase: *fptr++ = *tmp;
|
||||
}
|
||||
*fptr = '\0';
|
||||
#undef strftime
|
||||
+#if HAVE_STRFTIME_L
|
||||
+ if (locale) {
|
||||
+ locale_t l = ast_getlocale(locale);
|
||||
+ res = (int)strftime_l(buf, len, format, (struct tm *)tm, l);
|
||||
+ } else {
|
||||
+ res = (int)strftime(buf, len, format, (struct tm *)tm);
|
||||
+ }
|
||||
+#else
|
||||
if (locale) {
|
||||
prevlocale = ast_setlocale(locale);
|
||||
}
|
||||
@@ -2363,6 +2391,7 @@ defcase: *fptr++ = *tmp;
|
||||
if (locale) {
|
||||
ast_setlocale(prevlocale);
|
||||
}
|
||||
+#endif
|
||||
ast_free(format);
|
||||
return res;
|
||||
}
|
||||
@@ -2376,11 +2405,22 @@ char *ast_strptime_locale(const char *s,
|
||||
{
|
||||
struct tm tm2 = { 0, };
|
||||
char *res;
|
||||
+#if !HAVE_STRPTIME_L
|
||||
const char *prevlocale;
|
||||
+#endif
|
||||
|
||||
+#if HAVE_STRPTIME_L
|
||||
+ if (locale) {
|
||||
+ locale_t l = ast_getlocale(locale);
|
||||
+ res = strptime_l(s, format, &tm2, l);
|
||||
+ } else {
|
||||
+ res = strptime(s, format, &tm2);
|
||||
+ }
|
||||
+#else
|
||||
prevlocale = ast_setlocale(locale);
|
||||
res = strptime(s, format, &tm2);
|
||||
ast_setlocale(prevlocale);
|
||||
+#endif
|
||||
/* ast_time and tm are not the same size - tm is a subset of
|
||||
* ast_time. Hence, the size of tm needs to be used for the
|
||||
* memcpy
|
Loading…
Reference in a new issue