Making task juggler build.

I also change the nixpkgs attribute name to one I like more.

svn path=/nixpkgs/trunk/; revision=26590

+62 -4
+13 -3
pkgs/applications/misc/taskjuggler/default.nix
··· 5 }: 6 7 stdenv.mkDerivation rec { 8 - name = "taskjuggler-2.4.1"; 9 src = fetchurl { 10 url = "http://www.taskjuggler.org/download/${name}.tar.bz2"; 11 - md5 = "18e0cec8b2ec69220ae7c9a790c16819"; 12 }; 13 14 buildInputs = 15 [zlib libpng libX11 libXext libSM libICE perl expat] 16 ++ (if withKde then [kdelibs] else []) 17 ; 18 19 preConfigure = '' 20 for i in $(grep -R "/bin/bash" . | sed 's/:.*//'); do ··· 34 for i in Examples/FirstProject/AccountingSoftware.tjp; do 35 substituteInPlace $i --replace "icalreport" "# icalreport" 36 done 37 ''; 38 39 configureFlags = " ··· 41 --x-includes=${libX11}/include 42 --x-libraries=${libX11}/lib 43 --with-qt-dir=${qt} 44 - --with-kde-support=${if withKde then "yes" else "no"} 45 "; 46 47 preInstall = ''
··· 5 }: 6 7 stdenv.mkDerivation rec { 8 + name = "taskjuggler-2.4.3"; 9 src = fetchurl { 10 url = "http://www.taskjuggler.org/download/${name}.tar.bz2"; 11 + sha256 = "14gkxa2vwfih5z7fffbavps7m44z5bq950qndigw2icam5ks83jl"; 12 }; 13 14 buildInputs = 15 [zlib libpng libX11 libXext libSM libICE perl expat] 16 ++ (if withKde then [kdelibs] else []) 17 ; 18 + 19 + patches = [ ./timezone-glibc.patch ]; 20 21 preConfigure = '' 22 for i in $(grep -R "/bin/bash" . | sed 's/:.*//'); do ··· 36 for i in Examples/FirstProject/AccountingSoftware.tjp; do 37 substituteInPlace $i --replace "icalreport" "# icalreport" 38 done 39 + 40 + for i in TestSuite/testdir TestSuite/createrefs \ 41 + TestSuite/Scheduler/Correct/Expression.sh; do 42 + substituteInPlace $i --replace '/bin/rm' 'rm' 43 + done 44 + 45 + # Some tests require writing at $HOME 46 + HOME=$TMPDIR 47 ''; 48 49 configureFlags = " ··· 51 --x-includes=${libX11}/include 52 --x-libraries=${libX11}/lib 53 --with-qt-dir=${qt} 54 + --with-kde-support=${if withKde then "yes" else "no"} --with-ical-support=${if withKde then "yes" else "no"} 55 "; 56 57 preInstall = ''
+48
pkgs/applications/misc/taskjuggler/timezone-glibc.patch
···
··· 1 + From the discussion in http://groups.google.com/group/taskjuggler-users/browse_thread/thread/f65a3efd4dcae2fc/a44c711a9d28ebee?show_docid=a44c711a9d28ebee 2 + 3 + From: Chris Schlaeger <cs@kde.org> 4 + Date: Sat, 27 Feb 2010 06:33:35 +0000 (+0100) 5 + Subject: Try to fix time zone check for glibc 2.11. 6 + X-Git-Url: http://www.taskjuggler.org/cgi-bin/gitweb.cgi?p=taskjuggler.git;a=commitdiff_plain;h=2382ed54f90c3c899badb3f56aaa2b3b5dba361e;hp=c666c5068312fec7db75e17d1c567d94127d1dda 7 + 8 + Try to fix time zone check for glibc 2.11. 9 + 10 + Reported-by: Lee <pFQh8RQn4fqB@dyweni.com> 11 + --- 12 + 13 + diff --git a/taskjuggler/Utility.cpp b/taskjuggler/Utility.cpp 14 + index 5e2bf21..9b7fce2 100644 15 + --- a/taskjuggler/Utility.cpp 16 + +++ b/taskjuggler/Utility.cpp 17 + @@ -206,16 +206,28 @@ setTimezone(const char* tZone) 18 + 19 + /* To validate the tZone value we call tzset(). It will convert the zone 20 + * into a three-letter acronym in case the tZone value is good. If not, it 21 + - * will just copy the wrong value to tzname[0] (glibc < 2.5) or fall back 22 + - * to UTC. */ 23 + + * will 24 + + * - copy the wrong value to tzname[0] (glibc < 2.5) 25 + + * - or fall back to UTC (glibc >= 2.5 && < 2.11) 26 + + * - copy the part before the '/' to tzname[0] (glibc >= 2.11). 27 + + */ 28 + tzset(); 29 + + char* region = new(char[strlen(tZone) + 1]); 30 + + region[0] = 0; 31 + + if (strchr(tZone, '/')) 32 + + { 33 + + strcpy(region, tZone); 34 + + *strchr(region, '/') = 0; 35 + + } 36 + if (timezone2tz(tZone) == 0 && 37 + - (strcmp(tzname[0], tZone) == 0 || 38 + + (strcmp(tzname[0], tZone) == 0 || strcmp(tzname[0], region) == 0 || 39 + (strcmp(tZone, "UTC") != 0 && strcmp(tzname[0], "UTC") == 0))) 40 + { 41 + UtilityError = QString(i18n("Illegal timezone '%1'")).arg(tZone); 42 + + delete region; 43 + return false; 44 + } 45 + + delete region; 46 + 47 + if (!LtHashTab) 48 + return true;
+1 -1
pkgs/top-level/all-packages.nix
··· 6739 6740 teamspeak_client = callPackage ../applications/networking/instant-messengers/teamspeak/client.nix { }; 6741 6742 - taskJuggler = callPackage ../applications/misc/taskjuggler { 6743 qt = qt3; 6744 6745 # KDE support is not working yet.
··· 6739 6740 teamspeak_client = callPackage ../applications/networking/instant-messengers/teamspeak/client.nix { }; 6741 6742 + taskjuggler = callPackage ../applications/misc/taskjuggler { 6743 qt = qt3; 6744 6745 # KDE support is not working yet.