diff options
author | Andreas Proschofsky <suka@gentoo.org> | 2012-05-29 18:50:55 +0000 |
---|---|---|
committer | Andreas Proschofsky <suka@gentoo.org> | 2012-05-29 18:50:55 +0000 |
commit | 934fd0c49e53e38fd529f34a7bb048dc07c71f5b (patch) | |
tree | d8ba6be416ee1b811d08267c7788e7c2ad309fba /app-misc/tasque | |
parent | Version bump wrt #418151 by Ian Delaney <johneed@hotmail.com>. Use github as ... (diff) | |
download | gentoo-2-934fd0c49e53e38fd529f34a7bb048dc07c71f5b.tar.gz gentoo-2-934fd0c49e53e38fd529f34a7bb048dc07c71f5b.tar.bz2 gentoo-2-934fd0c49e53e38fd529f34a7bb048dc07c71f5b.zip |
Remove evolution-data-server support as it is broken, add a litte performance improvement
(Portage version: 2.2.0_alpha108/cvs/Linux x86_64)
Diffstat (limited to 'app-misc/tasque')
-rw-r--r-- | app-misc/tasque/ChangeLog | 8 | ||||
-rw-r--r-- | app-misc/tasque/files/tasque-0.1.8-debug-fixup.patch | 183 | ||||
-rw-r--r-- | app-misc/tasque/files/tasque-0.1.9-cachetasks.patch | 244 | ||||
-rw-r--r-- | app-misc/tasque/tasque-0.1.9.ebuild | 23 |
4 files changed, 265 insertions, 193 deletions
diff --git a/app-misc/tasque/ChangeLog b/app-misc/tasque/ChangeLog index 3f26632692da..258cb51513dc 100644 --- a/app-misc/tasque/ChangeLog +++ b/app-misc/tasque/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for app-misc/tasque # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-misc/tasque/ChangeLog,v 1.7 2012/01/21 13:13:14 pacho Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-misc/tasque/ChangeLog,v 1.8 2012/05/29 18:50:55 suka Exp $ + + 29 May 2012; Andreas Proschofsky <suka@gentoo.org> + -files/tasque-0.1.8-debug-fixup.patch, tasque-0.1.9.ebuild, + +files/tasque-0.1.9-cachetasks.patch: + Remove evolution-data-server support as it is broken, add a litte performance + patch 21 Jan 2012; Pacho Ramos <pacho@gentoo.org> -tasque-0.1.8.ebuild: Drop old. diff --git a/app-misc/tasque/files/tasque-0.1.8-debug-fixup.patch b/app-misc/tasque/files/tasque-0.1.8-debug-fixup.patch deleted file mode 100644 index 8fbe3426a8de..000000000000 --- a/app-misc/tasque/files/tasque-0.1.8-debug-fixup.patch +++ /dev/null @@ -1,183 +0,0 @@ -http://bugzilla.gnome.org/show_bug.cgi?id=566355 - -diff -NrU5 tasque-0.1.8.orig/configure.ac tasque-0.1.8/configure.ac ---- tasque-0.1.8.orig/configure.ac 2009-01-09 18:44:30.000000000 +0100 -+++ tasque-0.1.8/configure.ac 2009-01-09 19:19:06.000000000 +0100 -@@ -53,39 +53,12 @@ - AC_SUBST(NOTIFY_SHARP_LIBS) - - AC_ARG_ENABLE(debug, - AC_HELP_STRING([--enable-debug], - [Use 'Debug' Configuration [default=yes]]), -- enable_debug=$enableval, enable_debug=no) -+ enable_debug=$enableval, enable_debug=yes) - AM_CONDITIONAL(ENABLE_DEBUG, test "x$enable_debug" = "xyes") --if test "x$enable_debug" = "xyes" ; then --# DEBUG_CONFIG_LIBRARIES=' ${pkglibdir}/Db4objects.Db4o.dll' --# DEBUG_CONFIG_LIBS=' -r:${pkglibdir}/Db4objects.Db4o.dll' --# AC_SUBST(DEBUG_CONFIG_LIBRARIES) --# AC_SUBST(DEBUG_CONFIG_LIBS) -- CONFIG_REQUESTED="yes" --fi --AC_ARG_ENABLE(release, -- AC_HELP_STRING([--enable-release], -- [Use 'Release' Configuration [default=no]]), -- enable_release=$enableval, enable_release=no) --AM_CONDITIONAL(ENABLE_RELEASE, test "x$enable_release" = "xyes") --if test "x$enable_release" = "xyes" ; then --# RELEASE_CONFIG_LIBRARIES=' ${pkglibdir}/Db4objects.Db4o.dll' --# RELEASE_CONFIG_LIBS=' -r:${pkglibdir}/Db4objects.Db4o.dll' --# AC_SUBST(RELEASE_CONFIG_LIBRARIES) --# AC_SUBST(RELEASE_CONFIG_LIBS) -- CONFIG_REQUESTED="yes" --fi --if test -z "$CONFIG_REQUESTED" ; then --# DEBUG_CONFIG_LIBRARIES=' ${pkglibdir}/Db4objects.Db4o.dll' --# DEBUG_CONFIG_LIBS=' -r:${pkglibdir}/Db4objects.Db4o.dll' --# AC_SUBST(DEBUG_CONFIG_LIBRARIES) --# AC_SUBST(DEBUG_CONFIG_LIBS) -- AM_CONDITIONAL(ENABLE_DEBUG, true) --fi -- - - # - # DEFINES uses for #if statements - # - AC_ARG_WITH(dbus_service_dir, [ --with-dbus-service-dir=DIR Where to install Tasque's DBus service file.]) -@@ -225,11 +198,10 @@ - echo " - Configuration: - - Prefix: ${prefix} - Debug build: ${enable_debug} -- Release build: ${enable_release} - Notification: ${enable_notify_sharp} - Dummy Backend: ${enable_backend_dummy} - Evolution Backend: ${enable_backend_eds} - ICECore Backend: ${enable_backend_icecore} - RTM Backend: ${enable_backend_rtm} -diff -NrU5 tasque-0.1.8.orig/RtmNet/Makefile.am tasque-0.1.8/RtmNet/Makefile.am ---- tasque-0.1.8.orig/RtmNet/Makefile.am 2009-01-09 18:44:30.000000000 +0100 -+++ tasque-0.1.8/RtmNet/Makefile.am 2009-01-09 19:26:42.000000000 +0100 -@@ -1,16 +1,18 @@ - CSC = $(GMCS) - - TARGET = RtmNet.dll - -+CSFLAGS = -t:library -noconfig -codepage:utf8 -+ - if ENABLE_DEBUG --CSFLAGS = -t:library -noconfig -codepage:utf8 -warn:4 -debug -d:DEBUG --endif --if ENABLE_RELEASE --CSFLAGS = -t:library -noconfig -codepage:utf8 -warn:4 -+CSFLAGS += -warn:4 -debug -d:DEBUG -+TARGET_DEBUG_FILE = $(TARGET).mdb -+$(TARGET).mdb: $(TARGET) - endif - -+ - CSFILES = \ - $(srcdir)/ApiKeyRequiredException.cs \ - $(srcdir)/AssemblyInfo.cs \ - $(srcdir)/Auth.cs \ - $(srcdir)/AuthenticationRequiredException.cs \ -@@ -45,20 +47,20 @@ - - $(TARGET): $(CSFILES) - $(CSC) -unsafe -out:$@ $(CSFLAGS) $^ $(ASSEMBLIES) $(RESOURCES) - - tasquelibdir = $(prefix)/lib/tasque --tasquelib_DATA = $(TARGET) -+tasquelib_DATA = $(TARGET) $(TARGET_DEBUG_FILE) - - bin_SCRIPTS = $(WRAPPER) - - - EXTRA_DIST = \ - $(CSFILES) - - CLEANFILES = \ -- $(TARGET) \ -- $(TARGET).mdb -+ $(TARGET_DEBUG_FILE) \ -+ $(TARGET) - - DISTCLEANFILES = \ -- $(TARGET) \ -- $(TARGET).mdb -+ $(TARGET_DEBUG_FILE) \ -+ $(TARGET) -diff -NrU5 tasque-0.1.8.orig/src/Makefile.am tasque-0.1.8/src/Makefile.am ---- tasque-0.1.8.orig/src/Makefile.am 2009-01-09 18:44:30.000000000 +0100 -+++ tasque-0.1.8/src/Makefile.am 2009-01-09 19:15:58.000000000 +0100 -@@ -2,20 +2,21 @@ - - CSC = $(GMCS) - - TARGET = Tasque.exe - WRAPPER = tasque -+CSFLAGS = -noconfig -codepage:utf8 - - if GTK_2_12 - GTK_2_12_CSFLAGS = -define:GTK_2_12 -+CSFLAGS += $(GTK_2_12_CSFLAGS) - endif - - if ENABLE_DEBUG --CSFLAGS = -noconfig -codepage:utf8 -warn:4 -debug -d:DEBUG $(GTK_2_12_CSFLAGS) --endif --if ENABLE_RELEASE --CSFLAGS = -noconfig -codepage:utf8 -warn:4 $(GTK_2_12_CSFLAGS) -+CSFLAGS += -warn:4 -debug -d:DEBUG -+TARGET_DEBUG_FILE = $(TARGET).mdb -+$(TARGET).mdb: $(TARGET) - endif - - if ENABLE_NOTIFY_SHARP - NOTIFY_SHARP_CSFLAGS = -define:ENABLE_NOTIFY_SHARP - endif -@@ -138,11 +139,11 @@ - - $(TARGET): $(CSFILES) Defines.cs - $(CSC) -unsafe -out:$@ $(CSFLAGS) $(NOTIFY_SHARP_CSFLAGS) $^ $(ASSEMBLIES) $(RESOURCES) - - tasquelibdir = $(libdir)/tasque --tasquelib_DATA = $(TARGET) $(TARGET).config $(TARGET).mdb -+tasquelib_DATA = $(TARGET) $(TARGET).config $(TARGET_DEBUG_FILE) - - bin_SCRIPTS = $(WRAPPER) - - $(WRAPPER): $(srcdir)/$(WRAPPER).in Makefile - sed -e "s|\@prefix\@|$(prefix)|g" \ -@@ -154,12 +155,10 @@ - -e "s|\@wrapper\@|$(WRAPPER)|g" \ - -e "s|\@srcdir\@|$(PWD)|g" \ - < $< > $@ - chmod +x $(WRAPPER) - --$(TARGET).mdb: $(TARGET) -- - $(TARGET).config: $(srcdir)/$(TARGET).config.in Makefile - sed -e "s|\@pkglibdir\@|$(pkglibdir)|" \ - < $< > $@ - - Defines.cs: $(srcdir)/Defines.cs.in Makefile -@@ -187,15 +186,15 @@ - pkgconfig_DATA = tasque.pc - - CLEANFILES = \ - $(TARGET) \ - $(TARGET).config \ -- $(TARGET).mdb \ -+ $(TARGET_DEBUG_FILE) \ - $(WRAPPER) \ - Defines.cs - - DISTCLEANFILES = \ - $(WRAPPER) \ - $(TARGET) \ - $(TARGET).config \ -- $(TARGET).mdb \ -+ $(TARGET_DEBUG_FILE) \ - Defines.cs diff --git a/app-misc/tasque/files/tasque-0.1.9-cachetasks.patch b/app-misc/tasque/files/tasque-0.1.9-cachetasks.patch new file mode 100644 index 000000000000..994b85749d47 --- /dev/null +++ b/app-misc/tasque/files/tasque-0.1.9-cachetasks.patch @@ -0,0 +1,244 @@ +diff --git a/src/Backends/Sqlite/SqliteBackend.cs b/src/Backends/Sqlite/SqliteBackend.cs +index 4e7ec7a..417f6b2 100644 +--- a/src/Backends/Sqlite/SqliteBackend.cs ++++ b/src/Backends/Sqlite/SqliteBackend.cs +@@ -243,10 +243,10 @@ namespace Tasque.Backends.Sqlite + bool hasValues = false; + + string command = "SELECT id FROM Categories"; +- SqliteCommand cmd = db.Connection.CreateCommand(); +- cmd.CommandText = command; +- SqliteDataReader dataReader = cmd.ExecuteReader(); +- while(dataReader.Read()) { ++ SqliteCommand cmd = db.Connection.CreateCommand(); ++ cmd.CommandText = command; ++ SqliteDataReader dataReader = cmd.ExecuteReader(); ++ while(dataReader.Read()) { + int id = dataReader.GetInt32(0); + hasValues = true; + +@@ -255,10 +255,10 @@ namespace Tasque.Backends.Sqlite + defaultCategory = newCategory; + iter = categoryListStore.Append (); + categoryListStore.SetValue (iter, 0, newCategory); +- } +- +- dataReader.Close(); +- cmd.Dispose(); ++ } ++ ++ dataReader.Close(); ++ cmd.Dispose(); + + if(!hasValues) + { +@@ -286,23 +286,32 @@ namespace Tasque.Backends.Sqlite + Gtk.TreeIter iter; + SqliteTask newTask; + bool hasValues = false; +- +- string command = "SELECT id FROM Tasks"; +- SqliteCommand cmd = db.Connection.CreateCommand(); +- cmd.CommandText = command; +- SqliteDataReader dataReader = cmd.ExecuteReader(); +- while(dataReader.Read()) { +- int id = dataReader.GetInt32(0); ++ ++ string command = "SELECT id,Category,Name,DueDate,CompletionDate,Priority, State FROM Tasks"; ++ SqliteCommand cmd = db.Connection.CreateCommand(); ++ cmd.CommandText = command; ++ SqliteDataReader dataReader = cmd.ExecuteReader(); ++ while(dataReader.Read()) { ++ int id = dataReader.GetInt32(0); ++ int category = dataReader.GetInt32(1); ++ string name = dataReader.GetString(2); ++ int dueDate = dataReader.GetInt32(3); ++ int completionDate = dataReader.GetInt32(4); ++ int priority = dataReader.GetInt32(5); ++ int state = dataReader.GetInt32(6); ++ + hasValues = true; +- +- newTask = new SqliteTask(this, id); ++ ++ newTask = new SqliteTask(this, id, category, ++ name, dueDate, completionDate, ++ priority, state); + iter = taskStore.AppendNode(); + taskStore.SetValue (iter, 0, newTask); + taskIters [newTask.SqliteId] = iter; +- } ++ } + +- dataReader.Close(); +- cmd.Dispose(); ++ dataReader.Close(); ++ cmd.Dispose(); + + if(!hasValues) + { +diff --git a/src/Backends/Sqlite/SqliteTask.cs b/src/Backends/Sqlite/SqliteTask.cs +index a9f5d42..9ede1b1 100644 +--- a/src/Backends/Sqlite/SqliteTask.cs ++++ b/src/Backends/Sqlite/SqliteTask.cs +@@ -12,22 +12,41 @@ namespace Tasque.Backends.Sqlite + { + private SqliteBackend backend; + private int id; ++ private int category; ++ private string name; ++ private long dueDate; ++ private long completionDate; ++ private int priority; ++ private int state; + + public SqliteTask(SqliteBackend backend, string name) + { + this.backend = backend; + Logger.Debug("Creating New Task Object : {0} (id={1})", name, id); + name = backend.SanitizeText (name); ++ this.name = name; ++ this.dueDate = Database.FromDateTime(DateTime.MinValue); ++ this.completionDate = Database.FromDateTime(DateTime.MinValue); ++ this.category = 0; ++ this.priority = (int)(TaskPriority.None); ++ this.state = (int)TaskState.Active; + string command = String.Format("INSERT INTO Tasks (Name, DueDate, CompletionDate, Priority, State, Category, ExternalID) values ('{0}','{1}', '{2}','{3}', '{4}', '{5}', '{6}'); SELECT last_insert_rowid();", +- name, Database.FromDateTime(DateTime.MinValue), Database.FromDateTime(DateTime.MinValue), +- ((int)(TaskPriority.None)), ((int)TaskState.Active), 0, string.Empty ); ++ name, dueDate, completionDate, ++ priority, state, category, string.Empty); + this.id = Convert.ToInt32 (backend.Database.ExecuteScalar (command)); + } +- +- public SqliteTask (SqliteBackend backend, int id) ++ ++ public SqliteTask (SqliteBackend backend, int id, int category, string name, ++ long dueDate, long completionDate, int priority, int state) + { + this.backend = backend; + this.id = id; ++ this.category = category; ++ this.name = name; ++ this.dueDate = dueDate; ++ this.completionDate = completionDate; ++ this.priority = priority; ++ this.state = state; + } + + #region Public Properties +@@ -44,12 +63,10 @@ namespace Tasque.Backends.Sqlite + + public override string Name + { +- get { +- string command = String.Format("SELECT Name FROM Tasks where ID='{0}'", id); +- return backend.Database.GetSingleString(command); +- } ++ get { return this.name; } + set { + string name = backend.SanitizeText (value); ++ this.name = name; + string command = String.Format("UPDATE Tasks set Name='{0}' where ID='{1}'", name, id); + backend.Database.ExecuteScalar(command); + backend.UpdateTask(this); +@@ -58,12 +75,10 @@ namespace Tasque.Backends.Sqlite + + public override DateTime DueDate + { +- get { +- string command = String.Format("SELECT DueDate FROM Tasks where ID='{0}'", id); +- return backend.Database.GetDateTime(command); +- } ++ get { return Database.ToDateTime(this.dueDate); } + set { +- string command = String.Format("UPDATE Tasks set DueDate='{0}' where ID='{1}'", Database.FromDateTime(value), id); ++ this.dueDate = Database.FromDateTime(value); ++ string command = String.Format("UPDATE Tasks set DueDate='{0}' where ID='{1}'", this.dueDate, id); + backend.Database.ExecuteScalar(command); + backend.UpdateTask(this); + } +@@ -72,14 +87,12 @@ namespace Tasque.Backends.Sqlite + + public override DateTime CompletionDate + { +- get { +- string command = String.Format("SELECT CompletionDate FROM Tasks where ID='{0}'", id); +- return backend.Database.GetDateTime(command); +- } ++ get { return Database.ToDateTime(this.completionDate); } + set { +- string command = String.Format("UPDATE Tasks set CompletionDate='{0}' where ID='{1}'", Database.FromDateTime(value), id); ++ this.completionDate = Database.FromDateTime(value); ++ string command = String.Format("UPDATE Tasks set CompletionDate='{0}' where ID='{1}'", this.completionDate, id); + backend.Database.ExecuteScalar(command); +- backend.UpdateTask(this); ++ backend.UpdateTask(this); + } + } + +@@ -96,14 +109,12 @@ namespace Tasque.Backends.Sqlite + + public override TaskPriority Priority + { +- get { +- string command = String.Format("SELECT Priority FROM Tasks where ID='{0}'", id); +- return (TaskPriority)backend.Database.GetSingleInt(command); +- } ++ get { return (TaskPriority) this.priority; } + set { +- string command = String.Format("UPDATE Tasks set Priority='{0}' where ID='{1}'", ((int)value), id); ++ this.priority = (int) value; ++ string command = String.Format("UPDATE Tasks set Priority='{0}' where ID='{1}'", this.priority, id); + backend.Database.ExecuteScalar(command); +- backend.UpdateTask(this); ++ backend.UpdateTask(this); + } + } + +@@ -127,27 +138,21 @@ namespace Tasque.Backends.Sqlite + + public TaskState LocalState + { +- get { +- string command = String.Format("SELECT State FROM Tasks where ID='{0}'", id); +- return (TaskState)backend.Database.GetSingleInt(command); +- } ++ get { return (TaskState) this.state; } + set { +- string command = String.Format("UPDATE Tasks set State='{0}' where ID='{1}'", ((int)value), id); ++ this.state = (int) value; ++ string command = String.Format("UPDATE Tasks set State='{0}' where ID='{1}'", this.state, id); + backend.Database.ExecuteScalar(command); +- backend.UpdateTask(this); ++ backend.UpdateTask(this); + } + } + + public override ICategory Category + { +- get { +- string command = String.Format("SELECT Category FROM Tasks where ID='{0}'", id); +- int catID = backend.Database.GetSingleInt(command); +- SqliteCategory sqCat = new SqliteCategory(backend, catID); +- return sqCat; +- } ++ get { return new SqliteCategory(backend, this.category); } + set { +- string command = String.Format("UPDATE Tasks set Category='{0}' where ID='{1}'", ((int)(value as SqliteCategory).ID), id); ++ this.category = (int)(value as SqliteCategory).ID; ++ string command = String.Format("UPDATE Tasks set Category='{0}' where ID='{1}'", category, id); + backend.Database.ExecuteScalar(command); + backend.UpdateTask(this); + } +@@ -166,7 +171,7 @@ namespace Tasque.Backends.Sqlite + int taskId = dataReader.GetInt32(0); + string text = dataReader.GetString(1); + notes.Add (new SqliteNote (taskId, text)); +- } ++ } + + return notes; + } +-- +cgit v0.9.0.2 diff --git a/app-misc/tasque/tasque-0.1.9.ebuild b/app-misc/tasque/tasque-0.1.9.ebuild index fc4a59253181..8b0446bdc970 100644 --- a/app-misc/tasque/tasque-0.1.9.ebuild +++ b/app-misc/tasque/tasque-0.1.9.ebuild @@ -1,10 +1,10 @@ -# Copyright 1999-2011 Gentoo Foundation +# Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-misc/tasque/tasque-0.1.9.ebuild,v 1.4 2011/05/11 19:24:16 angelos Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-misc/tasque/tasque-0.1.9.ebuild,v 1.5 2012/05/29 18:50:55 suka Exp $ -EAPI=2 +EAPI="3" -inherit gnome.org mono +inherit eutils gnome.org mono DESCRIPTION="Tasky is a simple task management app (TODO list) for the Linux Desktop" HOMEPAGE="http://live.gnome.org/Tasque" @@ -12,14 +12,13 @@ HOMEPAGE="http://live.gnome.org/Tasque" LICENSE="MIT" SLOT="0" KEYWORDS="amd64 x86" -IUSE="+rememberthemilk eds +sqlite hiveminder debug" +IUSE="+rememberthemilk +sqlite hiveminder debug" RDEPEND=">=dev-dotnet/gtk-sharp-2.12.7-r5 >=dev-dotnet/gnome-sharp-2.24.0 >=dev-dotnet/notify-sharp-0.4.0_pre20080912 >=dev-dotnet/ndesk-dbus-0.6 >=dev-dotnet/ndesk-dbus-glib-0.4 - eds? ( >=dev-dotnet/evolution-sharp-0.18.1 ) sqlite? ( dev-db/sqlite:3 ) " @@ -27,14 +26,13 @@ DEPEND="${RDEPEND}" pkg_setup() { BACKEND=false - for usef in eds sqlite hiveminder rememberthemilk + for usef in sqlite hiveminder rememberthemilk do use $usef && BACKEND=true done if [[ "${BACKEND}" != "true" ]] then eerror "You must select one of the following backends by enabling their useflag:" - eerror "eds ( integrates with the evolution schedule )" eerror "sqlite ( uses a local, file-backed database to keep track of your TODO list )" eerror "rememberthemilk ( integrates with www.rememberthemilk.com )" eerror "hiveminder ( integrates with www.hiveminder.com )" @@ -42,14 +40,21 @@ pkg_setup() { fi } +src_prepare() { + + # upstream patch to increase performance, in next release + epatch "${FILESDIR}/${P}-cachetasks.patch" + +} + src_configure() { #http://bugzilla.gnome.org/show_bug.cgi?id=568910 export GTK_DOTNET_20_LIBS=" " \ GTK_DOTNET_20_CFLAGS=" " econf --disable-backend-icecore \ + --disable-backend-eds \ --enable-backend-rtm \ $(use_enable sqlite backend-sqlite) \ - $(use_enable eds backend-eds) \ $(use_enable hiveminder backend-hiveminder) \ $(use_enable debug) } |