From nobody@FreeBSD.org  Mon Aug 29 09:05:38 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 A40A61065670
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 29 Aug 2011 09:05:38 +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 7AE9E8FC13
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 29 Aug 2011 09:05:38 +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 p7T95c2D019016
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 29 Aug 2011 09:05:38 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id p7T95cIV019015;
	Mon, 29 Aug 2011 09:05:38 GMT
	(envelope-from nobody)
Message-Id: <201108290905.p7T95cIV019015@red.freebsd.org>
Date: Mon, 29 Aug 2011 09:05:38 GMT
From: Radics Pter <mitchnull@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [databases/akonadi] Make MySql dependency optional
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         160277
>Category:       ports
>Synopsis:       [PATCH] databases/akonadi: Make MySQL dependency optional
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kde
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Aug 29 09:10:07 UTC 2011
>Closed-Date:    Tue May 29 09:59:24 UTC 2012
>Last-Modified:  Tue May 29 09:59:24 UTC 2012
>Originator:     Radics Pter
>Release:        8.2-RELEASE
>Organization:
>Environment:
FreeBSD seven.local 8.2-RELEASE FreeBSD 8.2-RELEASE #0: Fri Feb 18 02:24:46 UTC 2011     root@almeida.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386

>Description:
The current version of the akonadi port (akonadi-1.6.0) has a run-time dependency on mysql-server. The attach patch adds an OPTION to the port to enable MySql backend (enabled by default).  If this option is turned off, akonadi will be built to use sqlite as the default backend and won't pull in mysql-server.
>How-To-Repeat:

>Fix:
I've rebuilt the akonadi port with the modified Makefile (see patch). The new port is identical to the original version WITH_MYSQL, and it doesn't depend on mysql-server and correctly uses the sqlite backend WITHOUT_MYSQL.

Patch attached with submission follows:

--- Makefile.ORIG	2011-08-20 00:09:41.000000000 +0000
+++ Makefile	2011-08-29 08:46:57.000000000 +0000
@@ -17,10 +17,14 @@
 LICENSE=	LGPL21
 LICENSE_FILE=	${WRKSRC}/lgpl-license
 
+OPTIONS=	MYSQL "Enable MySql backend" On
+
+.include <bsd.port.options.mk>
+
 LIB_DEPENDS=	boost_thread:${PORTSDIR}/devel/boost-libs \
 		soprano.4:${PORTSDIR}/textproc/soprano
 BUILD_DEPENDS=	xsltproc:${PORTSDIR}/textproc/libxslt
-RUN_DEPENDS=	${QT_PREFIX}/lib/qt4/plugins/sqldrivers/libqsqlmysql.so:${PORTSDIR}/databases/qt4-mysql-plugin
+RUN_DEPENDS=
 
 # Let process generate meaningful backtrace on core dump
 LIB_DEPENDS+=	execinfo.1:${PORTSDIR}/devel/libexecinfo
@@ -33,10 +37,16 @@
 USE_QT_VER=	4
 QT_COMPONENTS=	corelib network qtestlib dbus sql \
 		qmake_build moc_build rcc_build uic_build
-USE_MYSQL=	server
 USE_KDE4=	kdeprefix kdehier automoc4 sharedmime
 KDE4_BUILDENV=	yes
 
+.if defined(WITHOUT_MYSQL)
+CMAKE_ARGS+=	-DDATABASE_BACKEND:STRING="SQLITE"
+.else
+USE_MYSQL=	server
+RUN_DEPENDS+=	${QT_PREFIX}/lib/qt4/plugins/sqldrivers/libqsqlmysql.so:${PORTSDIR}/databases/qt4-mysql-plugin
+.endif
+
 PLIST_SUB+=	QT_PREFIX=${QT_PREFIX}
 
 post-patch:


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->kde 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Mon Aug 29 09:10:16 UTC 2011 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=160277 
State-Changed-From-To: open->analyzed 
State-Changed-By: avilla 
State-Changed-When: Mon Aug 29 16:08:03 UTC 2011 
State-Changed-Why:  
I'll take it. 

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

From: Alberto Villa <avilla@freebsd.org>
To: bug-followup@freebsd.org,
 mitchnull@gmail.com
Cc:  
Subject: Re: ports/160277: [PATCH] databases/akonadi: Make MySQL dependency optional
Date: Mon, 29 Aug 2011 19:26:11 +0200

 --nextPart2241759.OhNZ3YY4t0
 Content-Type: Text/Plain;
   charset="us-ascii"
 Content-Transfer-Encoding: quoted-printable
 
 kde doesn't support the sqlite plugin at the moment (and probably will=20
 never do anymore), so is there a reason to disable mysql yet?
 
 consider that i'm adding optional pgsql support, but it cannot be=20
 considered as a safe alternative given that it requires an external server=
 =20
 to be run
 =2D-=20
 Alberto Villa, FreeBSD committer <avilla@FreeBSD.org>
 http://people.FreeBSD.org/~avilla
 
 =2E.. [concerning quotation marks] even if we *_=08d_=08i_=08d* quote anybo=
 dy in=20
 this
 business, it probably would be gibberish.
 		-- Thom McLeod
 
 --nextPart2241759.OhNZ3YY4t0
 Content-Type: application/pgp-signature; name=signature.asc 
 Content-Description: This is a digitally signed message part.
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.17 (FreeBSD)
 
 iJwEAAECAAYFAk5by7YACgkQ3xiC6kQ1Cos2/gQAkZIjngAU27yal7VIW2SM3ftZ
 yyW6VXjLcTaz+FjT5xF55LnjLOh24ehTFYQH9V9/tQR4u3yMixGV7v33zOkv1wU7
 MoaU0DOrantUhbtdgrGMzFHpyPpRinnjWdLmE3fUv6rDzx/F8uIBabgPIEZSVIXH
 7d2mizxkpBDrLjnowJs=
 =JUgp
 -----END PGP SIGNATURE-----
 
 --nextPart2241759.OhNZ3YY4t0--

