aboutsummaryrefslogtreecommitdiff
path: root/databases/akonadi
diff options
context:
space:
mode:
authorAlberto Villa <avilla@FreeBSD.org>2012-06-15 01:36:07 +0000
committerAlberto Villa <avilla@FreeBSD.org>2012-06-15 01:36:07 +0000
commiteb9025193119cd85971f436f322d62960c2f371e (patch)
tree0361c1b17b7d1a87854ed05ec4c84a8369210ac0 /databases/akonadi
parent42201a3a02cf940d7e0514f864eb2436c9de65c5 (diff)
downloadports-eb9025193119cd85971f436f322d62960c2f371e.tar.gz
ports-eb9025193119cd85971f436f322d62960c2f371e.zip
- Fix two serious bugs with local MySQL backend:
* let Akonadi install default 'mysql' database; * lower 'wait_timeout' to avoid overflow and avoid premature connection closing. - Add update instructions to UPDATING. [1] - Convert to OPTIONSng. - Bump PORTREVISION. KMail 2 and other Akonadi-enabled programs are now working successfully. Thanks to Dwayne MacKinnon and Mel Flynn who helped investigating the bug. Reviewed by: rakuco [1]
Notes
Notes: svn path=/head/; revision=299296
Diffstat (limited to 'databases/akonadi')
-rw-r--r--databases/akonadi/Makefile35
-rw-r--r--databases/akonadi/files/patch-server__src__storage__dbconfigmysql.cpp11
2 files changed, 34 insertions, 12 deletions
diff --git a/databases/akonadi/Makefile b/databases/akonadi/Makefile
index ce84eced1e7e..17dc9176eca4 100644
--- a/databases/akonadi/Makefile
+++ b/databases/akonadi/Makefile
@@ -6,7 +6,7 @@
PORTNAME= akonadi
PORTVERSION= 1.7.2
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= databases kde ipv6
MASTER_SITES= ${MASTER_SITE_KDE}
MASTER_SITE_SUBDIR= stable/${PORTNAME}/src/
@@ -23,11 +23,11 @@ LIB_DEPENDS= boost_thread:${PORTSDIR}/devel/boost-libs
LIB_DEPENDS+= execinfo.1:${PORTSDIR}/devel/libexecinfo
BUILD_DEPENDS= xsltproc:${PORTSDIR}/textproc/libxslt
-USE_BZIP2= yes
-USE_QT4= corelib network qtestlib dbus gui sql \
- qmake_build moc_build rcc_build uic_build
USE_KDE4= kdehier kdeprefix sharedmime automoc4 soprano
KDE4_BUILDENV= yes
+USE_QT4= dbus gui network qtestlib sql \
+ moc_build qmake_build rcc_build uic_build
+USE_BZIP2= yes
CMAKE_ARGS+= -DAKONADI_BUILD_TESTS:BOOL=FALSE \
-DINSTALL_QSQLITE_IN_QT_PREFIX:BOOL=TRUE \
-DCMAKE_REQUIRED_INCLUDES:STRING="${LOCALBASE}/include"
@@ -35,26 +35,31 @@ MAKE_JOBS_UNSAFE= yes
PLIST_SUB+= QT_PREFIX=${QT_PREFIX}
-OPTIONS= MYSQL "Install MySQL plugin and server (recommended)" on \
- PGSQL "Install PostgreSQL plugin" off \
- SQLITE "Enable SQLite backend (unused)" off
+OPTIONS_MULTI= BACKEND
+OPTIONS_MULTI_BACKEND= MYSQL PGSQL SQLITE
+
+MYSQL_DESC= Install MySQL Qt plugin and server
+PGSQL_DESC= Install PostgreSQL Qt plugin
+SQLITE_DESC= Enable SQLite backend (unused)
+
+OPTIONS_DEFAULT= MYSQL
.include <bsd.port.options.mk>
-.ifndef(WITHOUT_MYSQL)
+.if ${PORT_OPTIONS:MMYSQL}
USE_MYSQL= server
USE_QT4+= sql-mysql_run
.endif
-.ifdef(WITH_PGSQL)
+.if ${PORT_OPTIONS:MPGSQL}
# Do not add a dependency on PostgreSQL server as someone preferring
-# it over MySQL might like to use some advanced configuration like a
+# it over MySQL might like to use some advanced configuration, like a
# remote server.
#USE_PGSQL= server
USE_QT4+= sql-pgsql_run
.endif
-.ifdef(WITH_SQLITE)
+.if ${PORT_OPTIONS:MSQLITE}
USE_SQLITE= 3
PLIST_SUB+= SQLITE=""
.else
@@ -62,7 +67,7 @@ PLIST_SUB+= SQLITE="@comment "
.endif
post-patch:
-.ifndef(WITH_SQLITE)
+.if ${PORT_OPTIONS:MSQLITE} == ""
${REINPLACE_CMD} -e '/find_package(Sqlite)/ d' \
${PATCH_WRKSRC}/CMakeLists.txt
.endif
@@ -70,6 +75,12 @@ post-patch:
${PATCH_WRKSRC}/CMakeLists.txt
${REINPLACE_CMD} -e '/find_program/ s|mysqld|mysqld_safe ${LOCALBASE}/bin|g' \
${PATCH_WRKSRC}/server/CMakeLists.txt
+ ${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|' \
+ ${PATCH_WRKSRC}/server/src/storage/dbconfigmysql.cpp
+ # MySQL seems to have this limit on FreeBSD (same of Windows
+ # but undocumented and unstable).
+ ${REINPLACE_CMD} -e '/wait_timeout/ s|31536000|2147483|' \
+ ${PATCH_WRKSRC}/server/src/storage/*.conf
# Prevent updating MIME during build.
${REINPLACE_CMD} -e '/^update_xdg_mimetypes/ d; /SharedMimeInfo/ d' \
${PATCH_WRKSRC}/CMakeLists.txt
diff --git a/databases/akonadi/files/patch-server__src__storage__dbconfigmysql.cpp b/databases/akonadi/files/patch-server__src__storage__dbconfigmysql.cpp
new file mode 100644
index 000000000000..d061fcc3f49f
--- /dev/null
+++ b/databases/akonadi/files/patch-server__src__storage__dbconfigmysql.cpp
@@ -0,0 +1,11 @@
+--- ./server/src/storage/dbconfigmysql.cpp.orig 2012-06-13 02:11:19.473370856 +0200
++++ ./server/src/storage/dbconfigmysql.cpp 2012-06-13 02:11:50.113468897 +0200
+@@ -242,7 +242,7 @@
+ // first run, some MySQL versions need a mysql_install_db run for that
+ const QString confFile = XdgBaseDirs::findResourceFile( "config", QLatin1String("akonadi/mysql-global.conf" ));
+ if ( QDir( dataDir ).entryList( QDir::NoDotAndDotDot | QDir::AllEntries ).isEmpty() && !mMysqlInstallDbPath.isEmpty() ) {
+- const QStringList arguments = QStringList() << QString::fromLatin1( "--force" ) << QString::fromLatin1( "--defaults-file=%1").arg(confFile) << QString::fromLatin1( "--datadir=%1/" ).arg( dataDir );
++ const QStringList arguments = QStringList() << QString::fromLatin1( "--force" ) << QString::fromLatin1( "--defaults-file=%1").arg(confFile) << QString::fromLatin1( "--datadir=%1/" ).arg( dataDir ) << QString::fromLatin1( "--basedir=%%LOCALBASE%%" );
+ QProcess::execute( mMysqlInstallDbPath, arguments );
+ }
+