diff options
author | markd <markd@pkgsrc.org> | 2006-07-24 12:43:40 +0000 |
---|---|---|
committer | markd <markd@pkgsrc.org> | 2006-07-24 12:43:40 +0000 |
commit | cc1ba1f68d5f5173987b0d3562e1b7f7d8a97efd (patch) | |
tree | 270c9581dd2d0c8f5509cb47e3b2a3f38bb4f85a /misc | |
parent | b1544cc592474be85356216e07483c0fb448b47a (diff) | |
download | pkgsrc-cc1ba1f68d5f5173987b0d3562e1b7f7d8a97efd.tar.gz |
In korganiser use the KTimezone class rather than trying to deal with
timezones itself as that works on more systems.
Bump PKGREVISION
Diffstat (limited to 'misc')
-rw-r--r-- | misc/kdepim3/Makefile | 3 | ||||
-rw-r--r-- | misc/kdepim3/distinfo | 4 | ||||
-rw-r--r-- | misc/kdepim3/patches/patch-ao | 107 | ||||
-rw-r--r-- | misc/kdepim3/patches/patch-ap | 35 |
4 files changed, 147 insertions, 2 deletions
diff --git a/misc/kdepim3/Makefile b/misc/kdepim3/Makefile index db3dd0acb69..14c36697d65 100644 --- a/misc/kdepim3/Makefile +++ b/misc/kdepim3/Makefile @@ -1,6 +1,7 @@ -# $NetBSD: Makefile,v 1.63 2006/06/01 14:04:00 markd Exp $ +# $NetBSD: Makefile,v 1.64 2006/07/24 12:43:40 markd Exp $ DISTNAME= kdepim-${_KDE_VERSION} +PKGREVISION= 1 CATEGORIES= misc COMMENT= Personal Information Management tools for the KDE desktop diff --git a/misc/kdepim3/distinfo b/misc/kdepim3/distinfo index b17a33efb09..69b043e81ba 100644 --- a/misc/kdepim3/distinfo +++ b/misc/kdepim3/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.44 2006/07/15 21:04:07 markd Exp $ +$NetBSD: distinfo,v 1.45 2006/07/24 12:43:40 markd Exp $ SHA1 (kdepim-3.5.3.tar.bz2) = c957fffefaa73e8be670b2a2d639b82205fe5309 RMD160 (kdepim-3.5.3.tar.bz2) = fdd951d6c117246f170986d944d3d61c094e9a00 @@ -12,3 +12,5 @@ SHA1 (patch-ak) = cac11150a708f2f4258b9371f9aaa72b133a821d SHA1 (patch-al) = 723424b7c39c5e0e0899b340a30e5a3f32c90a6a SHA1 (patch-am) = 29066a35ac983764a8cfa9392b9d67df581b35d3 SHA1 (patch-an) = cb4cacc1e8ad1f3c5e4103149243829047ce94fe +SHA1 (patch-ao) = f3760617e77fe74d80733613a18905971ee4c5f9 +SHA1 (patch-ap) = be70d56c66e3956a969f6d858947d83082ae2673 diff --git a/misc/kdepim3/patches/patch-ao b/misc/kdepim3/patches/patch-ao new file mode 100644 index 00000000000..f3cf9bae723 --- /dev/null +++ b/misc/kdepim3/patches/patch-ao @@ -0,0 +1,107 @@ +$NetBSD: patch-ao,v 1.1 2006/07/24 12:43:40 markd Exp $ + +--- korganizer/koprefsdialog.cpp.orig 2005-09-10 20:24:47.000000000 +1200 ++++ korganizer/koprefsdialog.cpp +@@ -75,6 +75,7 @@ + #include "stdcalendar.h" + #include <kdepimmacros.h> + ++#include <ktimezones.h> + + KOPrefsDialogMain::KOPrefsDialogMain( QWidget *parent, const char *name ) + : KPrefsModule( KOPrefs::instance(), parent, name ) +@@ -169,67 +170,25 @@ class KOPrefsDialogTime : public KPrefsM + connect( mTimeZoneCombo, SIGNAL( activated( int ) ), + SLOT( slotWidChanged() ) ); + +- FILE *f; +- char tempstring[101] = "Unknown"; +- QString sCurrentlySet(i18n("Unknown")); ++ KTimezones *db; ++ const KTimezone *sCurrentlySet; + int nCurrentlySet = 0; + QStringList list; + ++ db = new KTimezones(); + // read the currently set time zone +- #if defined(USE_SOLARIS) // MARCO +- char buf[MAXPATHLEN]; +- +- snprintf(buf, MAXPATHLEN, +- "/bin/fgrep 'TZ=' %s | /bin/head -n 1 | /bin/cut -b 4-", +- INITFILE); +- +- if (f = popen(buf, "r")) +- { +- if (fgets(buf, MAXPATHLEN - 1, f) != NULL) +- { +- buf[strlen(buf) - 1] = '\0'; +- sCurrentlySet = QString(buf); +- } +- pclose(f); +- } +- #else +- if((f = fopen("/etc/timezone", "r")) != NULL) { +- // get the currently set timezone +- fgets(tempstring, 100, f); +- tempstring[strlen(tempstring) - 1] = '\0'; +- sCurrentlySet = QString(tempstring); +- fclose(f); +- } +- #endif // !USE_SOLARIS ++ sCurrentlySet = db->local(); + + mTimeZoneCombo->insertItem(i18n("[No selection]")); + + // Read all system time zones +- #if defined(USE_SOLARIS) // MARCO +- snprintf(buf, MAXPATHLEN, +- "/bin/find %s \\( -name src -prune \\) -o -type f -print | /bin/cut -b %d-", +- ZONEINFODIR, strlen(ZONEINFODIR) + 2); +- +- if (f = popen(buf, "r")) +- { +- while(fgets(buf, MAXPATHLEN - 1, f) != NULL) +- { +- buf[strlen(buf) - 1] = '\0'; +- list.append(buf); +- } +- pclose(f); +- } +- +- #else +- f = popen("grep -e ^[^#] /usr/share/zoneinfo/zone.tab | cut -f 3","r"); +- if (!f) return; +- while(fgets(tempstring, 100, f) != NULL) { +- tempstring[strlen(tempstring)-1] = '\0'; +- list.append(i18n(tempstring)); +- tzonenames << tempstring; ++ const KTimezones::ZoneMap zones = db->allZones(); ++ for (KTimezones::ZoneMap::ConstIterator it = zones.begin(); it != zones.end(); ++it) ++ { ++ const KTimezone *zone = it.data(); ++ list.append(zone->name()); ++ tzonenames << zone->name(); + } +- pclose(f); +- #endif // !USE_SOLARIS + list.sort(); + + mTimeZoneCombo->insertStringList(list); +@@ -237,7 +196,7 @@ class KOPrefsDialogTime : public KPrefsM + // find the currently set time zone and select it + for ( int i = 0; i < mTimeZoneCombo->count(); ++i ) + { +- if (mTimeZoneCombo->text(i) == sCurrentlySet) ++ if (mTimeZoneCombo->text(i) == sCurrentlySet->name()) + { + nCurrentlySet = i; + break; +@@ -246,6 +205,7 @@ class KOPrefsDialogTime : public KPrefsM + + mTimeZoneCombo->setCurrentItem(nCurrentlySet); + QWhatsThis::add( mTimeZoneCombo, whatsThis ); ++ delete db; + + // holiday region selection + QHBox *holidayRegBox = new QHBox( topFrame ); diff --git a/misc/kdepim3/patches/patch-ap b/misc/kdepim3/patches/patch-ap new file mode 100644 index 00000000000..a57d6610601 --- /dev/null +++ b/misc/kdepim3/patches/patch-ap @@ -0,0 +1,35 @@ +$NetBSD: patch-ap,v 1.1 2006/07/24 12:43:40 markd Exp $ + +--- korganizer/koprefs.cpp.orig 2006-01-20 05:56:37.000000000 +1300 ++++ korganizer/koprefs.cpp +@@ -41,6 +41,7 @@ + #include <kemailsettings.h> + #include <kstaticdeleter.h> + #include <kstringhandler.h> ++#include <ktimezones.h> + + #include "koprefs.h" + #include <libkpimidentities/identitymanager.h> +@@ -145,17 +146,12 @@ void KOPrefs::fillMailDefaults() + void KOPrefs::setTimeZoneIdDefault() + { + QString zone; ++ KTimezones *db; + +- char zonefilebuf[100]; +- int len = readlink("/etc/localtime",zonefilebuf,100); +- if (len > 0 && len < 100) { +- zonefilebuf[len] = '\0'; +- zone = zonefilebuf; +- zone = zone.mid(zone.find("zoneinfo/") + 9); +- } else { +- tzset(); +- zone = tzname[0]; +- } ++ db = new KTimezones(); ++ ++ zone = (db->local())->name(); ++ delete db; + + kdDebug () << "----- time zone: " << zone << endl; + |