about summary refs log tree commit diff
path: root/pkgs/applications/misc/taskjuggler
diff options
context:
space:
mode:
authorLluís Batlle i Rossell <viric@vicerveza.homeunix.net>2011-03-29 08:34:12 +0000
committerLluís Batlle i Rossell <viric@vicerveza.homeunix.net>2011-03-29 08:34:12 +0000
commitd73765b161737734a14caaa7eaade9ceddf9c7af (patch)
treeb8223f699b22075679a4e928b4f64dc0bfe92ccd /pkgs/applications/misc/taskjuggler
parentf9c356ad17c9d3c0d21eebb090f1559fcfe48d27 (diff)
downloadnixlib-d73765b161737734a14caaa7eaade9ceddf9c7af.tar
nixlib-d73765b161737734a14caaa7eaade9ceddf9c7af.tar.gz
nixlib-d73765b161737734a14caaa7eaade9ceddf9c7af.tar.bz2
nixlib-d73765b161737734a14caaa7eaade9ceddf9c7af.tar.lz
nixlib-d73765b161737734a14caaa7eaade9ceddf9c7af.tar.xz
nixlib-d73765b161737734a14caaa7eaade9ceddf9c7af.tar.zst
nixlib-d73765b161737734a14caaa7eaade9ceddf9c7af.zip
Making task juggler build.
I also change the nixpkgs attribute name to one I like more.

svn path=/nixpkgs/trunk/; revision=26590
Diffstat (limited to 'pkgs/applications/misc/taskjuggler')
-rw-r--r--pkgs/applications/misc/taskjuggler/default.nix16
-rw-r--r--pkgs/applications/misc/taskjuggler/timezone-glibc.patch48
2 files changed, 61 insertions, 3 deletions
diff --git a/pkgs/applications/misc/taskjuggler/default.nix b/pkgs/applications/misc/taskjuggler/default.nix
index 3812f7edd972..92912f041144 100644
--- a/pkgs/applications/misc/taskjuggler/default.nix
+++ b/pkgs/applications/misc/taskjuggler/default.nix
@@ -5,10 +5,10 @@ withKde, kdelibs, kdebase
 }:
 
 stdenv.mkDerivation rec {
-  name = "taskjuggler-2.4.1";
+  name = "taskjuggler-2.4.3";
   src = fetchurl {
     url = "http://www.taskjuggler.org/download/${name}.tar.bz2";
-    md5 = "18e0cec8b2ec69220ae7c9a790c16819";
+    sha256 = "14gkxa2vwfih5z7fffbavps7m44z5bq950qndigw2icam5ks83jl";
   };
 
   buildInputs =
@@ -16,6 +16,8 @@ stdenv.mkDerivation rec {
     ++ (if withKde then [kdelibs] else [])
     ;
 
+  patches = [ ./timezone-glibc.patch ];
+
   preConfigure = ''
     for i in $(grep -R "/bin/bash" .  | sed 's/:.*//'); do
       substituteInPlace $i --replace /bin/bash $(type -Pp bash)
@@ -34,6 +36,14 @@ stdenv.mkDerivation rec {
     for i in Examples/FirstProject/AccountingSoftware.tjp; do
       substituteInPlace $i --replace "icalreport" "# icalreport"
     done
+
+    for i in TestSuite/testdir TestSuite/createrefs \
+      TestSuite/Scheduler/Correct/Expression.sh; do
+      substituteInPlace $i --replace '/bin/rm' 'rm'
+    done
+
+    # Some tests require writing at $HOME
+    HOME=$TMPDIR
   '';
 
   configureFlags = "
@@ -41,7 +51,7 @@ stdenv.mkDerivation rec {
     --x-includes=${libX11}/include
     --x-libraries=${libX11}/lib
     --with-qt-dir=${qt}
-    --with-kde-support=${if withKde then "yes" else "no"}
+    --with-kde-support=${if withKde then "yes" else "no"} --with-ical-support=${if withKde then "yes" else "no"}
   ";
 
   preInstall = ''
diff --git a/pkgs/applications/misc/taskjuggler/timezone-glibc.patch b/pkgs/applications/misc/taskjuggler/timezone-glibc.patch
new file mode 100644
index 000000000000..f599e8a1730c
--- /dev/null
+++ b/pkgs/applications/misc/taskjuggler/timezone-glibc.patch
@@ -0,0 +1,48 @@
+From the discussion in http://groups.google.com/group/taskjuggler-users/browse_thread/thread/f65a3efd4dcae2fc/a44c711a9d28ebee?show_docid=a44c711a9d28ebee
+
+From: Chris Schlaeger <cs@kde.org>
+Date: Sat, 27 Feb 2010 06:33:35 +0000 (+0100)
+Subject: Try to fix time zone check for glibc 2.11.
+X-Git-Url: http://www.taskjuggler.org/cgi-bin/gitweb.cgi?p=taskjuggler.git;a=commitdiff_plain;h=2382ed54f90c3c899badb3f56aaa2b3b5dba361e;hp=c666c5068312fec7db75e17d1c567d94127d1dda
+
+Try to fix time zone check for glibc 2.11.
+
+Reported-by: Lee <pFQh8RQn4fqB@dyweni.com>
+---
+
+diff --git a/taskjuggler/Utility.cpp b/taskjuggler/Utility.cpp
+index 5e2bf21..9b7fce2 100644
+--- a/taskjuggler/Utility.cpp
++++ b/taskjuggler/Utility.cpp
+@@ -206,16 +206,28 @@ setTimezone(const char* tZone)
+ 
+     /* To validate the tZone value we call tzset(). It will convert the zone
+      * into a three-letter acronym in case the tZone value is good. If not, it
+-     * will just copy the wrong value to tzname[0] (glibc < 2.5) or fall back
+-     * to UTC. */
++     * will
++     * - copy the wrong value to tzname[0] (glibc < 2.5)
++     * - or fall back to UTC (glibc >= 2.5 && < 2.11)
++     * - copy the part before the '/' to tzname[0] (glibc >= 2.11).
++     */
+     tzset();
++    char* region = new(char[strlen(tZone) + 1]);
++    region[0] = 0;
++    if (strchr(tZone, '/'))
++    {
++        strcpy(region, tZone);
++        *strchr(region, '/') = 0;
++    }
+     if (timezone2tz(tZone) == 0 &&
+-        (strcmp(tzname[0], tZone) == 0 ||
++        (strcmp(tzname[0], tZone) == 0 || strcmp(tzname[0], region) == 0 ||
+          (strcmp(tZone, "UTC") != 0 && strcmp(tzname[0], "UTC") == 0)))
+     {
+         UtilityError = QString(i18n("Illegal timezone '%1'")).arg(tZone);
++        delete region;
+         return false;
+     }
++    delete region;
+ 
+     if (!LtHashTab)
+         return true;