From nobody@FreeBSD.org  Fri Feb 11 16:45:21 2011
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 18359106564A
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 11 Feb 2011 16:45:21 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id EE7BF8FC16
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 11 Feb 2011 16:45:20 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p1BGjKYb031186
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 11 Feb 2011 16:45:20 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id p1BGjK6s031185;
	Fri, 11 Feb 2011 16:45:20 GMT
	(envelope-from nobody)
Message-Id: <201102111645.p1BGjK6s031185@red.freebsd.org>
Date: Fri, 11 Feb 2011 16:45:20 GMT
From: Panagiotis Christias <p.christias@noc.ntua.gr>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [patch] net/asterisk: add mysql support option
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         154689
>Category:       ports
>Synopsis:       [patch] net/asterisk: add mysql support option
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    flo
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Feb 11 16:50:07 UTC 2011
>Closed-Date:    Fri Feb 18 23:40:53 UTC 2011
>Last-Modified:  Fri Feb 18 23:50:03 UTC 2011
>Originator:     Panagiotis Christias
>Release:        7.3-RELEASE-p3 amd64
>Organization:
NTUA NOC
>Environment:
FreeBSD builder7-amd64.noc.ntua.gr 7.3-RELEASE-p3 FreeBSD 7.3-RELEASE-p3 #0: Wed Sep 22 15:55:56 EEST 2010     root@agamemnon.noc.ntua.gr:/usr/obj/usr/src/sys/NTUA  amd64
>Description:
This is a patch for adding a MySQL support option to net/asterisk port.

>How-To-Repeat:

>Fix:
See attached patch file. Also available at http://noc.ntua.gr/~christia/patch-asterisk18-mysql.txt

Patch attached with submission follows:

diff -r -u -N asterisk.orig/Makefile asterisk/Makefile
--- asterisk.orig/Makefile	2011-01-27 12:20:47.000000000 +0200
+++ asterisk/Makefile	2011-02-11 18:34:37.000000000 +0200
@@ -47,6 +47,7 @@
 		IODBC		"Enable iODBC support" off \
 		UODBC		"Enable unixODBC support" on \
 		POSTGRES	"Enable PostgreSQL support" on \
+		MYSQL		"Enable MySQL support" off \
 		RADIUS		"Enable RADIUS accounting support" on \
 		SNMP		"Enable SNMP support" on \
 		H323		"Enable H.323 support" on \
@@ -153,6 +154,14 @@
 CONFIGURE_ARGS+=	--with-postgres
 .endif
 
+.if !defined(WITH_MYSQL)
+PLIST_SUB+=	WITH_MYSQL="@comment "
+.else
+PLIST_SUB+=	WITH_MYSQL=""
+USE_MYSQL=	yes
+EXTRA_PATCHES+=	${PATCHDIR}/menuselect-tree.diff
+.endif
+
 .if !defined(WITH_OGGVORBIS)
 PLIST_SUB+=	WITH_OGGVORBIS="@comment "
 CONFIGURE_ARGS+=	--without-ogg
