1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-26 05:02:18 +00:00

- Don't force gcc, make this work with clang, too [1]

- Don't call gmake directly [1]
- Make the -p (Run as pseudo-realtime thread) work on FreeBSD [1]
- Use @dirrmtry for directories that can contain files after deinstall
- Fix build of guid_uuid.c [2]

PR:		ports/180233 [2]
Submitted by:	tijl [1]
		Kurt Jaeger <fbsd-ports@opsec.eu> [2]
This commit is contained in:
Florian Smeets 2013-07-04 22:49:22 +00:00
parent b003ca6d34
commit 1e02e1f289
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=322296
7 changed files with 52 additions and 8 deletions

View File

@ -2,7 +2,7 @@
PORTNAME= asterisk
PORTVERSION= 11.4.0
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= net
MASTER_SITES= http://downloads.asterisk.org/pub/telephony/asterisk/ \
http://downloads.asterisk.org/pub/telephony/asterisk/old-releases/
@ -23,7 +23,7 @@ GNU_CONFIGURE= yes
CONFIGURE_ARGS= --with-gsm=${LOCALBASE}
LDFLAGS+= -L${LOCALBASE}/lib
CPPFLAGS+= -I${LOCALBASE}/include -I${LOCALBASE}/include/openh323
USE_GCC= any
USE_CSTD= gnu89
USE_GMAKE= yes
USE_GNOME= libxml2
USES= bison
@ -270,7 +270,7 @@ post-patch:
${REINPLACE_CMD} -e 's|/var/lib|${PREFIX}/share|g' ${WRKSRC}/configs/musiconhold.conf.sample
post-configure:
@cd ${WRKSRC} && gmake menuselect.makeopts
@cd ${WRKSRC} && ${GMAKE} menuselect.makeopts
@cd ${WRKSRC} && ./menuselect/menuselect --disable res_timing_kqueue menuselect.makeopts
.if ${PORT_OPTIONS:MMYSQL}
@cd ${WRKSRC} && ./menuselect/menuselect --enable res_config_mysql menuselect.makeopts

View File

@ -0,0 +1,10 @@
--- include/asterisk/astobj2.h.orig 2013-07-02 12:30:02.000000000 +0200
+++ include/asterisk/astobj2.h 2013-07-02 12:31:39.000000000 +0200
@@ -1472,5 +1472,7 @@
#else
#define ao2_cleanup(obj) __ao2_cleanup(obj)
#endif
+static inline void ao2_cleanup_cleanup(void *obj)
+ { ao2_cleanup(*(void **)obj); }
void ao2_iterator_cleanup(struct ao2_iterator *iter);
#endif /* _ASTERISK_ASTOBJ2_H */

View File

@ -0,0 +1,11 @@
--- include/asterisk/config.h.orig 2013-07-02 12:26:35.000000000 +0200
+++ include/asterisk/config.h 2013-07-02 12:29:07.000000000 +0200
@@ -481,6 +481,8 @@
* This function frees a list of variables.
*/
void ast_variables_destroy(struct ast_variable *var);
+static inline void ast_variables_destroy_cleanup(struct ast_variable **var)
+ { ast_variables_destroy(*var); }
/*!
* \brief Register config engine

View File

@ -0,0 +1,13 @@
--- include/asterisk/utils.h.orig 2013-07-02 11:52:13.000000000 +0200
+++ include/asterisk/utils.h 2013-07-02 12:32:18.000000000 +0200
@@ -927,9 +927,6 @@
* \encode
*/
#define RAII_VAR(vartype, varname, initval, dtor) \
- /* Prototype needed due to http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36774 */ \
- auto void _dtor_ ## varname (vartype * v); \
- void _dtor_ ## varname (vartype * v) { dtor(*v); } \
- vartype varname __attribute__((cleanup(_dtor_ ## varname))) = (initval)
+ vartype varname __attribute__((cleanup(dtor ## _cleanup))) = (initval)
#endif /* _ASTERISK_UTILS_H */

View File

@ -6,7 +6,7 @@
-#ifdef __linux__
- /* On Linux, pthread_attr_init() defaults to PTHREAD_EXPLICIT_SCHED,
+#ifdef __linux__ || defined(__FreeBSD__)
+#if defined(__linux__) || defined(__FreeBSD__)
+ /* On Linux and FreeBSD, pthread_attr_init() defaults to PTHREAD_EXPLICIT_SCHED,
which is kind of useless. Change this here to
PTHREAD_INHERIT_SCHED; that way the -p option to set realtime

View File

@ -0,0 +1,10 @@
--- res/pjproject/pjlib/src/pj/guid_uuid.c-orig 2013-07-03 14:46:46.000000000 +0200
+++ res/pjproject/pjlib/src/pj/guid_uuid.c 2013-07-03 14:47:11.000000000 +0200
@@ -23,7 +23,7 @@
#include <pj/os.h>
#include <pj/string.h>
-#include <uuid/uuid.h>
+#include <uuid.h>
PJ_DEF_DATA(const unsigned) PJ_GUID_STRING_LENGTH=36;

View File

@ -1280,8 +1280,8 @@ spool/asterisk/voicemail/default/1234/en/unavail.gsm
@dirrm spool/asterisk/voicemail
@dirrm spool/asterisk/tmp
@dirrm spool/asterisk
@dirrm log/asterisk/cdr-csv
@dirrm log/asterisk/cdr-custom
@dirrm log/asterisk/cel-custom
@dirrm log/asterisk
@dirrmtry log/asterisk/cdr-csv
@dirrmtry log/asterisk/cdr-custom
@dirrmtry log/asterisk/cel-custom
@dirrmtry log/asterisk
@dirrmtry db/asterisk