Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master grimoire by Vlad Glagolev (bdcd0a477d0245b49fbd4f830372e9184e8239c9)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Vlad Glagolev <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master grimoire by Vlad Glagolev (bdcd0a477d0245b49fbd4f830372e9184e8239c9)
  • Date: Fri, 11 Jul 2014 08:46:07 -0500

GIT changes to master grimoire by Vlad Glagolev <stealth AT sourcemage.org>:

mail/gnarwl/CONFIGURE | 7 +++++++
mail/gnarwl/HISTORY | 6 ++++++
mail/gnarwl/PRE_BUILD | 4 ++++
mail/gnarwl/time.patch | 22 ++++++++++++++++++++++
4 files changed, 39 insertions(+)

New commits:
commit bdcd0a477d0245b49fbd4f830372e9184e8239c9
Author: Vlad Glagolev <stealth AT sourcemage.org>
Commit: Vlad Glagolev <stealth AT sourcemage.org>

gnarwl: added optional patch to allow usage of $time variable that
returns current time in days since 1 Jan 1970

diff --git a/mail/gnarwl/CONFIGURE b/mail/gnarwl/CONFIGURE
new file mode 100755
index 0000000..d238233
--- /dev/null
+++ b/mail/gnarwl/CONFIGURE
@@ -0,0 +1,7 @@
+message "${MESSAGE_COLOR}"
+message "The following option is useful in query filter with vacationStart
and"
+message "vacationEnd attributes. It gives a number of days since Unix Epoch"
+message "(1 January 1970)."
+message "${DEFAULT_COLOR}" &&
+
+config_query GNARWL_TIME "Do you want to patch in support for expansion of
time variable?" n
diff --git a/mail/gnarwl/HISTORY b/mail/gnarwl/HISTORY
index db6860d..19ee57a 100644
--- a/mail/gnarwl/HISTORY
+++ b/mail/gnarwl/HISTORY
@@ -1,2 +1,8 @@
+2014-07-11 Vlad Glagolev <stealth AT sourcemage.org>
+ * CONFIGURE: added, for patch option
+ * PRE_BUILD: apply patch
+ * time.patch: added, to allow usage of $time variable that returns
+ current time in days since 1 Jan 1970
+
2014-02-03 Vlad Glagolev <stealth AT sourcemage.org>
* DEPENDS, DETAILS, {PRE_,}BUILD, INSTALL, excluded: spell created
diff --git a/mail/gnarwl/PRE_BUILD b/mail/gnarwl/PRE_BUILD
index 9129419..6d9eaf1 100755
--- a/mail/gnarwl/PRE_BUILD
+++ b/mail/gnarwl/PRE_BUILD
@@ -1,6 +1,10 @@
default_pre_build &&
cd "$SOURCE_DIRECTORY" &&

+if [[ $GNARWL_TIME == y ]]; then
+ patch -p0 < "$SPELL_DIRECTORY/time.patch"
+fi &&
+
# use custom CFLAGS
sedit "s:-g -Wall -O2:$CFLAGS:" Makefile.in &&

diff --git a/mail/gnarwl/time.patch b/mail/gnarwl/time.patch
new file mode 100644
index 0000000..c81c194
--- /dev/null
+++ b/mail/gnarwl/time.patch
@@ -0,0 +1,22 @@
+--- src/dbaccess.c.orig 2009-02-22 23:27:00.000000000 +0400
++++ src/dbaccess.c 2014-07-11 15:13:43.122741657 +0400
+@@ -216,14 +216,19 @@
+ char **entry;
+ char **retbuf;
+ int i;
++ time_t seconds;
++ char days[sizeof(seconds)];
+
+ maxwait.tv_sec=LDAPQUERY_MAXWAIT;
+ maxwait.tv_usec=0;
++ seconds = time(NULL);
+
+
+ cpyStr(&tmp,cfg.qfilter);
+ expandVars(&tmp,cfg.map_receiver,(char*)mail);
+ expandVars(&tmp,cfg.map_sender,sender);
++ sprintf(days, "%d", seconds/(60*60*24));
++ expandVars(&tmp,"$time", days);
+
+
i=ldap_search_st(ldcon,cfg.base,cfg.scope,tmp,cfg.macro_attr,0,&maxwait,&res);
+ if (i!=LDAP_SUCCESS) {



  • [SM-Commit] GIT changes to master grimoire by Vlad Glagolev (bdcd0a477d0245b49fbd4f830372e9184e8239c9), Vlad Glagolev, 07/11/2014

Archive powered by MHonArc 2.6.24.

Top of Page