Bug 180233 - [patch update] net/asterisk11 build fail because of guid_uuid.c
Summary: [patch update] net/asterisk11 build fail because of guid_uuid.c
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Florian Smeets
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-03 14:10 UTC by Kurt Jaeger
Modified: 2013-07-04 23:50 UTC (History)
1 user (show)

See Also:


Attachments
file.diff (342 bytes, patch)
2013-07-03 14:10 UTC, Kurt Jaeger
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kurt Jaeger 2013-07-03 14:10:00 UTC
	asterisk11 fails to build with problem in
	res/pjproject/pjlib/src/pj/guid_uuid.c
	looking for uuid/uuid.h

Fix: Save the following file as
/usr/ports/net/asterisk11/files/patch-guid_uuid.c

-------------
How-To-Repeat: 	cd /usr/ports/net/asterisk11
	make install
Comment 1 Edwin Groothuis freebsd_committer 2013-07-03 14:10:10 UTC
Responsible Changed
From-To: freebsd-ports-bugs->flo

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Florian Smeets freebsd_committer 2013-07-04 23:49:34 UTC
State Changed
From-To: open->closed

Committed. Thanks!
Comment 3 dfilter service freebsd_committer 2013-07-04 23:49:36 UTC
Author: flo
Date: Thu Jul  4 22:49:22 2013
New Revision: 322296
URL: http://svnweb.freebsd.org/changeset/ports/322296

Log:
  - 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]

Added:
  head/net/asterisk11/files/patch-include-asterisk-astobj2.h   (contents, props changed)
  head/net/asterisk11/files/patch-include-asterisk-config.h   (contents, props changed)
  head/net/asterisk11/files/patch-include-asterisk-utils.h   (contents, props changed)
  head/net/asterisk11/files/patch-res-pjproject-pjlib-src-pj-guid_uuid.c   (contents, props changed)
Modified:
  head/net/asterisk11/Makefile
  head/net/asterisk11/files/patch-main::utils.c   (contents, props changed)
  head/net/asterisk11/pkg-plist

Modified: head/net/asterisk11/Makefile
==============================================================================
--- head/net/asterisk11/Makefile	Thu Jul  4 22:46:33 2013	(r322295)
+++ head/net/asterisk11/Makefile	Thu Jul  4 22:49:22 2013	(r322296)
@@ -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

Added: head/net/asterisk11/files/patch-include-asterisk-astobj2.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/asterisk11/files/patch-include-asterisk-astobj2.h	Thu Jul  4 22:49:22 2013	(r322296)
@@ -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 */

Added: head/net/asterisk11/files/patch-include-asterisk-config.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/asterisk11/files/patch-include-asterisk-config.h	Thu Jul  4 22:49:22 2013	(r322296)
@@ -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

Added: head/net/asterisk11/files/patch-include-asterisk-utils.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/asterisk11/files/patch-include-asterisk-utils.h	Thu Jul  4 22:49:22 2013	(r322296)
@@ -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 */

Modified: head/net/asterisk11/files/patch-main::utils.c
==============================================================================
--- head/net/asterisk11/files/patch-main::utils.c	Thu Jul  4 22:46:33 2013	(r322295)
+++ head/net/asterisk11/files/patch-main::utils.c	Thu Jul  4 22:49:22 2013	(r322296)
@@ -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

Added: head/net/asterisk11/files/patch-res-pjproject-pjlib-src-pj-guid_uuid.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/asterisk11/files/patch-res-pjproject-pjlib-src-pj-guid_uuid.c	Thu Jul  4 22:49:22 2013	(r322296)
@@ -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;

Modified: head/net/asterisk11/pkg-plist
==============================================================================
--- head/net/asterisk11/pkg-plist	Thu Jul  4 22:46:33 2013	(r322295)
+++ head/net/asterisk11/pkg-plist	Thu Jul  4 22:49:22 2013	(r322296)
@@ -1280,8 +1280,8 @@ spool/asterisk/voicemail/default/1234/en
 @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
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"