diff -r -u -N asterisk.orig/files/menuselect-tree.diff asterisk/files/menuselect-tree.diff
--- asterisk.orig/files/menuselect-tree.diff	1970-01-01 02:00:00.000000000 +0200
+++ asterisk/files/menuselect-tree.diff	2011-02-11 17:34:39.000000000 +0200
@@ -0,0 +1,25 @@
+--- menuselect-tree.orig	2011-02-11 17:33:25.000000000 +0200
++++ menuselect-tree	2011-02-11 17:33:52.000000000 +0200
+@@ -4,14 +4,12 @@
+ <category name="MENUSELECT_ADDONS" displayname="Add-ons (See README-addons.txt)" remove_on_change="addons/modules.link">
+ <member name="app_mysql" displayname="Simple Mysql Interface" remove_on_change="addons/app_mysql.o addons/app_mysql.so">
+ 	<depend>mysqlclient</depend>
+-	<defaultenabled>no</defaultenabled>
+ </member>
+ <member name="app_saycountpl" displayname="Say polish counting words" remove_on_change="addons/app_saycountpl.o addons/app_saycountpl.so">
+ 	<defaultenabled>no</defaultenabled>
+ </member>
+ <member name="cdr_mysql" displayname="MySQL CDR Backend" remove_on_change="addons/cdr_mysql.o addons/cdr_mysql.so">
+ 	<depend>mysqlclient</depend>
+-	<defaultenabled>no</defaultenabled>
+ </member>
+ <member name="chan_mobile" displayname="Bluetooth Mobile Device Channel Driver" remove_on_change="addons/chan_mobile.o addons/chan_mobile.so">
+ 	<depend>bluetooth</depend>
+@@ -25,7 +23,6 @@
+ </member>
+ <member name="res_config_mysql" displayname="MySQL RealTime Configuration Driver" remove_on_change="addons/res_config_mysql.o addons/res_config_mysql.so">
+ 	<depend>mysqlclient</depend>
+-	<defaultenabled>no</defaultenabled>
+ </member>
+ </category>
+ <category name="MENUSELECT_APPS" displayname="Applications" remove_on_change="apps/modules.link">
diff -r -u -N asterisk.orig/pkg-plist asterisk/pkg-plist
--- asterisk.orig/pkg-plist	2010-12-29 14:47:09.000000000 +0200
+++ asterisk/pkg-plist	2011-02-11 17:56:48.000000000 +0200
@@ -426,6 +426,7 @@
 lib/asterisk/modules/app_celgenuserevent.so
 lib/asterisk/modules/app_confbridge.so
 lib/asterisk/modules/app_minivm.so
+%%WITH_MYSQL%%lib/asterisk/modules/app_mysql.so
 lib/asterisk/modules/app_originate.so
 lib/asterisk/modules/app_playtones.so
 lib/asterisk/modules/app_readexten.so
@@ -533,6 +534,7 @@
 lib/asterisk/modules/cdr_csv.so
 lib/asterisk/modules/cdr_custom.so
 lib/asterisk/modules/cdr_manager.so
+%%WITH_MYSQL%%lib/asterisk/modules/cdr_mysql.so
 %%WITH_POSTGRES%%lib/asterisk/modules/cdr_pgsql.so
 %%WITH_RADIUS%%lib/asterisk/modules/cdr_radius.so
 %%WITH_SQLITE%%lib/asterisk/modules/cdr_sqlite.so
@@ -613,6 +615,7 @@
 lib/asterisk/modules/res_calendar.so
 %%WITH_EXCHANGE%%lib/asterisk/modules/res_calendar_ews.so
 lib/asterisk/modules/res_clioriginate.so
+%%WITH_MYSQL%%lib/asterisk/modules/res_config_mysql.so
 %%WITH_POSTGRES%%lib/asterisk/modules/res_config_pgsql.so
 lib/asterisk/modules/res_convert.so
 lib/asterisk/modules/res_crypto.so


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->flo 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Fri Feb 11 16:50:13 UTC 2011 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=154689 
State-Changed-From-To: open->closed 
State-Changed-By: flo 
State-Changed-When: Fri Feb 18 23:39:48 UTC 2011 
State-Changed-Why:  
Committed. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=154689 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/154689: commit references a PR
Date: Fri, 18 Feb 2011 23:37:57 +0000 (UTC)

 flo         2011-02-18 23:37:52 UTC
 
   FreeBSD ports repository
 
   Modified files:
     net/asterisk         Makefile pkg-plist 
   Added files:
     net/asterisk/files   extra-patch-menuselect-tree-mysql.diff 
   Log:
   - add option to build with mysql support
   
   PR:             ports/154689
   Submitted by:   Panagiotis Christias <p.christias@noc.ntua.gr>
   
   Revision  Changes    Path
   1.142     +9 -0      ports/net/asterisk/Makefile
   1.1       +25 -0     ports/net/asterisk/files/extra-patch-menuselect-tree-mysql.diff (new)
   1.47      +3 -0      ports/net/asterisk/pkg-plist
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
