ports/160277: [databases/akonadi] Make MySql dependency optional

Radics Péter mitchnull at gmail.com
Mon Aug 29 09:10:08 UTC 2011


>Number:         160277
>Category:       ports
>Synopsis:       [databases/akonadi] Make MySql dependency optional
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Aug 29 09:10:07 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Radics Péter
>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 at 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:
>Unformatted:



More information about the freebsd-ports-bugs mailing list