ical under RH9

Robrt on 2003-04-28T05:22:53

Ical, the Tcl/Tk based calendar application written by Sanjay Ghemawat (who seems to have dissapeared off the face of the internet), is revered by it's users. Sadly, it doesn't compile out of the box on RH9.

Here's some useful instructions/notes.:

  1. ./configure --with-tclconfig=/usr/lib
  2. This isn't strictly necessary. You can do more complex things above instead... but this is so much simpler:
    [root@bear root]# cd /usr/lib
    [root@bear lib]# ln -s ../share/tcl8.3/ .
    [root@bear lib]# cd ..
    [root@bear lib]# ln -s ../share/tk8.3/ .
  3. And the all important patches.
    diff -u ical-2.2.1a/cal_tcl.C ical-2.2.1a-fixed/cal_tcl.C
    --- ical-2.2.1a/cal_tcl.C 1995-07-06 08:48:16.000000000 -0700
    +++ ical-2.2.1a-fixed/cal_tcl.C 2003-04-27 19:53:52.000000000 -0700
    @@ -516,7 +516,7 @@
    TCL_Error(tcl, "no such calendar");
    }

    - TCL_Return(tcl, file->GetCalendar()->ReadOnly() ? "1" : "0");
    + TCL_Return(tcl, (char*)(file->GetCalendar()->ReadOnly() ? "1" : "0"));
    }

    static int cal_dirty(ClientData c, Tcl_Interp* tcl, int argc, char* argv[]){
    @@ -527,7 +527,7 @@
    TCL_Error(tcl, "no such calendar");
    }

    - TCL_Return(tcl, (file->IsModified() ? "1" : "0"));
    + TCL_Return(tcl, (char*)(file->IsModified() ? "1" : "0"));
    }

    static int cal_stale(ClientData c, Tcl_Interp* tcl, int argc, char* argv[]){
    @@ -538,7 +538,7 @@
    TCL_Error(tcl, "no such calendar");
    }

    - TCL_Return(tcl, (file->FileHasChanged() ? "1" : "0"));
    + TCL_Return(tcl, (char*)(file->FileHasChanged() ? "1" : "0"));
    }

    static int cal_save(ClientData c, Tcl_Interp* tcl, int argc, char* argv[]){


    --- ical-2.2.1a/item_tcl.C 1996-08-01 12:25:10.000000000 -0700
    +++ ical-2.2.1a-fixed/item_tcl.C 2003-04-27 19:56:08.000000000 -0700
    @@ -329,7 +329,7 @@

    static int item_owned(ClientData c, Tcl_Interp* tcl, int argc, char* argv[]) {
    Item_Tcl* item = (Item_Tcl*) c;
    - TCL_Return(tcl, (item->value()->IsMine() ? "1" : "0"));
    + TCL_Return(tcl, (char*)(item->value()->IsMine() ? "1" : "0"));
    }

    static int item_own(ClientData c, Tcl_Interp* tcl, int argc, char* argv[]) {
    @@ -492,12 +492,12 @@

    static int item_empty(ClientData c, Tcl_Interp* tcl, int argc, char* argv[]) {
    Item_Tcl* item = (Item_Tcl*) c;
    - TCL_Return(tcl, (item->value()->empty()?"1":"0"));
    + TCL_Return(tcl, (char*)(item->value()->empty()?"1":"0"));
    }

    static int item_repeat(ClientData c, Tcl_Interp* tcl, int argc, char* argv[]) {
    Item_Tcl* item = (Item_Tcl*) c;
    - TCL_Return(tcl,(item->value()->repeats()?"1":"0"));
    + TCL_Return(tcl,(char*)(item->value()->repeats()?"1":"0"));
    }

    static int item_first(ClientData c, Tcl_Interp* tcl, int argc, char* argv[]) {
    @@ -576,7 +576,7 @@
    TCL_Error(tcl, "invalid date");
    }
    Date date(dateDays);
    - TCL_Return(tcl, (item->value()->contains(date)?"1":"0"));
    + TCL_Return(tcl, (char*)(item->value()->contains(date)?"1":"0"));
    }

    static int item_next(ClientData c, Tcl_Interp* tcl, int argc, char* argv[]) {

  4. edit makefile, remove duplicate -liiie

    Type make, and ical is back.