From: Alberto Villa <avilla@freebsd.org>
To: Peter Radics <mitchnull@gmail.com>
Cc: bug-followup@freebsd.org
Subject: Re: ports/160277: [PATCH] databases/akonadi: Make MySQL dependency optional
Date: Mon, 29 Aug 2011 20:53:19 +0200

 --nextPart69193959.BLJ2csMCYQ
 Content-Type: Text/Plain;
   charset="iso-8859-1"
 Content-Transfer-Encoding: quoted-printable
 
 On Monday 29 August 2011 20:46:51 Peter Radics wrote:
 >  What does "at the moment" mean? The current port (akonadi-1.6.0)
 > seems to support sqlite just fine.
 
 kde 4.7 and, i think, 4.6 do not support the akonadi sqlite plugin
 
 > I think requiring a full-blown mysql server for each desktop user is a
 > bit too much for the stuff that akonadi does (mostly caching, if I
 > understand correctly), so I was very happy that I could enable the
 > sqlite backend in the port.
 
 that is not possible anymore
 
 > Even if sqlite is really dead in the upcoming releases, I'd still
 > prefer an optional ("embedded") mysql in the port, as personally I'd
 > rather configure a separate postgres instance than running mysql
 > (personal preference, I know).
 
 ok, this requires discussion with other developers. we'll try to find the=20
 best possible solution without affecting normal users (the new=20
 OPTIONS framework would certainly help with this)
 =2D-=20
 Alberto Villa, FreeBSD committer <avilla@FreeBSD.org>
 http://people.FreeBSD.org/~avilla
 
 Bushydo -- the way of the shrub.  Bonsai!
 
 --nextPart69193959.BLJ2csMCYQ
 Content-Type: application/pgp-signature; name=signature.asc 
 Content-Description: This is a digitally signed message part.
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.17 (FreeBSD)
 
 iJwEAAECAAYFAk5b4CIACgkQ3xiC6kQ1CouBhgP+MkOxYjVDaHldpZj4Kw9x8qRg
 dP4OLChJQKf6SmcDCiPVlk7x2XX/ndZWwsq8yI3CzPHt72UbAcshsVeXP5M+SxrU
 nI8Xz1buJBlY6kcKVeERLYtqGCcVoyotc+i6d0uFt9FeVHKbAvmFWOtDY/keYhOC
 aFQMsYhevgkO1wwYp9g=
 =rhBI
 -----END PGP SIGNATURE-----
 
 --nextPart69193959.BLJ2csMCYQ--

From: Peter Radics <mitchnull@gmail.com>
To: Alberto Villa <avilla@freebsd.org>
Cc: bug-followup@freebsd.org
Subject: Re: ports/160277: [PATCH] databases/akonadi: Make MySQL dependency optional
Date: Mon, 29 Aug 2011 20:46:51 +0200

 Hi,
 
  What does "at the moment" mean? The current port (akonadi-1.6.0)
 seems to support sqlite just fine.
 I think requiring a full-blown mysql server for each desktop user is a
 bit too much for the stuff that akonadi does (mostly caching, if I
 understand correctly), so I was very happy that I could enable the
 sqlite backend in the port.
 
 Even if sqlite is really dead in the upcoming releases, I'd still
 prefer an optional ("embedded") mysql in the port, as personally I'd
 rather configure a separate postgres instance than running mysql
 (personal preference, I know).
 
 cheers,
 mitch
 
 On Mon, Aug 29, 2011 at 7:26 PM, Alberto Villa <avilla@freebsd.org> wrote:
 > kde doesn't support the sqlite plugin at the moment (and probably will
 > never do anymore), so is there a reason to disable mysql yet?
 >
 > consider that i'm adding optional pgsql support, but it cannot be
 > considered as a safe alternative given that it requires an external serve=
 r
 > to be run
 > --
 > Alberto Villa, FreeBSD committer <avilla@FreeBSD.org>
 > http://people.FreeBSD.org/~avilla
 >
 > ... [concerning quotation marks] even if we *_ d_ i_ d* quote anybody in
 > this
 > business, it probably would be gibberish.
 > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0-- Thom McLeod
 >
State-Changed-From-To: analyzed->patched 
State-Changed-By: avilla 
State-Changed-When: Fri Apr 6 09:26:08 UTC 2012 
State-Changed-Why:  
Committed to area51, with some modifications (SQLite backend not being 
set as default). Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=160277 
State-Changed-From-To: patched->closed 
State-Changed-By: avilla 
State-Changed-When: Tue May 29 09:59:23 UTC 2012 
State-Changed-Why:  
Committed along with KDE SC 4.8.3. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=160277 
>Unformatted:
