diff options
author | jnemeth <jnemeth> | 2013-06-15 20:51:10 +0000 |
---|---|---|
committer | jnemeth <jnemeth> | 2013-06-15 20:51:10 +0000 |
commit | d4ce4721bac48ad9a6a480d999b2112fbaa8c734 (patch) | |
tree | 9464401a7d2f75b86ebe0315b814477e0f09feee /comms | |
parent | f606924ff9db42ffc9612e16239633b9ad34024f (diff) | |
download | pkgsrc-d4ce4721bac48ad9a6a480d999b2112fbaa8c734.tar.gz |
- fix compile issue when newlocale support is detected, from joerg@
Diffstat (limited to 'comms')
-rw-r--r-- | comms/asterisk18/Makefile | 4 | ||||
-rw-r--r-- | comms/asterisk18/distinfo | 9 | ||||
-rw-r--r-- | comms/asterisk18/patches/patch-ap | 17 | ||||
-rw-r--r-- | comms/asterisk18/patches/patch-aq | 19 | ||||
-rw-r--r-- | comms/asterisk18/patches/patch-ar | 19 | ||||
-rw-r--r-- | comms/asterisk18/patches/patch-bp | 92 |
6 files changed, 142 insertions, 18 deletions
diff --git a/comms/asterisk18/Makefile b/comms/asterisk18/Makefile index bd732c4de19..f4fb5a6c1ab 100644 --- a/comms/asterisk18/Makefile +++ b/comms/asterisk18/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.68 2013/06/06 12:54:09 wiz Exp $ +# $NetBSD: Makefile,v 1.69 2013/06/15 20:51:10 jnemeth Exp $ # # NOTE: when updating this package, there are two places that sound # tarballs need to be checked @@ -7,7 +7,7 @@ DISTNAME= asterisk-1.8.22.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/ \ diff --git a/comms/asterisk18/distinfo b/comms/asterisk18/distinfo index 515d14d0575..72a03adef6c 100644 --- a/comms/asterisk18/distinfo +++ b/comms/asterisk18/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.46 2013/05/18 01:00:43 jnemeth Exp $ +$NetBSD: distinfo,v 1.47 2013/06/15 20:51:10 jnemeth Exp $ SHA1 (asterisk-1.8.22.0/asterisk-1.8.22.0.tar.gz) = fca7c971cb0d3621ee64069c4f83aebf10416327 RMD160 (asterisk-1.8.22.0/asterisk-1.8.22.0.tar.gz) = c232e45463f1915e204e7762a19dceacdd96fb2f @@ -14,9 +14,9 @@ SHA1 (patch-al) = b2a1134786d7c3b118ee8c47892f91dd2a4c783a SHA1 (patch-am) = 5f9cbf47ec1cb66758492a5ed1bf843006eae9b7 SHA1 (patch-an) = 93a5df66fd6459fb76e9191dc3bf37b9ee5483b5 SHA1 (patch-ao) = aa95464a8bd4a417f313541b465142d2e4c3ee47 -SHA1 (patch-ap) = 94a986e6e24c04ee8e95ea6809f826cb99c90c8a -SHA1 (patch-aq) = 8e33599ff6d6b1192ab69533b65d6831ddf4ba1c -SHA1 (patch-ar) = da8e614e68e476ce32c66fed5ee9dcb8c5f9a060 +SHA1 (patch-ap) = bfb7b15224571f86a78fa7787f29002eb0c5d352 +SHA1 (patch-aq) = ac3e937c5ec1f2b8edd7343d47247274e0dae8c7 +SHA1 (patch-ar) = 04c76c54d3962a4eae5bc69bf946fc8ea2c3427f SHA1 (patch-as) = b2e1aadf49f20506243ab40796f15aab12d95bad SHA1 (patch-at) = df318d7b492121ff6f766b0e6ea73415293e96f0 SHA1 (patch-au) = 773398e719dca34640dcdc190857872da1ad7b4f @@ -38,3 +38,4 @@ SHA1 (patch-bk) = 93679dfb04d26c99ac9c2822e0d74d869d16369f SHA1 (patch-bm) = 284b34e20091b3427cd67b835fc7aa62c9d92a6c SHA1 (patch-bn) = 51d14bde5591bd4a68c8074838196e05ac86f2f2 SHA1 (patch-bo) = ff43d14e2608dd08d7d03799dfe9847f9f7f5666 +SHA1 (patch-bp) = 44c903536522e61790588680383b0ab2879edd65 diff --git a/comms/asterisk18/patches/patch-ap b/comms/asterisk18/patches/patch-ap index 9b20156509b..09123f2d4b1 100644 --- a/comms/asterisk18/patches/patch-ap +++ b/comms/asterisk18/patches/patch-ap @@ -1,11 +1,20 @@ -$NetBSD: patch-ap,v 1.3 2012/06/05 00:15:35 jnemeth Exp $ +$NetBSD: patch-ap,v 1.4 2013/06/15 20:51:11 jnemeth Exp $ # sys/atomic.h reported upstream as # https://issues.asterisk.org/view.php?id=18705 ---- configure.ac.orig 2012-04-12 14:26:06.000000000 +0000 +--- configure.ac.orig 2013-02-26 19:37:33.000000000 +0000 +++ configure.ac -@@ -992,7 +992,7 @@ if $(${CC} -march=native -S -o /dev/null +@@ -562,7 +562,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. +@@ -993,7 +993,7 @@ if $(${CC} -march=native -S -o /dev/null fi else AC_MSG_RESULT(no) @@ -14,7 +23,7 @@ $NetBSD: patch-ap,v 1.3 2012/06/05 00:15:35 jnemeth Exp $ fi AC_SUBST(AST_NATIVE_ARCH) -@@ -1072,6 +1072,9 @@ AST_C_DEFINE_CHECK([IP_MTU_DISCOVER], [I +@@ -1073,6 +1073,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.])]) diff --git a/comms/asterisk18/patches/patch-aq b/comms/asterisk18/patches/patch-aq index 306225e5ec6..4e2445f888d 100644 --- a/comms/asterisk18/patches/patch-aq +++ b/comms/asterisk18/patches/patch-aq @@ -1,8 +1,17 @@ -$NetBSD: patch-aq,v 1.14 2013/05/18 01:00:43 jnemeth Exp $ +$NetBSD: patch-aq,v 1.15 2013/06/15 20:51:11 jnemeth Exp $ ---- configure.orig 2013-01-30 17:44:11.000000000 +0000 +--- configure.orig 2013-02-27 14:11:39.000000000 +0000 +++ configure -@@ -16688,7 +16688,7 @@ $as_echo "user CFLAGS present" >&6; } +@@ -14751,7 +14751,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" +@@ -16717,7 +16717,7 @@ $as_echo "user CFLAGS present" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } @@ -11,7 +20,7 @@ $NetBSD: patch-aq,v 1.14 2013/05/18 01:00:43 jnemeth Exp $ fi -@@ -17148,6 +17148,146 @@ fi +@@ -17177,6 +17177,146 @@ fi @@ -158,7 +167,7 @@ $NetBSD: patch-aq,v 1.14 2013/05/18 01:00:43 jnemeth Exp $ # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. -@@ -18262,6 +18402,8 @@ $as_echo_n "checking if \"struct ifaddrs +@@ -18291,6 +18431,8 @@ $as_echo_n "checking if \"struct ifaddrs cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ diff --git a/comms/asterisk18/patches/patch-ar b/comms/asterisk18/patches/patch-ar index de5a2e7dfae..173e61d08d0 100644 --- a/comms/asterisk18/patches/patch-ar +++ b/comms/asterisk18/patches/patch-ar @@ -1,10 +1,23 @@ -$NetBSD: patch-ar,v 1.2 2011/01/29 22:50:32 jnemeth Exp $ +$NetBSD: patch-ar,v 1.3 2013/06/15 20:51:11 jnemeth Exp $ # Reported upstream as https://issues.asterisk.org/view.php?id=18705 ---- include/asterisk/autoconfig.h.in.orig 2010-11-09 20:33:05.000000000 +0000 +--- include/asterisk/autoconfig.h.in.orig 2013-02-27 14:11:39.000000000 +0000 +++ include/asterisk/autoconfig.h.in -@@ -864,6 +864,9 @@ +@@ -816,6 +816,12 @@ + /* Define to 1 if you have the `strstr' function. */ + #undef HAVE_STRSTR + ++/* Define to 1 if you have the `strptime_l' function. */ ++#undef HAVE_STRPTIME_L ++ ++/* Define to 1 if you have the `strftime_l' function. */ ++#undef HAVE_STRFTIME_L ++ + /* Define to 1 if you have the `strtod' function. */ + #undef HAVE_STRTOD + +@@ -891,6 +897,9 @@ /* Define to 1 if you have the <syslog.h> header file. */ #undef HAVE_SYSLOG_H diff --git a/comms/asterisk18/patches/patch-bp b/comms/asterisk18/patches/patch-bp new file mode 100644 index 00000000000..69ebc7f920c --- /dev/null +++ b/comms/asterisk18/patches/patch-bp @@ -0,0 +1,92 @@ +$NetBSD: patch-bp,v 1.1 2013/06/15 20:51:11 jnemeth Exp $ + +--- main/stdtime/localtime.c.orig 2012-12-03 20:26:37.000000000 +0000 ++++ main/stdtime/localtime.c +@@ -2213,6 +2213,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; +@@ -2270,6 +2287,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) + { +@@ -2283,7 +2301,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; +@@ -2337,6 +2357,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); + } +@@ -2344,6 +2372,7 @@ defcase: *fptr++ = *tmp; + if (locale) { + ast_setlocale(prevlocale); + } ++#endif + ast_free(format); + return res; + } +@@ -2357,11 +2386,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 |