summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--community-staging/cegui/PKGBUILD43
-rw-r--r--community-staging/clementine/PKGBUILD35
-rw-r--r--community-staging/clementine/clementine-0.7.1-fix-devicekit.patch11
-rw-r--r--community-staging/clementine/clementine.install12
-rw-r--r--community-staging/ekg2/PKGBUILD39
-rw-r--r--community-staging/frogatto/PKGBUILD4
-rw-r--r--community-staging/gource/PKGBUILD28
-rw-r--r--community-staging/lightspark/PKGBUILD2
-rw-r--r--community-staging/perl-dbd-odbc/PKGBUILD33
-rw-r--r--community-staging/perl-dbd-pg/PKGBUILD32
-rw-r--r--community-staging/perl-dbd-sqlite2/PKGBUILD31
-rw-r--r--community-staging/perl-dbd-sybase/PKGBUILD33
-rw-r--r--community-staging/root/PKGBUILD78
-rw-r--r--community-staging/root/root.desktop12
-rw-r--r--community-staging/root/root.install17
-rw-r--r--community-staging/root/root.sh5
-rw-r--r--community-staging/root/root.xml11
-rwxr-xr-xcommunity-staging/root/rootd37
-rw-r--r--community-staging/sfml/PKGBUILD60
-rw-r--r--community-staging/sfml/sfml.install3
-rw-r--r--community-staging/sfml/use-system-libs.patch70
-rw-r--r--community-staging/spring/PKGBUILD4
-rw-r--r--community-staging/spring/gcc46.patch67
-rw-r--r--community-staging/supertux/PKGBUILD30
-rw-r--r--community-staging/supertux/compile.patch67
-rw-r--r--community-staging/supertux/gcc44.patch90
-rw-r--r--community-staging/vdrift/PKGBUILD66
-rw-r--r--community-staging/vdrift/vdrift.desktop11
-rw-r--r--community-staging/widelands/PKGBUILD48
-rw-r--r--community-staging/widelands/widelands-build15-gcc-4.5-patch51
-rw-r--r--community-staging/widelands/widelands.desktop8
-rw-r--r--community-staging/widelands/widelands.pngbin0 -> 19494 bytes
-rw-r--r--community-staging/widelands/widelands.sh3
-rw-r--r--community-staging/wml/PKGBUILD42
-rw-r--r--community-staging/znc/PKGBUILD40
-rw-r--r--community-testing/gitg/PKGBUILD33
-rw-r--r--community-testing/gitg/gitg.install17
-rw-r--r--community/cclive/PKGBUILD14
-rw-r--r--community/cherokee/PKGBUILD21
-rw-r--r--community/encfs/PKGBUILD4
-rw-r--r--community/fatrat/PKGBUILD14
-rw-r--r--community/frogatto/PKGBUILD4
-rw-r--r--community/glob2/PKGBUILD8
-rw-r--r--community/glom/PKGBUILD16
-rw-r--r--community/gnash/PKGBUILD6
-rw-r--r--community/gpsdrive/PKGBUILD4
-rw-r--r--community/ibus-anthy/PKGBUILD23
-rw-r--r--community/john/PKGBUILD12
-rw-r--r--community/lightspark/PKGBUILD2
-rw-r--r--community/mapnik/PKGBUILD7
-rw-r--r--community/mongodb/PKGBUILD13
-rw-r--r--community/mongodb/gcc46fixes.diff132
-rw-r--r--community/mongodb/gcc46fixes2.diff26
-rw-r--r--community/ogre/PKGBUILD4
-rw-r--r--community/performous/PKGBUILD6
-rw-r--r--community/pingus/PKGBUILD9
-rw-r--r--community/pokerth/PKGBUILD15
-rw-r--r--community/qbittorrent/PKGBUILD2
-rw-r--r--community/schroot/PKGBUILD16
-rw-r--r--community/smc/PKGBUILD8
-rw-r--r--community/spring/PKGBUILD11
-rw-r--r--community/springlobby/PKGBUILD4
-rw-r--r--community/tagpy/PKGBUILD5
-rw-r--r--community/twinkle/PKGBUILD4
-rw-r--r--extra/akonadi/PKGBUILD4
-rw-r--r--extra/avogadro/PKGBUILD6
-rw-r--r--extra/boost/PKGBUILD8
-rw-r--r--extra/bzr/PKGBUILD13
-rw-r--r--extra/claws-mail/PKGBUILD13
-rw-r--r--extra/claws-mail/claws-notify-crash.patch18
-rw-r--r--extra/ekiga/PKGBUILD4
-rw-r--r--extra/help2man/PKGBUILD7
-rw-r--r--extra/help2man/help2man.install18
-rw-r--r--extra/hugin/PKGBUILD14
-rw-r--r--extra/hugin/hugin-gcc46.patch16
-rw-r--r--extra/kdeedu/PKGBUILD5
-rw-r--r--extra/libftdi/PKGBUILD18
-rw-r--r--extra/liborigin2/PKGBUILD4
-rw-r--r--extra/libpst/PKGBUILD4
-rw-r--r--extra/libtorrent-rasterbar/PKGBUILD4
-rw-r--r--extra/lyx/PKGBUILD11
-rw-r--r--extra/mkvtoolnix/PKGBUILD4
-rw-r--r--extra/neon/PKGBUILD29
-rw-r--r--extra/pidgin/PKGBUILD24
-rw-r--r--extra/pidgin/nm09-more.patch49
-rw-r--r--extra/pidgin/nm09-pidgin.patch38
-rw-r--r--extra/source-highlight/PKGBUILD4
-rw-r--r--extra/vigra/PKGBUILD19
-rw-r--r--extra/vigra/vigra-1.7.1.gcc460.patch33
-rw-r--r--extra/wesnoth/PKGBUILD8
-rw-r--r--kde-unstable/akonadi/PKGBUILD4
-rw-r--r--kde-unstable/kdeaccessibility/PKGBUILD83
-rw-r--r--kde-unstable/kdeaccessibility/kdeaccessibility.install11
-rw-r--r--kde-unstable/kdeadmin/PKGBUILD77
-rw-r--r--kde-unstable/kdeadmin/kdeadmin.install11
-rw-r--r--kde-unstable/kdeadmin/syslog-path.patch11
-rw-r--r--kde-unstable/kdeartwork/PKGBUILD104
-rw-r--r--kde-unstable/kdebase-konsole/PKGBUILD30
-rw-r--r--kde-unstable/kdebase-runtime/PKGBUILD39
-rw-r--r--kde-unstable/kdebase-runtime/kdebase-runtime.install12
-rw-r--r--kde-unstable/kdebase-workspace/PKGBUILD76
-rw-r--r--kde-unstable/kdebase-workspace/fixpath.patch34
-rw-r--r--kde-unstable/kdebase-workspace/kde-np.pam7
-rw-r--r--kde-unstable/kdebase-workspace/kde.pam7
-rw-r--r--kde-unstable/kdebase-workspace/kdebase-workspace.install25
-rw-r--r--kde-unstable/kdebase-workspace/kdm36
-rw-r--r--kde-unstable/kdebase-workspace/kdm-zsh-profile.patch11
-rw-r--r--kde-unstable/kdebase-workspace/kscreensaver.pam1
-rw-r--r--kde-unstable/kdebase-workspace/terminate-server.patch11
-rw-r--r--kde-unstable/kdebase/PKGBUILD117
-rw-r--r--kde-unstable/kdebase/kdebase.install11
-rw-r--r--kde-unstable/kdebindings-kimono/PKGBUILD31
-rw-r--r--kde-unstable/kdebindings-korundum/PKGBUILD32
-rw-r--r--kde-unstable/kdebindings-perlkde/PKGBUILD31
-rw-r--r--kde-unstable/kdebindings-perlqt/PKGBUILD30
-rw-r--r--kde-unstable/kdebindings-python/PKGBUILD41
-rw-r--r--kde-unstable/kdebindings-qtruby/PKGBUILD31
-rw-r--r--kde-unstable/kdebindings-qyoto/PKGBUILD31
-rw-r--r--kde-unstable/kdebindings-smokegen/PKGBUILD30
-rw-r--r--kde-unstable/kdebindings-smokekde/PKGBUILD32
-rw-r--r--kde-unstable/kdebindings-smokeqt/PKGBUILD31
-rw-r--r--kde-unstable/kdeedu-blinken/PKGBUILD31
-rw-r--r--kde-unstable/kdeedu-blinken/kdeedu-blinken.install11
-rw-r--r--kde-unstable/kdeedu-cantor/PKGBUILD31
-rw-r--r--kde-unstable/kdeedu-cantor/kdeedu-cantor.install12
-rw-r--r--kde-unstable/kdeedu-kalgebra/PKGBUILD31
-rw-r--r--kde-unstable/kdeedu-kalgebra/kdeedu-kalgebra.install12
-rw-r--r--kde-unstable/kdeedu-kalzium/PKGBUILD31
-rw-r--r--kde-unstable/kdeedu-kalzium/kdeedu-kalzium.install11
-rw-r--r--kde-unstable/kdeedu-kanagram/PKGBUILD31
-rw-r--r--kde-unstable/kdeedu-kanagram/kdeedu-kanagram.install11
-rw-r--r--kde-unstable/kdeedu-kbruch/PKGBUILD31
-rw-r--r--kde-unstable/kdeedu-kbruch/kdeedu-kbruch.install11
-rw-r--r--kde-unstable/kdeedu-kgeography/PKGBUILD31
-rw-r--r--kde-unstable/kdeedu-kgeography/kdeedu-kgeography.install11
-rw-r--r--kde-unstable/kdeedu-khangman/PKGBUILD31
-rw-r--r--kde-unstable/kdeedu-khangman/kdeedu-khangman.install11
-rw-r--r--kde-unstable/kdeedu-kig/PKGBUILD34
-rw-r--r--kde-unstable/kdeedu-kig/kdeedu-kig.install12
-rw-r--r--kde-unstable/kdeedu-kiten/PKGBUILD31
-rw-r--r--kde-unstable/kdeedu-kiten/kdeedu-kiten.install11
-rw-r--r--kde-unstable/kdeedu-klettres/PKGBUILD31
-rw-r--r--kde-unstable/kdeedu-klettres/kdeedu-klettres.install11
-rw-r--r--kde-unstable/kdeedu-kmplot/PKGBUILD31
-rw-r--r--kde-unstable/kdeedu-kmplot/kdeedu-kmplot.install12
-rw-r--r--kde-unstable/kdeedu-kstars/PKGBUILD32
-rw-r--r--kde-unstable/kdeedu-kstars/kdeedu-kstars.install11
-rw-r--r--kde-unstable/kdeedu-ktouch/PKGBUILD31
-rw-r--r--kde-unstable/kdeedu-ktouch/kdeedu-ktouch.install11
-rw-r--r--kde-unstable/kdeedu-kturtle/PKGBUILD31
-rw-r--r--kde-unstable/kdeedu-kturtle/kdeedu-kturtle.install11
-rw-r--r--kde-unstable/kdeedu-kwordquiz/PKGBUILD31
-rw-r--r--kde-unstable/kdeedu-kwordquiz/kdeedu-kwordquiz.install12
-rw-r--r--kde-unstable/kdeedu-marble/PKGBUILD36
-rw-r--r--kde-unstable/kdeedu-marble/gpsd-2.96.patch41
-rw-r--r--kde-unstable/kdeedu-marble/kdeedu-marble.install12
-rw-r--r--kde-unstable/kdeedu-parley/PKGBUILD31
-rw-r--r--kde-unstable/kdeedu-parley/kdeedu-parley.install12
-rw-r--r--kde-unstable/kdeedu-rocs/PKGBUILD30
-rw-r--r--kde-unstable/kdeedu-step/PKGBUILD31
-rw-r--r--kde-unstable/kdeedu-step/kdeedu-step.install11
-rw-r--r--kde-unstable/kdegames/PKGBUILD514
-rw-r--r--kde-unstable/kdegames/kdegames-kbattleship.install24
-rw-r--r--kde-unstable/kdegames/kdegames-kfourinline.install12
-rw-r--r--kde-unstable/kdegames/kdegames-kigo.install12
-rw-r--r--kde-unstable/kdegames/kdegames-kolf.install12
-rw-r--r--kde-unstable/kdegames/kdegames-kreversi.install22
-rw-r--r--kde-unstable/kdegames/kdegames-kspaceduel.install12
-rw-r--r--kde-unstable/kdegames/kdegames-ksquares.install22
-rw-r--r--kde-unstable/kdegames/kdegames-ktuberling.install12
-rw-r--r--kde-unstable/kdegames/kdegames-lskat.install12
-rw-r--r--kde-unstable/kdegames/kdegames-palapeli.install13
-rw-r--r--kde-unstable/kdegames/kdegames.install11
-rw-r--r--kde-unstable/kdegraphics-gwenview/PKGBUILD31
-rw-r--r--kde-unstable/kdegraphics-gwenview/kdegraphics-gwenview.install12
-rw-r--r--kde-unstable/kdegraphics-kamera/PKGBUILD30
-rw-r--r--kde-unstable/kdegraphics-kcolorchooser/PKGBUILD31
-rw-r--r--kde-unstable/kdegraphics-kcolorchooser/kdegraphics-kcolorchooser.install11
-rw-r--r--kde-unstable/kdegraphics-kgamma/PKGBUILD33
-rw-r--r--kde-unstable/kdegraphics-kolourpaint/PKGBUILD31
-rw-r--r--kde-unstable/kdegraphics-kolourpaint/kdegraphics-kolourpaint.install12
-rw-r--r--kde-unstable/kdegraphics-kruler/PKGBUILD31
-rw-r--r--kde-unstable/kdegraphics-kruler/kdegraphics-kruler.install12
-rw-r--r--kde-unstable/kdegraphics-ksaneplugin/PKGBUILD30
-rw-r--r--kde-unstable/kdegraphics-ksnapshot/PKGBUILD32
-rw-r--r--kde-unstable/kdegraphics-ksnapshot/kdegraphics-ksnapshot.install12
-rw-r--r--kde-unstable/kdegraphics-strigi-analyzer/PKGBUILD30
-rw-r--r--kde-unstable/kdegraphics-svgpart/PKGBUILD30
-rw-r--r--kde-unstable/kdegraphics-thumbnailers/PKGBUILD30
-rw-r--r--kde-unstable/kdegraphics/PKGBUILD39
-rw-r--r--kde-unstable/kdegraphics/kdegraphics-okular.install12
-rw-r--r--kde-unstable/kdelibs/PKGBUILD63
-rw-r--r--kde-unstable/kdelibs/archlinux-menu.patch22
-rw-r--r--kde-unstable/kdelibs/kcalendarsystem-fixed.patch18073
-rw-r--r--kde-unstable/kdelibs/kde-applications-menu.patch22
-rw-r--r--kde-unstable/kdelibs/kdelibs.install13
-rw-r--r--kde-unstable/kdemultimedia/PKGBUILD109
-rw-r--r--kde-unstable/kdemultimedia/kdemultimedia.install11
-rw-r--r--kde-unstable/kdemultimedia/mplayerthumbs.config2
-rw-r--r--kde-unstable/kdenetwork/PKGBUILD114
-rw-r--r--kde-unstable/kdenetwork/kdenetwork.install11
-rw-r--r--kde-unstable/kdepim-runtime/PKGBUILD12
-rw-r--r--kde-unstable/kdepim/PKGBUILD21
-rw-r--r--kde-unstable/kdepim/fix-console-build.patch11
-rw-r--r--kde-unstable/kdepimlibs/PKGBUILD32
-rw-r--r--kde-unstable/kdepimlibs/kdepimlibs.install11
-rw-r--r--kde-unstable/kdeplasma-addons/PKGBUILD603
-rw-r--r--kde-unstable/kdeplasma-addons/kdeplasma-addons-applets-lancelot.install12
-rw-r--r--kde-unstable/kdeplasma-addons/kdeplasma-addons-applets.install11
-rw-r--r--kde-unstable/kdesdk-kate/PKGBUILD58
-rw-r--r--kde-unstable/kdesdk-kate/kdebase-kwrite.install12
-rw-r--r--kde-unstable/kdesdk-kate/kdesdk-kate.install12
-rw-r--r--kde-unstable/kdesdk-kate/pkgbuild-syntax-highlight.patch11
-rw-r--r--kde-unstable/kdesdk/PKGBUILD247
-rw-r--r--kde-unstable/kdesdk/fix-python2-path.patch64
-rw-r--r--kde-unstable/kdesdk/kdesdk-okteta.install12
-rw-r--r--kde-unstable/kdesdk/kdesdk.install11
-rw-r--r--kde-unstable/kdetoys/PKGBUILD56
-rw-r--r--kde-unstable/kdetoys/kdetoys.install11
-rw-r--r--kde-unstable/kdeutils/PKGBUILD180
-rw-r--r--kde-unstable/kdeutils/kdeutils.install11
-rw-r--r--kde-unstable/kdewebdev/PKGBUILD67
-rw-r--r--kde-unstable/kdewebdev/kdewebdev.install11
-rw-r--r--kde-unstable/libkdcraw/PKGBUILD31
-rw-r--r--kde-unstable/libkdcraw/libkdcraw.install11
-rw-r--r--kde-unstable/libkdeedu/PKGBUILD31
-rw-r--r--kde-unstable/libkdeedu/libkdeedu.install11
-rw-r--r--kde-unstable/libkexiv2/PKGBUILD30
-rw-r--r--kde-unstable/libkface/PKGBUILD30
-rw-r--r--kde-unstable/libkipi/PKGBUILD31
-rw-r--r--kde-unstable/libkipi/libkipi.install11
-rw-r--r--kde-unstable/libkmap/PKGBUILD30
-rw-r--r--kde-unstable/libksane/PKGBUILD31
-rw-r--r--kde-unstable/libksane/libksane.install11
-rw-r--r--kde-unstable/qt/PKGBUILD222
-rw-r--r--kde-unstable/qt/assistant.desktop9
-rw-r--r--kde-unstable/qt/designer.desktop11
-rw-r--r--kde-unstable/qt/linguist.desktop10
-rw-r--r--kde-unstable/qt/qt.install12
-rw-r--r--kde-unstable/qt/qtbug-16292.patch62
-rw-r--r--kde-unstable/qt/qtconfig.desktop10
-rw-r--r--staging/claws-mail-extra-plugins/PKGBUILD67
-rw-r--r--staging/claws-mail-extra-plugins/claws-mail-notification-0.26-libnotify-0.7.patch25
-rw-r--r--staging/dvdrip/PKGBUILD40
-rw-r--r--staging/dvdrip/dvdrip.desktop8
-rw-r--r--staging/dvdrip/dvdrip.install19
-rw-r--r--staging/git/ChangeLog53
-rw-r--r--staging/git/PKGBUILD85
-rw-r--r--staging/git/git-daemon70
-rw-r--r--staging/git/git-daemon.conf5
-rw-r--r--staging/glade-perl/PKGBUILD23
-rw-r--r--staging/glew/PKGBUILD29
-rw-r--r--staging/gnome-perl/PKGBUILD23
-rw-r--r--staging/gnome-vfs-perl/PKGBUILD23
-rw-r--r--staging/gnomecanvas-perl/PKGBUILD23
-rw-r--r--staging/gnumeric/PKGBUILD36
-rw-r--r--staging/gnumeric/gnumeric.install26
-rw-r--r--staging/hugin/PKGBUILD40
-rw-r--r--staging/hugin/hugin-gcc46.patch16
-rw-r--r--staging/hugin/hugin.install15
-rw-r--r--staging/irssi/PKGBUILD29
-rw-r--r--staging/libproxy/PKGBUILD41
-rw-r--r--staging/mod_perl/PKGBUILD27
-rw-r--r--staging/net-snmp/PKGBUILD43
-rw-r--r--staging/net-snmp/libnl-2.patch67
-rw-r--r--staging/net-snmp/snmpd.rc38
-rw-r--r--staging/perl-bit-vector/PKGBUILD33
-rw-r--r--staging/perl-crypt-ssleay/PKGBUILD31
-rw-r--r--staging/perl-dbd-mysql/PKGBUILD49
-rw-r--r--staging/perl-dbd-sqlite/PKGBUILD28
-rw-r--r--staging/perl-dbi/PKGBUILD32
-rw-r--r--staging/perl-digest-nilsimsa/PKGBUILD35
-rw-r--r--staging/perl-digest-sha1/PKGBUILD38
-rw-r--r--staging/perl-event/PKGBUILD36
-rw-r--r--staging/perl-fcgi/PKGBUILD31
-rw-r--r--staging/perl-html-parser/PKGBUILD31
-rw-r--r--staging/perl-libintl-perl/PKGBUILD33
-rw-r--r--staging/perl-locale-gettext/PKGBUILD38
-rw-r--r--staging/perl-locale-gettext/compatibility-with-POSIX-module.patch10
-rw-r--r--staging/perl-net-dns/PKGBUILD33
-rw-r--r--staging/perl-net-ssleay/PKGBUILD33
-rw-r--r--staging/perl-net-upnp/PKGBUILD27
-rw-r--r--staging/perl-netaddr-ip/PKGBUILD34
-rw-r--r--staging/perl-template-toolkit/PKGBUILD32
-rw-r--r--staging/perl-term-readkey/PKGBUILD36
-rw-r--r--staging/perl-text-iconv/PKGBUILD28
-rw-r--r--staging/perl-time-hires/PKGBUILD25
-rw-r--r--staging/perl-unicode-string/PKGBUILD33
-rw-r--r--staging/perl-yaml-syck/PKGBUILD37
-rw-r--r--staging/pidgin/PKGBUILD20
-rw-r--r--staging/pidgin/nm09-more.patch49
-rw-r--r--staging/pidgin/nm09-pidgin.patch38
-rw-r--r--staging/postgresql/PKGBUILD141
-rw-r--r--staging/postgresql/build.patch11
-rw-r--r--staging/postgresql/perl-5.14-fix.patch25
-rwxr-xr-xstaging/postgresql/postgresql79
-rw-r--r--staging/postgresql/postgresql.confd5
-rw-r--r--staging/postgresql/postgresql.install22
-rw-r--r--staging/postgresql/postgresql.logrotate4
-rw-r--r--staging/postgresql/postgresql.pam3
-rw-r--r--staging/spamassassin/PKGBUILD54
-rw-r--r--staging/spamassassin/spamassassin.install25
-rw-r--r--staging/spamassassin/spamd49
-rw-r--r--staging/spamassassin/spamd.conf.d1
-rw-r--r--staging/vim/PKGBUILD198
-rw-r--r--staging/vim/archlinux.vim26
-rw-r--r--staging/vim/gvim.desktop42
-rw-r--r--staging/vim/gvim.install13
-rw-r--r--staging/vim/vimrc16
-rw-r--r--staging/weechat/PKGBUILD33
-rw-r--r--testing/gedit/PKGBUILD33
-rw-r--r--testing/gedit/gedit.install18
-rw-r--r--testing/gnome-shell/PKGBUILD50
-rw-r--r--testing/gnome-shell/arch.patch12
-rw-r--r--testing/gnome-shell/bluetoothstatus-always-update-devices.patch132
-rw-r--r--testing/gnome-shell/gnome-shell.install22
-rw-r--r--testing/gnome-shell/shell-recorder-missing-XFree.patch22
-rw-r--r--testing/gtksourceview3/PKGBUILD28
-rw-r--r--testing/mutter/PKGBUILD36
-rw-r--r--testing/mutter/mutter.install17
-rw-r--r--testing/upower/PKGBUILD28
-rw-r--r--testing/xf86-input-wacom/70-wacom.rules8
-rw-r--r--testing/xf86-input-wacom/PKGBUILD31
323 files changed, 28188 insertions, 215 deletions
diff --git a/community-staging/cegui/PKGBUILD b/community-staging/cegui/PKGBUILD
new file mode 100644
index 000000000..36ec36e3b
--- /dev/null
+++ b/community-staging/cegui/PKGBUILD
@@ -0,0 +1,43 @@
+# $Id: PKGBUILD 47894 2011-05-26 00:25:26Z svenstaro $
+# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
+# Contributor: Juergen Hoetzel <juergen@archlinux.org>
+# Contributor: William Rea <sillywilly@gmail.com>,
+# Contributor: Bjorn Lindeijer <bjorn@lindeijer.nl>
+
+pkgname=cegui
+pkgver=0.7.5
+pkgrel=3
+pkgdesc="A free library providing windowing and widgets for graphics APIs/engines"
+arch=('i686' 'x86_64')
+url="http://crayzedsgui.sourceforge.net"
+#options=('!libtool')
+license=("MIT")
+depends=('pcre' 'glew' 'expat' 'freetype2' 'libxml2' 'devil' 'freeglut' 'lua' 'silly')
+makedepends=('python2' 'doxygen')
+source=(http://downloads.sourceforge.net/crayzedsgui/CEGUI-$pkgver.tar.gz)
+md5sums=('38c79d1fdfaaa10f481c99a2ac479516')
+
+build() {
+ cd $srcdir/CEGUI-${pkgver}
+
+ sed -i '1i#include <cstddef>' cegui/include/CEGUIString.h
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --disable-xerces-c \
+ --enable-null-renderer
+
+ make
+}
+
+package() {
+ cd $srcdir/CEGUI-${pkgver}
+
+ make DESTDIR=${pkgdir} install
+
+ #build docs
+ cd doc/doxygen && doxygen
+ cd .. && make DESTDIR=${pkgdir} install-html
+
+ install -Dm644 COPYING ${pkgdir}/usr/share/licenses/$pkgname/LICENSE
+}
+
diff --git a/community-staging/clementine/PKGBUILD b/community-staging/clementine/PKGBUILD
new file mode 100644
index 000000000..c276ec0d6
--- /dev/null
+++ b/community-staging/clementine/PKGBUILD
@@ -0,0 +1,35 @@
+# $Id: PKGBUILD 47879 2011-05-25 20:42:25Z stephane $
+#Maintainer: Stéphane Gaudreault <stephane@archlinux.org>
+#Contributor: BlackEagle < ike DOT devolder AT gmail DOT com >
+#Contributor: Dany Martineau <dany.luc.martineau@gmail.com>
+
+pkgname=clementine
+pkgver=0.7.1
+pkgrel=4
+pkgdesc="A music player and library organizer"
+url="http://www.clementine-player.org/"
+license=('GPL')
+arch=('i686' 'x86_64')
+depends=('gstreamer0.10' 'taglib' 'glew' 'liblastfm' 'libgpod' 'libmtp' 'libplist' 'hicolor-icon-theme' 'qt' 'libimobiledevice')
+makedepends=('cmake' 'boost')
+optdepends=('gstreamer0.10-base-plugins: for more open formats'
+ 'gstreamer0.10-good-plugins: for use with "Good" plugin libraries'
+ 'gstreamer0.10-bad-plugins: for use with "Bad" plugin libraries'
+ 'gstreamer0.10-ugly-plugins: for use with "Ugly" plugin libraries')
+source=(http://clementine-player.googlecode.com/files/${pkgname}-${pkgver}.tar.gz
+ clementine-0.7.1-fix-devicekit.patch)
+sha1sums=('8b2025b8876f9f3fe33ef5001e0621f3a5d0f142'
+ 'd595e2746949363680e0d64fe2fb97b524c8d27c')
+install=clementine.install
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ patch -Np1 -i ../clementine-0.7.1-fix-devicekit.patch
+ cmake . -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -DSTATIC_SQLITE=0 -DENABLE_GIO=OFF
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/community-staging/clementine/clementine-0.7.1-fix-devicekit.patch b/community-staging/clementine/clementine-0.7.1-fix-devicekit.patch
new file mode 100644
index 000000000..797a2c864
--- /dev/null
+++ b/community-staging/clementine/clementine-0.7.1-fix-devicekit.patch
@@ -0,0 +1,11 @@
+diff -Naur clementine-0.7.1.ori/src/config.h.in clementine-0.7.1/src/config.h.in
+--- clementine-0.7.1.ori/src/config.h.in 2011-03-29 12:16:15.000000000 -0700
++++ clementine-0.7.1/src/config.h.in 2011-05-09 16:00:26.505080057 -0700
+@@ -29,6 +29,7 @@
+ #cmakedefine HAVE_STATIC_SQLITE
+
+ #cmakedefine HAVE_DBUS
++#cmakedefine HAVE_DEVICEKIT
+ #cmakedefine HAVE_GIO
+ #cmakedefine HAVE_IMOBILEDEVICE
+ #cmakedefine HAVE_LIBARCHIVE
diff --git a/community-staging/clementine/clementine.install b/community-staging/clementine/clementine.install
new file mode 100644
index 000000000..2d71a7563
--- /dev/null
+++ b/community-staging/clementine/clementine.install
@@ -0,0 +1,12 @@
+post_install() {
+ gtk-update-icon-cache -q -t -f usr/share/icons/hicolor
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+
+post_remove() {
+ post_install $1
+}
diff --git a/community-staging/ekg2/PKGBUILD b/community-staging/ekg2/PKGBUILD
new file mode 100644
index 000000000..77a930762
--- /dev/null
+++ b/community-staging/ekg2/PKGBUILD
@@ -0,0 +1,39 @@
+# $Id: PKGBUILD 47741 2011-05-25 05:00:38Z svenstaro $
+# Maintainer: Mateusz Herych <heniekk@gmail.com>
+
+pkgname=ekg2
+pkgver=0.3.0
+pkgrel=2
+pkgdesc="ncurses based Jabber, Gadu-Gadu, Tlen and IRC client"
+arch=('i686' 'x86_64')
+url="http://ekg2.org/"
+license=('GPL')
+depends=('aspell' 'libjpeg' 'python2' 'libgadu' 'gnutls' 'gpm' 'libidn' 'giflib' 'gpgme')
+optdepends=( 'xosd: for xosd support'
+ 'sqlite3: sqlite support'
+ 'gtk2: gtk support')
+provides=('ekg2-unicode')
+source=(http://pl.ekg2.org/ekg2-$pkgver.tar.gz)
+md5sums=('652e492fcf72281a42c3e5960347516e')
+
+build() {
+ cd $srcdir/$pkgname-$pkgver
+ sed -i 's|ncursesw/ncurses.h|ncurses.h|g' configure plugins/ncurses/ecurses.h
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --with-libgadu \
+ --with-xosd \
+ --enable-unicode \
+ --enable-shared \
+ --without-gpg
+ make
+}
+
+package() {
+ cd $srcdir/$pkgname-$pkgver
+ make DESTDIR=$pkgdir install
+ rm -rf $pkgdir/usr/lib/perl5/core_perl/perllocal.pod
+ mv $pkgdir/usr/libexec/ioctld $pkgdir/usr/lib/ekg2/ioctld
+ rm -rf $pkgdir/usr/libexec
+ chmod -R 755 $pkgdir/usr/lib/perl5
+}
diff --git a/community-staging/frogatto/PKGBUILD b/community-staging/frogatto/PKGBUILD
index fb3b6553d..434ddd9fb 100644
--- a/community-staging/frogatto/PKGBUILD
+++ b/community-staging/frogatto/PKGBUILD
@@ -1,11 +1,11 @@
-# $Id: PKGBUILD 47675 2011-05-24 19:05:16Z svenstaro $
+# $Id: PKGBUILD 47897 2011-05-26 00:34:36Z svenstaro $
# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
# Contributor: Tom Wambold <tom5760@gmail.com>
pkgname='frogatto'
arch=('i686' 'x86_64')
pkgver=1.1
-pkgrel=2
+pkgrel=3
pkgdesc="An old-school 2d platformer game, starring a certain quixotic frog"
url="http://www.frogatto.com"
license=('GPL')
diff --git a/community-staging/gource/PKGBUILD b/community-staging/gource/PKGBUILD
new file mode 100644
index 000000000..2c357a634
--- /dev/null
+++ b/community-staging/gource/PKGBUILD
@@ -0,0 +1,28 @@
+# $Id: PKGBUILD 47914 2011-05-26 01:27:25Z svenstaro $
+# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
+# Contributor: Jose Valecillos <valecillosjg (at) gmail (dot) com>
+# Contributor: Olivier Ramonat <olivier at ramonat dot fr>
+pkgname=gource
+pkgver=0.34
+pkgrel=2
+pkgdesc="software version control visualization"
+license=(GPL3)
+arch=(i686 x86_64)
+url=http://code.google.com/p/gource/
+depends=('ftgl' 'sdl' 'sdl_image' 'pcre' 'glew')
+source=(http://gource.googlecode.com/files/$pkgname-$pkgver.tar.gz)
+md5sums=('292a62d687874e871067e985d717d71a')
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ ./configure --prefix=/usr
+ make
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ make DESTDIR=$pkgdir install
+}
+# vim: ts=2:sw=2 et:
diff --git a/community-staging/lightspark/PKGBUILD b/community-staging/lightspark/PKGBUILD
index 36d912b1e..d1a23e996 100644
--- a/community-staging/lightspark/PKGBUILD
+++ b/community-staging/lightspark/PKGBUILD
@@ -3,7 +3,7 @@
pkgname=lightspark
pkgver=0.4.7.1
-pkgrel=3
+pkgrel=4
pkgdesc='An alternative Flash Player for Linux.'
arch=('i686' 'x86_64')
url='http://lightspark.sourceforge.net'
diff --git a/community-staging/perl-dbd-odbc/PKGBUILD b/community-staging/perl-dbd-odbc/PKGBUILD
new file mode 100644
index 000000000..d787e37b5
--- /dev/null
+++ b/community-staging/perl-dbd-odbc/PKGBUILD
@@ -0,0 +1,33 @@
+# $Id: PKGBUILD 47750 2011-05-25 13:23:38Z tdziedzic $
+# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
+# This PKGBUILD was generated by cpan4pacman via CPANPLUS::Dist::Pacman
+# Contributor: François Charette <firmicus ατ gmx δοτ net>
+
+pkgname=perl-dbd-odbc
+pkgver=1.29
+pkgrel=1
+pkgdesc="ODBC Driver for DBI"
+arch=('i686' 'x86_64')
+url="http://search.cpan.org/dist/DBD-ODBC/"
+license=('GPL' 'PerlArtistic')
+depends=('perl-dbi' 'perl' 'unixodbc')
+options=('!emptydirs')
+source=("http://search.cpan.org/CPAN/authors/id/M/MJ/MJEVANS/DBD-ODBC-${pkgver}.tar.gz")
+md5sums=('66fee532cab75a1e5ffa81dfd26b2367')
+
+build() {
+ cd DBD-ODBC-${pkgver}
+
+ PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
+
+ make
+}
+
+package() {
+ cd DBD-ODBC-${pkgver}
+
+ make install DESTDIR=${pkgdir}
+
+ find ${pkgdir} -name '.packlist' -delete
+ find ${pkgdir} -name '*.pod' -delete
+}
diff --git a/community-staging/perl-dbd-pg/PKGBUILD b/community-staging/perl-dbd-pg/PKGBUILD
new file mode 100644
index 000000000..7af282d37
--- /dev/null
+++ b/community-staging/perl-dbd-pg/PKGBUILD
@@ -0,0 +1,32 @@
+# $Id: PKGBUILD 47753 2011-05-25 13:27:50Z tdziedzic $
+# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
+# Contributor: François Charette <firmicus ατ gmx δοτ net>
+
+pkgname=perl-dbd-pg
+pkgver=2.18.1
+pkgrel=1
+pkgdesc="Postgres Driver for DBI"
+arch=('i686' 'x86_64')
+url="http://search.cpan.org/dist/DBD-Pg"
+license=('GPL' 'PerlArtistic')
+depends=('perl-dbi>=1.52' 'postgresql-libs')
+options=('!emptydirs')
+source=("http://www.cpan.org/authors/id/T/TU/TURNSTEP/DBD-Pg-${pkgver}.tar.gz")
+md5sums=('1f4a837b3d79789ad6854443fce7a901')
+
+build() {
+ cd DBD-Pg-${pkgver}
+
+ PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
+
+ make
+}
+
+package() {
+ cd DBD-Pg-${pkgver}
+
+ make install DESTDIR=${pkgdir}
+
+ find ${pkgdir} -name '.packlist' -delete
+ find ${pkgdir} -name '*.pod' -delete
+}
diff --git a/community-staging/perl-dbd-sqlite2/PKGBUILD b/community-staging/perl-dbd-sqlite2/PKGBUILD
new file mode 100644
index 000000000..314f129d4
--- /dev/null
+++ b/community-staging/perl-dbd-sqlite2/PKGBUILD
@@ -0,0 +1,31 @@
+# $Id: PKGBUILD 47756 2011-05-25 13:30:12Z tdziedzic $
+# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
+# Maintainer: Charles Mauch <cmauch@gmail.com>
+
+pkgname=perl-dbd-sqlite2
+pkgver=0.33
+pkgrel=7
+pkgdesc="Perl/CPAN Module DBD::SQLite2"
+arch=("i686" "x86_64")
+url="http://search.cpan.org/dist/DBD-SQLite2"
+license=("GPL" "PerlArtistic")
+depends=("perl-dbi")
+source=("http://www.cpan.org/authors/id/M/MS/MSERGEANT/DBD-SQLite2-${pkgver}.tar.gz")
+md5sums=('babd83fd5eb9ba7560ad4bab4c76c0eb')
+
+build() {
+ cd DBD-SQLite2-${pkgver}
+
+ PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
+
+ make
+}
+
+package() {
+ cd DBD-SQLite2-${pkgver}
+
+ make install DESTDIR=${pkgdir}
+
+ find ${pkgdir} -name '.packlist' -delete
+ find ${pkgdir} -name '*.pod' -delete
+}
diff --git a/community-staging/perl-dbd-sybase/PKGBUILD b/community-staging/perl-dbd-sybase/PKGBUILD
new file mode 100644
index 000000000..a33488520
--- /dev/null
+++ b/community-staging/perl-dbd-sybase/PKGBUILD
@@ -0,0 +1,33 @@
+# $Id: PKGBUILD 47759 2011-05-25 13:32:36Z tdziedzic $
+# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
+
+pkgname=perl-dbd-sybase
+pkgver=1.12
+pkgrel=1
+pkgdesc="Sybase Driver for DBI"
+arch=('i686' 'x86_64')
+url="http://search.cpan.org/dist/DBD-Sybase/"
+license=('GPL' 'PerlArtistic')
+depends=('perl-dbi>=1.52' 'perl>=5.10.0' 'freetds')
+options=('!emptydirs')
+source=("http://search.cpan.org/CPAN/authors/id/M/ME/MEWP/DBD-Sybase-${pkgver}.tar.gz")
+md5sums=('fc01efe30102e801f6fdc1c96352fcde')
+
+build() {
+ cd $srcdir/DBD-Sybase-${pkgver}
+
+ export SYBASE=/usr
+
+ echo -e "\n\n\n\n\n\n" | PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
+
+ make
+}
+
+package() {
+ cd $srcdir/DBD-Sybase-${pkgver}
+
+ make install DESTDIR=${pkgdir}
+
+ find ${pkgdir} -name '.packlist' -delete
+ find ${pkgdir} -name '*.pod' -delete
+}
diff --git a/community-staging/root/PKGBUILD b/community-staging/root/PKGBUILD
new file mode 100644
index 000000000..4f46232cf
--- /dev/null
+++ b/community-staging/root/PKGBUILD
@@ -0,0 +1,78 @@
+# Maintainer: Thomas Dziedzic < gostrc at gmail >
+# Contributor: Sebastian Voecking <voeck@web.de>
+
+pkgname=root
+pkgver=5.28.00d
+pkgrel=2
+pkgdesc='C++ data analysis framework and interpreter from CERN.'
+arch=('i686' 'x86_64')
+url='http://root.cern.ch'
+license=('LGPL2.1')
+depends=('avahi' 'desktop-file-utils' 'ftgl' 'giflib' 'glew' 'graphviz' 'gsl' 'libldap' 'libmysqlclient'
+ 'libxft' 'postgresql-libs' 'python2' 'unixodbc' 'shared-mime-info' 'xmlrpc-c' 'xorg-fonts-75dpi' 'mesa' 'gcc-fortran')
+makedepends=('fftw')
+install='root.install'
+source=("ftp://root.cern.ch/root/root_v${pkgver}.source.tar.gz"
+ 'root.sh'
+ 'rootd'
+ 'root.desktop'
+ 'root.xml')
+md5sums=('53505fcb256df38526d446916e6efc15'
+ '0e883ad44f99da9bc7c23bc102800b62'
+ 'efd06bfa230cc2194b38e0c8939e72af'
+ 'ac61b17395d75a2705fefa2ef841a6bf'
+ 'e2cf69b204192b5889ceb5b4dedc66f7')
+
+build() {
+ cd ${pkgname}
+
+ if [ ${CARCH} == 'i686' ]; then
+ TARGET=linux;
+ else
+ TARGET=linuxx8664gcc;
+ fi
+
+ # python2 switch
+ find . -type f -exec sed -i -e 's/python -O/python2 -O/g' -e 's/python -c/python2 -c/g' {} \;
+ sed -i 's/python 2/python2 2/g' configure
+
+ ./configure \
+ ${TARGET} \
+ --prefix=/usr \
+ --disable-builtin-glew \
+ --disable-builtin-freetype \
+ --disable-builtin-ftgl \
+ --disable-builtin-pcre \
+ --disable-builtin-zlib \
+ --enable-gdml \
+ --enable-gsl-shared \
+ --enable-minuit2 \
+ --enable-soversion \
+ --enable-roofit \
+ --enable-python \
+ --with-python-incdir=/usr/include/python2.7 \
+ --with-python-libdir=/usr/lib
+ #--disable-krb5
+ # disable krb5 because of compile error
+
+ # move from aur
+ #--disable-builtin-afterimage \
+
+ #--with-python-incdir=/usr/include/python2.7/Python.h \
+ #--with-python-libdir=/usr/lib/libpython2.7.so
+
+ make
+}
+
+package() {
+ cd ${pkgname}
+
+ make DESTDIR=${pkgdir} install
+
+ install -D ${srcdir}/root.sh ${pkgdir}/etc/profile.d/root.sh
+ install -D ${srcdir}/rootd ${pkgdir}/etc/rc.d/rootd
+ install -D -m644 ${srcdir}/root.desktop ${pkgdir}/usr/share/applications/root.desktop
+ install -D -m644 ${srcdir}/root.xml ${pkgdir}/usr/share/mime/packages/root.xml
+
+ rm -rf ${pkgdir}/etc/root/daemons
+}
diff --git a/community-staging/root/root.desktop b/community-staging/root/root.desktop
new file mode 100644
index 000000000..ca382111c
--- /dev/null
+++ b/community-staging/root/root.desktop
@@ -0,0 +1,12 @@
+[Desktop Entry]
+Encoding=UTF-8
+Type=Application
+Exec=root
+Terminal=true
+Name=ROOT
+Name[de]=ROOT
+Comment=An object-oriented data analysis framework
+Comment[de]=Ein objektorientiertes Framework zur Datenanalyse
+StartupNotify=true
+MimeType=application/x-root;text/x-c++src
+Categories=Science;Development;Application;
diff --git a/community-staging/root/root.install b/community-staging/root/root.install
new file mode 100644
index 000000000..457af7314
--- /dev/null
+++ b/community-staging/root/root.install
@@ -0,0 +1,17 @@
+post_install() {
+ if ! [ `grep '/usr/lib/root' etc/ld.so.conf` ]; then
+ echo "/usr/lib/root" >> etc/ld.so.conf
+ sbin/ldconfig -r .
+ fi
+
+ update-desktop-database >/dev/null
+
+ update-mime-database /usr/share/mime >/dev/null
+}
+
+pre_remove() {
+ cat etc/ld.so.conf | grep -v '/usr/lib/root' >/tmp/.pacroot
+ mv /tmp/.pacroot etc/ld.so.conf
+ chmod 644 etc/ld.so.conf
+ sbin/ldconfig -r .
+}
diff --git a/community-staging/root/root.sh b/community-staging/root/root.sh
new file mode 100644
index 000000000..685e6036b
--- /dev/null
+++ b/community-staging/root/root.sh
@@ -0,0 +1,5 @@
+if [ $PYTHONPATH ]; then
+ export PYTHONPATH=$PYTHONPATH:/usr/lib/root;
+else
+ export PYTHONPATH=/usr/lib/root;
+fi
diff --git a/community-staging/root/root.xml b/community-staging/root/root.xml
new file mode 100644
index 000000000..af8dd69c5
--- /dev/null
+++ b/community-staging/root/root.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
+ <mime-type type="application/x-root">
+ <comment>ROOT file</comment>
+ <comment xml:lang="de">ROOT-Datei</comment>
+ <glob pattern="*.root"/>
+ <magic priority="80">
+ <match value="root" type="string" offset="0:64"/>
+ </magic>
+ </mime-type>
+</mime-info>
diff --git a/community-staging/root/rootd b/community-staging/root/rootd
new file mode 100755
index 000000000..fb2c3388c
--- /dev/null
+++ b/community-staging/root/rootd
@@ -0,0 +1,37 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+PID=`pidof -o %PPID /usr/sbin/rootd`
+case "$1" in
+ start)
+ stat_busy "Starting ROOT file server daemon"
+ [ -z "$PID" ] && /usr/bin/rootd >>/var/log/root.log 2>&1
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ PID=`pidof -o %PPID /usr/sbin/rootd`
+ echo $PID >/var/run/rootd.pid
+ add_daemon rootd
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping ROOT file server daemon"
+ [ ! -z "$PID" ] && kill $PID &>/dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon rootd
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0
diff --git a/community-staging/sfml/PKGBUILD b/community-staging/sfml/PKGBUILD
new file mode 100644
index 000000000..806e373d4
--- /dev/null
+++ b/community-staging/sfml/PKGBUILD
@@ -0,0 +1,60 @@
+# $Id: PKGBUILD 47923 2011-05-26 03:12:35Z svenstaro $
+# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
+# Contributor: Ondrej Martinak <omartinak@gmail.com>
+
+pkgname=sfml
+
+_git=true
+
+if [[ "${_git}" = "true" ]]; then
+ pkgver=1.99.git20110526
+fi
+
+pkgrel=1
+pkgdesc='A simple, fast, cross-platform, and object-oriented multimedia API'
+arch=('i686' 'x86_64')
+url='http://www.sfml-dev.org/'
+license=('zlib')
+depends=('libsndfile' 'libxrandr' 'libjpeg' 'openal' 'glew' 'freetype2')
+makedepends=('git' 'mesa' 'cmake' 'doxygen')
+
+_gitroot='https://github.com/LaurentGomila/SFML.git'
+_gitname='SFML'
+
+build() {
+ cd "$srcdir"
+ msg "Connecting to GIT server...."
+
+ if [ -d $_gitname ] ; then
+ cd $_gitname && git pull origin
+ msg "The local files are updated."
+ else
+ git clone $_gitroot
+ cd $_gitname
+ fi
+
+ msg "GIT checkout done or server timeout"
+ msg "Starting make..."
+
+ rm -rf "$srcdir/$_gitname-build"
+ cp -r "$srcdir/$_gitname" "$srcdir/$_gitname-build"
+ cd "$srcdir/$_gitname-build"
+
+ mkdir build && cd build
+ cmake -DCMAKE_INSTALL_PREFIX=/usr .. \
+ -DBUILD_DOC=true \
+ -DBUILD_EXAMPLES=true
+ make
+ make doc
+}
+
+package() {
+ cd "$srcdir/$_gitname-build/build"
+ make DESTDIR="$pkgdir/" install
+
+ install -Dm644 ../license.txt \
+ ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
+
+ make clean
+}
+
diff --git a/community-staging/sfml/sfml.install b/community-staging/sfml/sfml.install
new file mode 100644
index 000000000..9d18b5251
--- /dev/null
+++ b/community-staging/sfml/sfml.install
@@ -0,0 +1,3 @@
+post_install() {
+ echo "To view the SFML samples, go to /opt/SFML/samples/bin and run them individually"
+}
diff --git a/community-staging/sfml/use-system-libs.patch b/community-staging/sfml/use-system-libs.patch
new file mode 100644
index 000000000..5d3200225
--- /dev/null
+++ b/community-staging/sfml/use-system-libs.patch
@@ -0,0 +1,70 @@
+Only in SFML-1.6-old/lib: libsfml-graphics.so.1.6
+Binary files SFML-1.6-old/lib/libsfml-network.so.1.6 and SFML-1.6/lib/libsfml-network.so.1.6 differ
+Binary files SFML-1.6-old/lib/libsfml-system.so.1.6 and SFML-1.6/lib/libsfml-system.so.1.6 differ
+Binary files SFML-1.6-old/lib/libsfml-window.so.1.6 and SFML-1.6/lib/libsfml-window.so.1.6 differ
+diff -ur SFML-1.6-old/src/SFML/Graphics/ImageLoader.cpp SFML-1.6/src/SFML/Graphics/ImageLoader.cpp
+--- SFML-1.6-old/src/SFML/Graphics/ImageLoader.cpp 2010-01-27 15:00:05.000000000 +0100
++++ SFML-1.6/src/SFML/Graphics/ImageLoader.cpp 2010-08-16 12:27:33.983627625 +0200
+@@ -28,10 +28,10 @@
+ #include <SFML/Graphics/ImageLoader.hpp>
+ extern "C"
+ {
+- #include <SFML/Graphics/libjpeg/jpeglib.h>
+- #include <SFML/Graphics/libjpeg/jerror.h>
++ #include <jpeglib.h>
++ #include <jerror.h>
+ }
+-#include <SFML/Graphics/libpng/png.h>
++#include <png.h>
+ #include <SFML/Graphics/SOIL/SOIL.h>
+ #include <iostream>
+
+Only in SFML-1.6-old/src/SFML/Graphics: ImageLoader.cpp.rej
+diff -ur SFML-1.6-old/src/SFML/Graphics/Makefile SFML-1.6/src/SFML/Graphics/Makefile
+--- SFML-1.6-old/src/SFML/Graphics/Makefile 2010-01-27 15:00:05.000000000 +0100
++++ SFML-1.6/src/SFML/Graphics/Makefile 2010-08-16 12:25:13.663501212 +0200
+@@ -1,15 +1,5 @@
+ SRC = $(wildcard *.cpp)
+-SRCGLEW = $(wildcard ./GLEW/*.c)
+-SRCJPEG = $(wildcard ./libjpeg/*.c)
+-SRCPNG = $(wildcard ./libpng/*.c)
+-SRCSOIL = $(wildcard ./SOIL/*.c)
+-SRCZLIB = $(wildcard ./zlib/*.c)
+ OBJ = $(SRC:.cpp=.o)
+-OBJGLEW = $(SRCGLEW:.c=.o)
+-OBJJPEG = $(SRCJPEG:.c=.o)
+-OBJPNG = $(SRCPNG:.c=.o)
+-OBJSOIL = $(SRCSOIL:.c=.o)
+-OBJZLIB = $(SRCZLIB:.c=.o)
+
+ ifeq ($(STATIC), yes)
+ LIB = libsfml-graphics-s.a
+@@ -23,22 +13,19 @@
+
+ all: $(LIB)
+
+-libsfml-graphics-s.a: $(OBJ) $(OBJGLEW) $(OBJJPEG) $(OBJPNG) $(OBJSOIL) $(OBJZLIB)
+- $(AR) $(ARFLAGS) $(LIBNAME) $(OBJ) $(OBJGLEW) $(OBJJPEG) $(OBJPNG) $(OBJSOIL) $(OBJZLIB)
++libsfml-graphics-s.a: $(OBJ)
++ $(AR) $(ARFLAGS) $(LIBNAME) $(OBJ) -static -lGLEW -ljpeg -lpng -lsoil -lz -lSOIL
+
+-libsfml-graphics.so: $(OBJ) $(OBJGLEW) $(OBJJPEG) $(OBJPNG) $(OBJSOIL) $(OBJZLIB)
+- $(CPP) $(LDFLAGS) -Wl,-soname,$(LIB).$(VERSION) -o $(LIBNAME) $(OBJ) $(OBJGLEW) $(OBJJPEG) $(OBJPNG) $(OBJSOIL) $(OBJZLIB) -lfreetype -lX11 -lGL
++libsfml-graphics.so: $(OBJ)
++ $(CPP) $(LDFLAGS) -Wl,-soname,$(LIB).$(VERSION) -o $(LIBNAME) $(OBJ) -lGLEW -ljpeg -lpng -lSOIL -lz -lfreetype -lX11 -lGL
+
+ $(OBJ): %.o: %.cpp
+ $(CPP) -o $@ -c $< $(CFLAGS) -I/usr/include/freetype2
+
+-$(OBJGLEW) $(OBJJPEG) $(OBJPNG) $(OBJSOIL) $(OBJZLIB): %.o: %.c
+- $(CC) -o $@ -c $< $(CFLAGSEXT) -DSTBI_FAILURE_USERMSG
+-
+ .PHONY: clean mrproper
+
+ clean:
+- @rm -rf $(OBJ) $(OBJGLEW) $(OBJJPEG) $(OBJPNG) $(OBJSOIL) $(OBJZLIB)
++ @rm -rf $(OBJ)
+
+ mrproper: clean
+ @rm -rf $(LIBNAME)
+Only in SFML-1.6-old/src/SFML/Graphics: Makefile.rej
diff --git a/community-staging/spring/PKGBUILD b/community-staging/spring/PKGBUILD
index aeac8eda8..38ce61979 100644
--- a/community-staging/spring/PKGBUILD
+++ b/community-staging/spring/PKGBUILD
@@ -1,11 +1,11 @@
-# $Id: PKGBUILD 47695 2011-05-24 20:14:25Z svenstaro $
+# $Id: PKGBUILD 47908 2011-05-26 01:20:52Z svenstaro $
# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
# Contributor: Arkham <arkham at archlinux dot us>
# Contributor: Christoph Zeiler <archNOSPAM_at_moonblade.dot.org>
pkgname=spring
pkgver=0.82.7.1
-pkgrel=2
+pkgrel=4
pkgdesc='A free 3D real-time-strategy (RTS) game engine'
arch=('i686' 'x86_64')
url="http://springrts.com/"
diff --git a/community-staging/spring/gcc46.patch b/community-staging/spring/gcc46.patch
new file mode 100644
index 000000000..4f6865cac
--- /dev/null
+++ b/community-staging/spring/gcc46.patch
@@ -0,0 +1,67 @@
+From: Jan Dittberner <jandd@debian.org>
+Subject: Patch for FTBFS with g++ 4.6.0
+Bug-Debian: http://bugs.debian.org/625097
+Bug: http://springrts.com/mantis/view.php?id=2415
+--- a/AI/Skirmish/E323AI/AAStar.h
++++ b/AI/Skirmish/E323AI/AAStar.h
+@@ -4,6 +4,7 @@
+ #include <queue>
+ #include <vector>
+ #include <list>
++#include <cstddef> // for NULL
+
+ class AAStar {
+ public:
+--- a/rts/Rendering/ShadowHandler.cpp
++++ b/rts/Rendering/ShadowHandler.cpp
+@@ -318,6 +318,11 @@
+ xmid = 1.0f - (sqrt(fabs(x2)) / (sqrt(fabs(x2)) + sqrt(fabs(x1))));
+ ymid = 1.0f - (sqrt(fabs(y2)) / (sqrt(fabs(y2)) + sqrt(fabs(y1))));
+
++ shadowParams.x = xmid;
++ shadowParams.y = ymid;
++ shadowParams.z = p17;
++ shadowParams.w = p18;
++
+ shadowMatrix[ 0] = cross1.x / maxLengthX;
+ shadowMatrix[ 4] = cross1.y / maxLengthX;
+ shadowMatrix[ 8] = cross1.z / maxLengthX;
+--- a/rts/Rendering/ShadowHandler.h
++++ b/rts/Rendering/ShadowHandler.h
+@@ -38,7 +38,7 @@
+ CMatrix44f shadowMatrix;
+ void CalcMinMaxView(void);
+
+- const float4 GetShadowParams() const { return float4(xmid, ymid, p17, p18); }
++ const float4& GetShadowParams() const { return shadowParams; }
+
+ enum ShadowGenProgram {
+ SHADOWGEN_PROGRAM_MODEL = 0,
+@@ -76,6 +76,7 @@
+ //! to write the (FBO) depth-buffer texture
+ std::vector<Shader::IProgramObject*> shadowGenProgs;
+
++ float4 shadowParams;
+ float x1, x2, y1, y2;
+ float xmid, ymid;
+ float p17, p18;
+--- a/rts/Rendering/GLContext.cpp
++++ b/rts/Rendering/GLContext.cpp
+@@ -9,6 +9,7 @@
+ #include "GLContext.h"
+
+ #include <list>
++#include <cstddef> // for NULL
+
+
+ using namespace std;
+--- a/rts/System/MemPool.h
++++ b/rts/System/MemPool.h
+@@ -4,6 +4,7 @@
+ #define _MEM_POOL_H_
+
+ #include <new>
++#include <cstddef> // for NULL
+
+ const size_t MAX_MEM_SIZE=200;
+
diff --git a/community-staging/supertux/PKGBUILD b/community-staging/supertux/PKGBUILD
new file mode 100644
index 000000000..dbcd690af
--- /dev/null
+++ b/community-staging/supertux/PKGBUILD
@@ -0,0 +1,30 @@
+# Contributor: Jaroslaw Swierczynski <swiergot@aur.archlinux.org>
+# Contributor: Eric Belanger <belanger@astro.umontreal.ca>
+# Contributor: vande198
+# Maintainer: Daniel J Griffiths <ghost1227@archlinux.us>
+
+pkgname=supertux
+pkgver=0.3.3
+pkgrel=3
+pkgdesc="A classic 2D jump'n run sidescroller game in a style similar to the original SuperMario games"
+arch=('i686' 'x86_64')
+url="http://super-tux.sourceforge.net/"
+license=('GPL')
+depends=('sdl_image' 'curl' 'physfs' 'openal' 'libvorbis' 'libgl' 'glew')
+makedepends=('cmake' 'boost')
+source=(http://download.berlios.de/supertux/${pkgname}-${pkgver}.tar.bz2)
+md5sums=('f3f803e629ee51a9de0b366a036e393d')
+
+build() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+
+ sed -i '1i#include <cstddef>' src/supertux/screen_manager.hpp
+ cmake -D CMAKE_INSTALL_PREFIX=/usr -D INSTALL_SUBDIR_BIN=bin .
+ make
+}
+
+package() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+
+ make DESTDIR=${pkgdir} install
+}
diff --git a/community-staging/supertux/compile.patch b/community-staging/supertux/compile.patch
new file mode 100644
index 000000000..05376fe91
--- /dev/null
+++ b/community-staging/supertux/compile.patch
@@ -0,0 +1,67 @@
+diff -ruN supertux-0.3.1.orig/src/console.hpp supertux-0.3.1/src/console.hpp
+--- supertux-0.3.1.orig/src/console.hpp 2008-01-03 21:59:27.000000000 +0100
++++ supertux-0.3.1/src/console.hpp 2008-08-23 11:57:47.000000000 +0200
+@@ -27,6 +27,8 @@
+ #include <sstream>
+ #include <iostream>
+ #include <squirrel.h>
++#include <memory>
++#include <cstdlib>
+
+ class Console;
+ class ConsoleStreamBuffer;
+diff -ruN supertux-0.3.1.orig/src/lisp/lexer.cpp supertux-0.3.1/src/lisp/lexer.cpp
+--- supertux-0.3.1.orig/src/lisp/lexer.cpp 2008-01-03 21:59:26.000000000 +0100
++++ supertux-0.3.1/src/lisp/lexer.cpp 2008-08-23 13:45:58.000000000 +0200
+@@ -21,6 +21,7 @@
+ #include <sstream>
+ #include <stdexcept>
+ #include <iostream>
++#include <cstring>
+
+ #include "lexer.hpp"
+
+diff -ruN supertux-0.3.1.orig/src/sprite/sprite_manager.hpp supertux-0.3.1/src/sprite/sprite_manager.hpp
+--- supertux-0.3.1.orig/src/sprite/sprite_manager.hpp 2008-01-03 21:59:26.000000000 +0100
++++ supertux-0.3.1/src/sprite/sprite_manager.hpp 2008-08-23 13:29:34.000000000 +0200
+@@ -21,6 +21,7 @@
+ #define SUPERTUX_SPRITE_MANAGER_H
+
+ #include <map>
++#include <string>
+
+ class SpriteData;
+ class Sprite;
+diff -ruN supertux-0.3.1.orig/src/textscroller.hpp supertux-0.3.1/src/textscroller.hpp
+--- supertux-0.3.1.orig/src/textscroller.hpp 2008-01-03 21:59:27.000000000 +0100
++++ supertux-0.3.1/src/textscroller.hpp 2008-08-23 13:34:35.000000000 +0200
+@@ -24,6 +24,7 @@
+ #include <vector>
+ #include <string>
+ #include <map>
++#include <memory>
+
+ #include "screen.hpp"
+ #include "math/vector.hpp"
+diff -ruN supertux-0.3.1.orig/src/title.cpp supertux-0.3.1/src/title.cpp
+--- supertux-0.3.1.orig/src/title.cpp 2008-01-03 21:59:28.000000000 +0100
++++ supertux-0.3.1/src/title.cpp 2008-08-23 12:05:19.000000000 +0200
+@@ -32,6 +32,7 @@
+ #include <SDL.h>
+ #include <SDL_image.h>
+ #include <physfs.h>
++#include <algorithm>
+
+ #include "title.hpp"
+ #include "mainloop.hpp"
+diff -ruN supertux-0.3.1.orig/src/video/sdl_texture.hpp supertux-0.3.1/src/video/sdl_texture.hpp
+--- supertux-0.3.1.orig/src/video/sdl_texture.hpp 2008-01-03 21:59:22.000000000 +0100
++++ supertux-0.3.1/src/video/sdl_texture.hpp 2008-08-23 13:37:14.000000000 +0200
+@@ -23,6 +23,7 @@
+ #include <config.h>
+
+ #include <SDL.h>
++#include <algorithm>
+
+ #include "texture.hpp"
+ #include "color.hpp"
diff --git a/community-staging/supertux/gcc44.patch b/community-staging/supertux/gcc44.patch
new file mode 100644
index 000000000..b58d9c29d
--- /dev/null
+++ b/community-staging/supertux/gcc44.patch
@@ -0,0 +1,90 @@
+diff -ruN supertux-0.3.1.orig/src/console.hpp supertux-0.3.1/src/console.hpp
+--- supertux-0.3.1.orig/src/console.hpp 2008-01-03 20:59:27.000000000 +0000
++++ supertux-0.3.1/src/console.hpp 2009-05-17 19:43:26.914307646 +0000
+@@ -27,6 +27,8 @@
+ #include <sstream>
+ #include <iostream>
+ #include <squirrel.h>
++#include <memory>
++#include <cstdlib>
+
+ class Console;
+ class ConsoleStreamBuffer;
+diff -ruN supertux-0.3.1.orig/src/lisp/lexer.cpp supertux-0.3.1/src/lisp/lexer.cpp
+--- supertux-0.3.1.orig/src/lisp/lexer.cpp 2008-01-03 20:59:26.000000000 +0000
++++ supertux-0.3.1/src/lisp/lexer.cpp 2009-05-17 19:43:27.037705317 +0000
+@@ -21,6 +21,7 @@
+ #include <sstream>
+ #include <stdexcept>
+ #include <iostream>
++#include <cstring>
+
+ #include "lexer.hpp"
+
+diff -ruN supertux-0.3.1.orig/src/lisp/lisp.cpp supertux-0.3.1/src/lisp/lisp.cpp
+--- supertux-0.3.1.orig/src/lisp/lisp.cpp 2008-01-03 20:59:26.000000000 +0000
++++ supertux-0.3.1/src/lisp/lisp.cpp 2009-05-17 19:44:29.305165638 +0000
+@@ -18,7 +18,7 @@
+ // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+ #include <config.h>
+-
++#include <cstdio>
+ #include "lisp.hpp"
+
+ namespace lisp
+diff -ruN supertux-0.3.1.orig/src/random_generator.cpp supertux-0.3.1/src/random_generator.cpp
+--- supertux-0.3.1.orig/src/random_generator.cpp 2008-01-03 20:59:27.000000000 +0000
++++ supertux-0.3.1/src/random_generator.cpp 2009-05-17 19:44:05.851002254 +0000
+@@ -39,6 +39,7 @@
+ #include <stdexcept>
+ #include <time.h>
+ #include <cassert>
++#include <cstdio>
+ #include "random_generator.hpp"
+
+ RandomGenerator systemRandom; // global random number generator
+diff -ruN supertux-0.3.1.orig/src/sprite/sprite_manager.hpp supertux-0.3.1/src/sprite/sprite_manager.hpp
+--- supertux-0.3.1.orig/src/sprite/sprite_manager.hpp 2008-01-03 20:59:26.000000000 +0000
++++ supertux-0.3.1/src/sprite/sprite_manager.hpp 2009-05-17 19:43:27.037705317 +0000
+@@ -21,6 +21,7 @@
+ #define SUPERTUX_SPRITE_MANAGER_H
+
+ #include <map>
++#include <string>
+
+ class SpriteData;
+ class Sprite;
+diff -ruN supertux-0.3.1.orig/src/textscroller.hpp supertux-0.3.1/src/textscroller.hpp
+--- supertux-0.3.1.orig/src/textscroller.hpp 2008-01-03 20:59:27.000000000 +0000
++++ supertux-0.3.1/src/textscroller.hpp 2009-05-17 19:43:27.037705317 +0000
+@@ -24,6 +24,7 @@
+ #include <vector>
+ #include <string>
+ #include <map>
++#include <memory>
+
+ #include "screen.hpp"
+ #include "math/vector.hpp"
+diff -ruN supertux-0.3.1.orig/src/title.cpp supertux-0.3.1/src/title.cpp
+--- supertux-0.3.1.orig/src/title.cpp 2008-01-03 20:59:28.000000000 +0000
++++ supertux-0.3.1/src/title.cpp 2009-05-17 19:43:27.041000359 +0000
+@@ -32,6 +32,7 @@
+ #include <SDL.h>
+ #include <SDL_image.h>
+ #include <physfs.h>
++#include <algorithm>
+
+ #include "title.hpp"
+ #include "mainloop.hpp"
+diff -ruN supertux-0.3.1.orig/src/video/sdl_texture.hpp supertux-0.3.1/src/video/sdl_texture.hpp
+--- supertux-0.3.1.orig/src/video/sdl_texture.hpp 2008-01-03 20:59:22.000000000 +0000
++++ supertux-0.3.1/src/video/sdl_texture.hpp 2009-05-17 19:43:27.041000359 +0000
+@@ -23,6 +23,7 @@
+ #include <config.h>
+
+ #include <SDL.h>
++#include <algorithm>
+
+ #include "texture.hpp"
+ #include "color.hpp"
diff --git a/community-staging/vdrift/PKGBUILD b/community-staging/vdrift/PKGBUILD
new file mode 100644
index 000000000..41dab8d90
--- /dev/null
+++ b/community-staging/vdrift/PKGBUILD
@@ -0,0 +1,66 @@
+# $Id: PKGBUILD 47904 2011-05-26 00:55:30Z svenstaro $
+# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
+# Contributor: Anton Bazhenov <anton.bazhenov at gmail>
+# Contributor: Lone_Wolf lonewolf@xs4all.nl
+
+pkgname=vdrift
+pkgver=2010.06.30
+pkgrel=3
+pkgdesc="An open source driving simulation made with drift racing in mind"
+arch=('i686' 'x86_64')
+url="http://vdrift.net/"
+license=('GPL')
+depends=('sdl_gfx' 'sdl_image' 'glew' 'libvorbis' 'vdrift-data')
+makedepends=('scons' 'boost' 'asio')
+source=(http://downloads.sourceforge.net/project/$pkgname/$pkgname/$pkgname-${pkgver//./-}/$pkgname-${pkgver//./-}.tar.bz2
+ $pkgname.desktop)
+md5sums=('ddcaf90bb25f9ce9cc084d7f467d7b56'
+ '8bb429f37bcb4aed5e7ab1d80c5a4f93')
+
+build() {
+ cd "$srcdir"/$pkgname-${pkgver//./-}
+
+ # select arch
+ if [ `uname -m` = "x86_64" ]; then
+ _sconsarch="a64"
+ else
+ _sconsarch="686"
+ fi
+
+ # patch for crashing with bad drivers
+ sed -i 's/glGenerateMipmap/glGenerateMipmapEXT/g' src/texture.cpp
+
+ # build and install
+ scons \
+ "destdir"="$pkgdir" \
+ "arch"=$_sconsarch \
+ "release"=1 \
+ "force_feedback"=1 \
+ "prefix"=/usr \
+ "datadir"=share/$pkgname/data || return 1
+}
+
+package() {
+ cd "$srcdir"/$pkgname-${pkgver//./-}
+
+ scons install || return 1
+
+ # remove some unneeded files
+ find "$pkgdir"/usr/share/$pkgname -name SConscript -delete
+
+ # install icons
+ install -Dm644 data/textures/icons/$pkgname-16x16.png \
+ "$pkgdir"/usr/share/icons/hicolor/16x16/apps/$pkgname.png
+ install -Dm644 data/textures/icons/$pkgname-32x32.png \
+ "$pkgdir"/usr/share/icons/hicolor/32x32/apps/$pkgname.png
+ install -Dm644 data/textures/icons/$pkgname-64x64.png \
+ "$pkgdir"/usr/share/icons/hicolor/64x64/apps/$pkgname.png
+
+ # install .desktop file
+ install -Dm644 ../$pkgname.desktop \
+ "$pkgdir"/usr/share/applications/$pkgname.desktop
+
+ # delete installed data (will be provided by -data package)
+ rm -r "$pkgdir"/usr/share/$pkgname
+}
+# vim: sw=2:ts=2 et:
diff --git a/community-staging/vdrift/vdrift.desktop b/community-staging/vdrift/vdrift.desktop
new file mode 100644
index 000000000..7078f0d9c
--- /dev/null
+++ b/community-staging/vdrift/vdrift.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Type=Application
+Name=VDrift
+Version=2009-06-15
+GenericName=Racing Simulation
+Comment=An open source driving simulation made with drift racing in mind
+Exec=vdrift
+Icon=vdrift.png
+Terminal=false
+Categories=Game;Simulation;
diff --git a/community-staging/widelands/PKGBUILD b/community-staging/widelands/PKGBUILD
new file mode 100644
index 000000000..e2a882999
--- /dev/null
+++ b/community-staging/widelands/PKGBUILD
@@ -0,0 +1,48 @@
+# $Id: PKGBUILD 47900 2011-05-26 00:39:20Z svenstaro $
+# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
+# Contributor: Arkham <arkham at archlinux dot us>
+# Contributor: Christoph Zeiler <rabyte*gmail>
+
+pkgname=widelands
+pkgver=16
+_realver=build16
+pkgrel=2
+pkgdesc="A realtime strategy game with emphasis on economy and transport"
+arch=('i686' 'x86_64')
+url="http://widelands.org/"
+license=('GPL')
+depends=('sdl_mixer' 'sdl_image' 'sdl_net' 'sdl_ttf' 'sdl_gfx' 'ggz-client-libs' 'lua' 'glew' 'python2')
+makedepends=('cmake' 'boost')
+source=(http://launchpad.net/$pkgname/build16/$_realver/+download/$pkgname-$_realver-src.tar.bz2
+ $pkgname.desktop
+ $pkgname.png
+ $pkgname.sh)
+md5sums=('3d8c28e145b73c64d8ed1625319d25a2'
+ '15820bf099fd6f16251fe70a75c534bb'
+ '3dfda7e9ca76ca00dd98d745d0ceb328'
+ '7cae50aba5ed0cd2cfeea79124637b46')
+
+build() {
+ cd $srcdir/$pkgname-$_realver-src
+
+ mkdir -p build/compile && cd build/compile
+
+ cmake ../.. -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DWL_INSTALL_PREFIX=/usr \
+ -DWL_INSTALL_DATADIR=share/$pkgname \
+ -DWL_INSTALL_BINDIR=bin
+ make
+}
+
+package() {
+ cd $srcdir/$pkgname-$_realver-src/build/compile
+
+ make DESTDIR="$pkgdir" install
+
+ # Install bin, icon and desktop file
+ #install -Dm 755 src/$pkgname $pkgdir/usr/share/$pkgname/$pkgname
+ #install -Dm 755 $srcdir/$pkgname.sh $pkgdir/usr/bin/$pkgname
+ install -Dm644 $srcdir/$pkgname.png $pkgdir/usr/share/pixmaps/$pkgname.png
+ install -Dm644 $srcdir/$pkgname.desktop $pkgdir/usr/share/applications/$pkgname.desktop
+}
diff --git a/community-staging/widelands/widelands-build15-gcc-4.5-patch b/community-staging/widelands/widelands-build15-gcc-4.5-patch
new file mode 100644
index 000000000..6ba313358
--- /dev/null
+++ b/community-staging/widelands/widelands-build15-gcc-4.5-patch
@@ -0,0 +1,51 @@
+diff -Naur widelands-from/src/editor/ui_menus/editor_main_menu_new_map.cc widelands-to/src/editor/ui_menus/editor_main_menu_new_map.cc
+--- widelands-from/src/editor/ui_menus/editor_main_menu_new_map.cc 2010-04-16 15:41:22.000000000 +0000
++++ widelands-to/src/editor/ui_menus/editor_main_menu_new_map.cc 2010-07-01 21:15:56.000000000 +0000
+@@ -113,7 +113,7 @@
+ posx, posy, width, height,
+ g_gr->get_picture(PicMod_UI, "pics/but1.png"),
+ &Main_Menu_New_Map::button_clicked, *this, 4,
+- Widelands::World::World(m_worlds[m_currentworld].c_str()).get_name());
++ Widelands::World(m_worlds[m_currentworld].c_str()).get_name());
+
+ posy += height + spacing + spacing + spacing;
+
+@@ -142,7 +142,7 @@
+ if (m_currentworld == m_worlds.size())
+ m_currentworld = 0;
+ m_world->set_title
+- (Widelands::World::World(m_worlds[m_currentworld].c_str()).get_name
++ (Widelands::World(m_worlds[m_currentworld].c_str()).get_name
+ ());
+ break;
+ }
+diff -Naur widelands-from/src/editor/ui_menus/editor_main_menu_random_map.cc widelands-to/src/editor/ui_menus/editor_main_menu_random_map.cc
+--- widelands-from/src/editor/ui_menus/editor_main_menu_random_map.cc 2010-04-16 15:41:22.000000000 +0000
++++ widelands-to/src/editor/ui_menus/editor_main_menu_random_map.cc 2010-07-01 21:17:39.000000000 +0000
+@@ -272,7 +272,7 @@
+ posx, posy, width, height,
+ g_gr->get_picture(PicMod_UI, "pics/but1.png"),
+ &Main_Menu_New_Random_Map::button_clicked, *this, 8,
+- Widelands::World::World(m_worlds[m_currentworld].c_str()).get_name());
++ Widelands::World(m_worlds[m_currentworld].c_str()).get_name());
+
+ posy += height + spacing + spacing + spacing;
+
+@@ -343,7 +343,7 @@
+ if (m_currentworld == m_worlds.size())
+ m_currentworld = 0;
+ m_world->set_title
+- (Widelands::World::World(m_worlds[m_currentworld].c_str()).get_name());
++ (Widelands::World(m_worlds[m_currentworld].c_str()).get_name());
+ break;
+ case 9:
+ break;
+@@ -476,7 +476,7 @@
+ (strcmp(mapInfo.worldName.c_str(), m_worlds[m_currentworld].c_str()))
+ ++m_currentworld;
+ m_world->set_title
+- (Widelands::World::World(m_worlds[m_currentworld].c_str()).get_name());
++ (Widelands::World(m_worlds[m_currentworld].c_str()).get_name());
+
+ button_clicked(-1); // Update other values in UI as well
+
diff --git a/community-staging/widelands/widelands.desktop b/community-staging/widelands/widelands.desktop
new file mode 100644
index 000000000..9715d816c
--- /dev/null
+++ b/community-staging/widelands/widelands.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Name=Widelands
+GenericName=Widelands
+Comment=Realtime strategy game
+Icon=widelands
+Exec=widelands
+Type=Application
+Categories=Game;StrategyGame;
diff --git a/community-staging/widelands/widelands.png b/community-staging/widelands/widelands.png
new file mode 100644
index 000000000..c329cf667
--- /dev/null
+++ b/community-staging/widelands/widelands.png
Binary files differ
diff --git a/community-staging/widelands/widelands.sh b/community-staging/widelands/widelands.sh
new file mode 100644
index 000000000..0b21a1694
--- /dev/null
+++ b/community-staging/widelands/widelands.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+cd /usr/share/widelands
+./widelands $*
diff --git a/community-staging/wml/PKGBUILD b/community-staging/wml/PKGBUILD
new file mode 100644
index 000000000..2f7a3781f
--- /dev/null
+++ b/community-staging/wml/PKGBUILD
@@ -0,0 +1,42 @@
+# $Id: PKGBUILD 47762 2011-05-25 13:41:49Z tdziedzic $
+# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
+
+pkgname=wml
+pkgver=2.0.11
+pkgrel=6
+pkgdesc="The Website Meta Language"
+arch=('i686' 'x86_64')
+url="http://thewml.org/"
+license=('GPL')
+depends=('perl' 'libpng' 'gdbm' 'db' 'ncurses')
+makedepends=('lynx')
+source=("http://thewml.org/distrib/${pkgname}-${pkgver}.tar.gz")
+md5sums=('a26feebf4e59e9a6940f54c69dde05b5')
+build() {
+ cd ${pkgname}-${pkgver}
+
+ # missing Perl modules fix
+ sed -i 's/PREFIX=$(libdir)\/perl/DESTDIR=\.\.\/\.\.\/\.\.\/\.\.\/pkg\/ PREFIX=$(libdir)\/perl/' wml_common/Makefile.in
+ sed -i 's/$(MAKE) pure_perl_install $(MM_INSTALL_OPTS)/$(MAKE) pure_perl_install/' wml_common/Makefile.in
+
+ unset LDFLAGS
+ ./configure \
+ --prefix=/usr
+
+ # compile fixhack
+ sed -i 's#/usr/lib/perl5/core_perl/auto/DynaLoader/DynaLoader.a##' wml_backend/p3_eperl/Makefile
+ sed -i 's/extern struct option options\[\]\;//' ${srcdir}/${pkgname}-${pkgver}/wml_backend/p3_eperl/eperl_proto.h
+ sed -i 's|strip $dsttmp|#strip $dsttmp|' etc/shtool
+ mkdir -p ${pkgdir}/usr/bin ${pkgdir}/usr/lib/wml/exec ${pkgdir}/usr/man/man{1,3,7} ${pkgdir}/usr/man/cat{1,7}
+
+# make clean
+ make
+}
+
+package() {
+ cd ${pkgname}-${pkgver}
+
+ make prefix=${pkgdir}/usr install
+
+ [ -d ${pkgdir}/usr/man ] && mkdir -p ${pkgdir}/usr/share && mv ${pkgdir}/usr/man ${pkgdir}/usr/share
+}
diff --git a/community-staging/znc/PKGBUILD b/community-staging/znc/PKGBUILD
new file mode 100644
index 000000000..0bc108944
--- /dev/null
+++ b/community-staging/znc/PKGBUILD
@@ -0,0 +1,40 @@
+# $Id: PKGBUILD 47765 2011-05-25 13:51:21Z tdziedzic $
+# Maintainer: Kaiting Chen <kaitocracy@gmail.com>
+# Contributor: mickael9 <mickael9 at gmail dot com>
+
+pkgname=znc
+pkgver=0.098
+pkgrel=3
+pkgdesc='An IRC bouncer with modules & scripts support'
+url='http://en.znc.in/wiki/index.php/ZNC'
+license=('GPL2')
+arch=('i686' 'x86_64')
+
+depends=('c-ares' 'gcc-libs' 'openssl')
+makedepends=('swig' 'tcl' 'python' 'perl' 'cyrus-sasl')
+optdepends=('tcl: modtcl module'
+ 'python: modpython module'
+ 'perl: modperl module'
+ 'cyrus-sasl: saslauth module')
+
+source=("http://znc.in/releases/znc-${pkgver}.tar.gz")
+md5sums=('5667b4acb1f01309d6eded77abac700c')
+
+build() {
+ cd znc-${pkgver}
+
+ ./configure --prefix=/usr \
+ --enable-sasl \
+ --enable-tcl \
+ --enable-python \
+ --enable-perl \
+ --enable-extra
+
+ make
+}
+
+package() {
+ cd znc-${pkgver}
+
+ make DESTDIR=${pkgdir} install
+}
diff --git a/community-testing/gitg/PKGBUILD b/community-testing/gitg/PKGBUILD
new file mode 100644
index 000000000..19c71018e
--- /dev/null
+++ b/community-testing/gitg/PKGBUILD
@@ -0,0 +1,33 @@
+# Maintainer: Brad Fanella <bradfanella@archlinux.us>
+# Contributor: Blaž Tomžič <blaz.tomazic@gmail.com>
+# Contributor: Thomas Dziedzic < gostrc at gmail >
+# Contributor: Christoph Zeiler <archNOSPAM_at_moonblade.dot.org>
+# Contributor: M Rawash <mrawash@gmail.com>
+# Contributor: DonVla <donvla@users.sourceforge.net>
+
+pkgname=gitg
+pkgver=0.2.2
+pkgrel=1
+pkgdesc='A GIT repository viewer based on GTK+'
+arch=('i686' 'x86_64')
+url='http://trac.novowork.com/gitg/'
+license=('GPL')
+depends=('gconf' 'gtksourceview3' 'git' 'desktop-file-utils' 'gsettings-desktop-schemas')
+makedepends=('intltool')
+install="${pkgname}.install"
+source=("ftp://ftp.gnome.org/pub/GNOME/sources/gitg/0.2/${pkgname}-${pkgver}.tar.bz2")
+sha256sums=('cfa1b1d2bdd1211c09e00dca42130ea98e98fde576d85e18eabfde1802d0d04a')
+
+build() {
+ cd ${pkgname}-${pkgver}
+
+ ./configure \
+ --prefix=/usr
+ make
+}
+
+package() {
+ cd ${pkgname}-${pkgver}
+
+ make DESTDIR=${pkgdir} install
+}
diff --git a/community-testing/gitg/gitg.install b/community-testing/gitg/gitg.install
new file mode 100644
index 000000000..787d6085e
--- /dev/null
+++ b/community-testing/gitg/gitg.install
@@ -0,0 +1,17 @@
+# Maintainer: Brad Fanella <bradfanella@archlinux.us>
+# Contributor: DonVla <donvla@users.sourceforge.net>
+# gitg install file
+
+post_install() {
+ usr/bin/glib-compile-schemas usr/share/glib-2.0/schemas
+ update-desktop-database -q
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+post_remove() {
+ usr/bin/glib-compile-schemas usr/share/glib-2.0/schemas
+ update-desktop-database -q
+}
diff --git a/community/cclive/PKGBUILD b/community/cclive/PKGBUILD
index 6e5c1766d..8b57f4af2 100644
--- a/community/cclive/PKGBUILD
+++ b/community/cclive/PKGBUILD
@@ -1,11 +1,11 @@
-# $Id: PKGBUILD 43777 2011-03-29 18:26:08Z lfleischer $
+# $Id: PKGBUILD 47638 2011-05-24 14:28:23Z tdziedzic $
# Maintainer: Lukas Fleischer <archlinux at cryptocrack dot de>
# Contributor: joyfulgirl@archlinux.us
# Contributor: nathan owe ndowens04 at gmail dot com
pkgname=cclive
pkgver=0.7.3.1
-pkgrel=2
+pkgrel=3
pkgdesc='Commandline downloader for popular video websites.'
arch=('i686' 'x86_64')
url='http://cclive.sourceforge.net/'
@@ -16,11 +16,15 @@ source=("http://downloads.sourceforge.net/project/${pkgname}/0.7/${pkgname}-${pk
md5sums=('de25297e9f34677d4d1920078d9cf254')
build() {
- cd "${srcdir}/${pkgname}-${pkgver}"
- cmake -DCMAKE_BUILD_TYPE=debug -DCMAKE_INSTALL_PREFIX=/usr
+ cd ${pkgname}-${pkgver}
+
+ cmake \
+ -DCMAKE_BUILD_TYPE=debug \
+ -DCMAKE_INSTALL_PREFIX=/usr
}
package() {
- cd "${srcdir}/${pkgname}-${pkgver}"
+ cd ${pkgname}-${pkgver}
+
make DESTDIR="${pkgdir}" install
}
diff --git a/community/cherokee/PKGBUILD b/community/cherokee/PKGBUILD
index 0ee02bf51..dba1f7211 100644
--- a/community/cherokee/PKGBUILD
+++ b/community/cherokee/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 42879 2011-03-22 02:06:35Z foutrelis $
+# $Id: PKGBUILD 47874 2011-05-25 20:20:57Z foutrelis $
# Maintainer: Evangelos Foutras <foutrelis@gmail.com>
# Contributor: Link Dupont <link@subpop.net>
pkgname=cherokee
-pkgver=1.2.2
-pkgrel=2
+pkgver=1.2.98
+pkgrel=1
pkgdesc="A very fast, flexible and easy to configure Web Server"
arch=('i686' 'x86_64')
url="http://www.cherokee-project.com/"
@@ -25,7 +25,7 @@ options=('!libtool')
source=(http://www.cherokee-project.com/download/1.2/$pkgver/cherokee-$pkgver.tar.gz
cherokee.rc
cherokee.logrotate)
-md5sums=('6450f0aa116966227c477a1930292e53'
+md5sums=('21b01e7d45c0e82ecc0c4257a9c27feb'
'a2d2b69c6220fab57cda4f531b680f9f'
'8d69341bd4002bffd69c6e82ff6c905f')
@@ -38,10 +38,15 @@ build() {
# Use Python 2 in cherokee-admin
sed -i 's/"python"/"python2"/' cherokee/main_admin.c
- ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
- --with-wwwroot=/srv/http --disable-static \
- --with-wwwuser=http --with-wwwgroup=http \
- --enable-os-string="Arch Linux"
+ ./configure \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --disable-static \
+ --with-wwwroot=/srv/http \
+ --with-wwwuser=http \
+ --with-wwwgroup=http \
+ --enable-os-string="Arch Linux"
make
}
diff --git a/community/encfs/PKGBUILD b/community/encfs/PKGBUILD
index 48cde9db3..9bc1ae9d9 100644
--- a/community/encfs/PKGBUILD
+++ b/community/encfs/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 40979 2011-03-02 23:44:42Z tdziedzic $
+# $Id: PKGBUILD 47658 2011-05-24 17:28:48Z jelle $
# Contributor: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Jaroslaw Swierczynski <swiergot@aur.archlinux.org>
# Contributor: Sven Kauber, <celeon@gmail.com>
@@ -6,7 +6,7 @@
pkgname=encfs
pkgver=1.7.4
-pkgrel=3
+pkgrel=4
pkgdesc='Encrypted filesystem in user-space'
arch=('i686' 'x86_64')
url='http://www.arg0.net/encfs'
diff --git a/community/fatrat/PKGBUILD b/community/fatrat/PKGBUILD
index 11a5cd076..7411fcd43 100644
--- a/community/fatrat/PKGBUILD
+++ b/community/fatrat/PKGBUILD
@@ -1,8 +1,8 @@
-# $Id: PKGBUILD 40982 2011-03-03 00:04:39Z tdziedzic $
+# $Id: PKGBUILD 47629 2011-05-24 14:03:19Z tdziedzic $
# Maintainer: Lukas Jirkovsky <l.jirkovsky@gmail.com>
pkgname=fatrat
pkgver=1.1.3
-pkgrel=3
+pkgrel=4
pkgdesc="QT4 based download manager with support for HTTP, FTP, SFTP, BitTorrent, rapidshare and more"
arch=('i686' 'x86_64')
url="http://fatrat.dolezel.info/"
@@ -14,16 +14,20 @@ source=(http://www.dolezel.info/download/data/fatrat/fatrat-$pkgver.tar.gz)
md5sums=('6d4a00cdd0b59a05b1521184508d4637')
build() {
- cd "$srcdir"/$pkgname-$pkgver
+ cd $pkgname-$pkgver
export CXXFLAGS="${CXXFLAGS} -DBOOST_FILESYSTEM_VERSION=2"
- cmake -DWITH_EVERYTHING=ON -DCMAKE_INSTALL_PREFIX=/usr .
+ cmake \
+ -DWITH_EVERYTHING=ON \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ .
+
make
}
package() {
- cd "$srcdir"/$pkgname-$pkgver
+ cd $pkgname-$pkgver
make DESTDIR="$pkgdir" install
}
diff --git a/community/frogatto/PKGBUILD b/community/frogatto/PKGBUILD
index b4da0526c..fb3b6553d 100644
--- a/community/frogatto/PKGBUILD
+++ b/community/frogatto/PKGBUILD
@@ -1,11 +1,11 @@
-# $Id: PKGBUILD 46852 2011-05-12 23:55:35Z svenstaro $
+# $Id: PKGBUILD 47675 2011-05-24 19:05:16Z svenstaro $
# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
# Contributor: Tom Wambold <tom5760@gmail.com>
pkgname='frogatto'
arch=('i686' 'x86_64')
pkgver=1.1
-pkgrel=1
+pkgrel=2
pkgdesc="An old-school 2d platformer game, starring a certain quixotic frog"
url="http://www.frogatto.com"
license=('GPL')
diff --git a/community/glob2/PKGBUILD b/community/glob2/PKGBUILD
index c6606dc2d..94754172b 100644
--- a/community/glob2/PKGBUILD
+++ b/community/glob2/PKGBUILD
@@ -1,17 +1,17 @@
-# $Id: PKGBUILD 40961 2011-03-02 21:23:41Z lcarlier $
+# $Id: PKGBUILD 47655 2011-05-24 16:52:31Z schuay $
# Contributor: Jaroslaw Swierczynski <swiergot@aur.archlinux.org>
# Contributor: Roman Kyrylych <Roman.Kyrylych@gmail.com>
pkgname=glob2
pkgver=0.9.4.4
-pkgrel=7
+pkgrel=8
pkgdesc="RTS game which minimizes micro-management by automatically assigning tasks to units"
arch=('i686' 'x86_64')
url="http://www.globulation2.org/"
license=('GPL3')
-depends=('boost-libs>=1.46' 'sdl_net' 'sdl_image' 'sdl_ttf' 'libvorbis' 'speex' 'mesa' \
+depends=('boost-libs' 'sdl_net' 'sdl_image' 'sdl_ttf' 'libvorbis' 'speex' 'mesa' \
'fribidi' 'desktop-file-utils')
-makedepends=('scons' 'boost>=1.46')
+makedepends=('scons' 'boost')
install=glob2.install
source=(http://dl.sv.nongnu.org/releases/${pkgname}/0.9.4/${pkgname}-${pkgver}.tar.gz \
glob2-0.9.4.1-gcc44.patch)
diff --git a/community/glom/PKGBUILD b/community/glom/PKGBUILD
index e0e583718..e5251b1f4 100644
--- a/community/glom/PKGBUILD
+++ b/community/glom/PKGBUILD
@@ -1,20 +1,20 @@
-# $Id: PKGBUILD 41025 2011-03-03 06:39:10Z svenstaro $
+# $Id: PKGBUILD 47669 2011-05-24 17:51:15Z schuay $
# Maintainer: Roman Kyrylych <Roman.Kyrylych@gmail.com>
# Contributor: William Rea <sillywilly@gmail.com>
# Contributor: Jaroslav Lichtblau <dragonlord@aur.archlinux.org>
pkgname=glom
pkgver=1.16.1
-pkgrel=5
+pkgrel=6
pkgdesc="An easy-to-use database designer and user interface"
arch=('i686' 'x86_64')
url="http://www.glom.org/"
license=('GPL')
-depends=('libgdamm>=3.99.21' 'libxml++>=2.30.1' 'gconfmm>=2.28.2' 'pygtk'
+depends=('libgdamm' 'libxml++' 'gconfmm' 'pygtk'
'python2-gda' 'libgtksourceviewmm2' 'goocanvasmm' 'libepc'
'iso-codes' 'postgresql' 'hicolor-icon-theme' 'shared-mime-info'
- 'gtkmm>=2.22.0' 'boost-libs>=1.45' 'gettext')
-makedepends=('intltool' 'gnome-doc-utils>=0.20.2' 'boost>=1.45' 'python-sphinx' 'glibmm-docs')
+ 'gtkmm' 'boost-libs' 'gettext')
+makedepends=('intltool' 'gnome-doc-utils' 'boost' 'python-sphinx' 'mm-common')
options=('!libtool')
install=$pkgname.install
source=(http://ftp.gnome.org/pub/GNOME/sources/glom/${pkgver%.*}/$pkgname-$pkgver.tar.bz2)
@@ -22,6 +22,12 @@ md5sums=('9ae56e0886f14a48cedaef9beb9c3cc9')
build() {
cd "$srcdir/$pkgname-$pkgver"
+
+ # doctooldir is now owned by mm-common-util instead of glibmm
+ # the following sed line can be removed once (if) upstream provides a fixed
+ # configure script
+ sed -i 's%\(MMDOCTOOLDIR=`$PKG_CONFIG --variable=doctooldir \)glibmm-2.4%\1mm-common-util%' configure
+
./configure --prefix=/usr \
--with-postgres-utils=/usr/bin \
--disable-scrollkeeper \
diff --git a/community/gnash/PKGBUILD b/community/gnash/PKGBUILD
index 58fb9a24a..f962211b1 100644
--- a/community/gnash/PKGBUILD
+++ b/community/gnash/PKGBUILD
@@ -4,7 +4,7 @@
pkgbase=gnash
pkgname=(gnash-common gnash-gtk)
pkgver=0.8.9
-pkgrel=2
+pkgrel=3
arch=(i686 x86_64)
url="http://www.gnu.org/software/gnash/"
license=(GPL3)
@@ -20,6 +20,10 @@ md5sums=('5b2be6b04a1bcc5fb404cc377034499e')
build() {
cd "$srcdir/gnash-$pkgver"
+ # Version is now in version.h
+ sed -i 's/avcodec\.h/version.h/' macros/ffmpeg.m4
+ ./autogen.sh
+
./configure \
--prefix=/usr \
--sysconfdir=/etc \
diff --git a/community/gpsdrive/PKGBUILD b/community/gpsdrive/PKGBUILD
index e95ef92be..d7fafb285 100644
--- a/community/gpsdrive/PKGBUILD
+++ b/community/gpsdrive/PKGBUILD
@@ -1,11 +1,11 @@
-# $Id: PKGBUILD 45236 2011-04-18 13:25:52Z spupykin $
+# $Id: PKGBUILD 47650 2011-05-24 16:23:35Z jelle $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Tom Newsom <Jeepster@gmx.co.uk>
# Maintainer: damir <damir@archlinux.org>
pkgname=gpsdrive
pkgver=2.11
-pkgrel=7
+pkgrel=8
pkgdesc="A car (bike, ship, plane) navigation system"
arch=("i686" "x86_64")
url="http://www.gpsdrive.de/"
diff --git a/community/ibus-anthy/PKGBUILD b/community/ibus-anthy/PKGBUILD
index c907d99fd..e6bda9859 100644
--- a/community/ibus-anthy/PKGBUILD
+++ b/community/ibus-anthy/PKGBUILD
@@ -1,9 +1,10 @@
+# $Id: PKGBUILD 47888 2011-05-25 23:35:15Z ebelanger $
# Contributor: Rainy <rainylau(at)gmail(dot)com>
# Contributor: Lee.MaRS <leemars at gmail dot com>
# Maintainer: Daniel J Griffiths <ghost1227@archlinux.us>
pkgname=ibus-anthy
-pkgver=1.2.5
+pkgver=1.2.6
pkgrel=1
pkgdesc="Japanese input method Anthy IMEngine for IBus Framework"
arch=('i686' 'x86_64')
@@ -11,28 +12,22 @@ license=('LGPL')
url="http://ibus.googlecode.com"
depends=('ibus' 'anthy' 'python2')
makedepends=('swig' 'intltool')
-provides=('ibus-anthy')
options=('!libtool')
-source=("http://ibus.googlecode.com/files/${pkgname}-${pkgver}.tar.gz")
-md5sums=('00b44c874616d797a0117d087cf33341')
+source=(http://ibus.googlecode.com/files/${pkgname}-${pkgver}.tar.gz)
+md5sums=('894c7311f4d5c96b1fdb8b3795446ead')
build() {
- cd ${pkgname}-${pkgver}
-
- # python2 fix
+ cd "${srcdir}/${pkgname}-${pkgver}"
+# python2 fix
for file in setup/ibus-setup-anthy.in engine/ibus-engine-anthy.in; do
sed -i 's_exec python_exec python2_' $file
done
- ./configure \
- --prefix=/usr \
- --libexec=/usr/lib/ibus
-
+ ./configure --prefix=/usr --libexec=/usr/lib/ibus
make
}
package() {
- cd ${pkgname}-${pkgver}
-
- make DESTDIR=${pkgdir} install
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make DESTDIR="${pkgdir}" install
}
diff --git a/community/john/PKGBUILD b/community/john/PKGBUILD
index 16d1d2299..03d3c092b 100644
--- a/community/john/PKGBUILD
+++ b/community/john/PKGBUILD
@@ -5,8 +5,8 @@
# Contributor: Michal Krenek <mikos@sg1.cz>
pkgname=john
-pkgver=1.7.6
-pkgrel=3
+pkgver=1.7.7
+pkgrel=1
pkgdesc="John The Ripper - A fast password cracker. Additional patches (NTLM, MySQL, Kerberos V5, etc.) included."
arch=('i686' 'x86_64')
url="http://www.openwall.com/$pkgname/"
@@ -14,18 +14,18 @@ license=('GPL2' 'custom')
depends=('openssl')
backup=('etc/john/john.conf')
source=(http://www.openwall.com/$pkgname/g/$pkgname-$pkgver.tar.bz2
- http://www.openwall.com/john/g/john-$pkgver-jumbo-12.diff.gz
+ http://www.openwall.com/john/g/john-$pkgver-jumbo-1.diff.gz
ftp://ftp.kfki.hu/pub/packages/security/ssh/ossh/libdes-4.04b.tar.gz
params.h.patch)
-md5sums=('321ac0793f1aa4f0603b33a393133756'
- '405750a1d8f5c62d434e97cd2775843b'
+md5sums=('be316618de834a58573a21225d4a2674'
+ 'ee776d17726e7c15e90f2cf7ca85492f'
'c8d5c69f86c2eedb485583b0305284a1'
'f69ed632eba8fb9e45847a4b4a323787')
build() {
# jumbo patch
cd ${srcdir}/$pkgname-$pkgver
- patch -p1 < ${srcdir}/$pkgname-$pkgver-jumbo-12.diff
+ patch -p1 < ${srcdir}/$pkgname-$pkgver-jumbo-1.diff
cd ${srcdir}/john-$pkgver/src/
# patch default params
diff --git a/community/lightspark/PKGBUILD b/community/lightspark/PKGBUILD
index 95b4ef31e..36d912b1e 100644
--- a/community/lightspark/PKGBUILD
+++ b/community/lightspark/PKGBUILD
@@ -3,7 +3,7 @@
pkgname=lightspark
pkgver=0.4.7.1
-pkgrel=2
+pkgrel=3
pkgdesc='An alternative Flash Player for Linux.'
arch=('i686' 'x86_64')
url='http://lightspark.sourceforge.net'
diff --git a/community/mapnik/PKGBUILD b/community/mapnik/PKGBUILD
index 6dd50ad73..bcfc24c68 100644
--- a/community/mapnik/PKGBUILD
+++ b/community/mapnik/PKGBUILD
@@ -1,11 +1,11 @@
-# $Id: PKGBUILD 41028 2011-03-03 07:23:21Z tdziedzic $
+# $Id: PKGBUILD 47631 2011-05-24 14:03:50Z jelle $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: David Dent <thewinch@gmail.com>
# Contributor: orbisvicis <orbisvicis@gmail.com>
pkgname=mapnik
pkgver=0.7.1
-pkgrel=8
+pkgrel=9
pkgdesc="Free Toolkit for developing mapping applications. Above all Mapnik is about rendering beautiful maps."
arch=('i686' 'x86_64')
url="http://mapnik.org/"
@@ -42,6 +42,9 @@ build() {
INPUT_PLUGINS=all \
DESTDIR="$pkgdir"
scons
+}
+package(){
+ cd "$srcdir/$pkgname-$pkgver"
scons install
# fix permissions on SCons-autogenerated files
diff --git a/community/mongodb/PKGBUILD b/community/mongodb/PKGBUILD
index ff18bc930..c3e44c8fa 100644
--- a/community/mongodb/PKGBUILD
+++ b/community/mongodb/PKGBUILD
@@ -4,7 +4,7 @@
pkgname=mongodb
pkgver=1.8.1
-pkgrel=1
+pkgrel=2
pkgdesc='A high-performance, open source, schema-free document-oriented database.'
arch=('i686' 'x86_64')
url='http://www.mongodb.org'
@@ -16,16 +16,23 @@ backup=('etc/mongodb.conf')
install="mongodb.install"
source=("http://downloads.mongodb.org/src/mongodb-src-r${pkgver}.tar.gz"
'mongodb.rc'
- 'mongodb.conf')
+ 'mongodb.conf'
+ 'gcc46fixes.diff'
+ 'gcc46fixes2.diff')
md5sums=('e75a5cae641a53760df8cb866ad5d929'
'859f8f9bb32ef2bd21fec55ae9a87d0a'
- '9e0ea3f96732bb7811f0b64dace56440')
+ '9e0ea3f96732bb7811f0b64dace56440'
+ 'e90c78350e25df2d24f98e4767677d4b'
+ '5097de6ce2c347c3703ab8cf5a611052')
build() {
export SCONSFLAGS="$MAKEFLAGS"
cd ${pkgname}-src-r${pkgver}
+ patch -Np1 -i ${srcdir}/gcc46fixes.diff
+ patch -Np1 -i ${srcdir}/gcc46fixes2.diff
+
# scons is "special"
sed -i 's/-Wall -Wsign-compare/& -DBOOST_FILESYSTEM_VERSION=2/' SConstruct
diff --git a/community/mongodb/gcc46fixes.diff b/community/mongodb/gcc46fixes.diff
new file mode 100644
index 000000000..487c88f16
--- /dev/null
+++ b/community/mongodb/gcc46fixes.diff
@@ -0,0 +1,132 @@
+commit fa7cd65e480d80ba1cd196bdcec8f4714e361e8e
+Author: Mathias Stearn <redbeard0531@gmail.com>
+Date: Sun Apr 3 19:10:36 2011 -0400
+
+ g++ 4.6 compile (new -Wunused-but-set-variable warning)
+
+diff --git a/db/btree.cpp b/db/btree.cpp
+index 2758f72..4162d6a 100644
+--- a/db/btree.cpp
++++ b/db/btree.cpp
+@@ -1226,8 +1226,6 @@ namespace mongo {
+ out() << " " << thisLoc.toString() << ".insertHere " << key.toString() << '/' << recordLoc.toString() << ' '
+ << lchild.toString() << ' ' << rchild.toString() << " keypos:" << keypos << endl;
+
+- DiskLoc oldLoc = thisLoc;
+-
+ if ( !basicInsert(thisLoc, keypos, recordLoc, key, order) ) {
+ // If basicInsert() fails, the bucket will be packed as required by split().
+ thisLoc.btreemod()->split(thisLoc, keypos, recordLoc, key, order, lchild, rchild, idx);
+diff --git a/db/dbcommands.cpp b/db/dbcommands.cpp
+index 2580f86..56c0fce 100644
+--- a/db/dbcommands.cpp
++++ b/db/dbcommands.cpp
+@@ -1460,7 +1460,7 @@ namespace mongo {
+ uassert( 13049, "godinsert must specify a collection", !coll.empty() );
+ string ns = dbname + "." + coll;
+ BSONObj obj = cmdObj[ "obj" ].embeddedObjectUserCheck();
+- DiskLoc loc = theDataFileMgr.insertWithObjMod( ns.c_str(), obj, true );
++ theDataFileMgr.insertWithObjMod( ns.c_str(), obj, true );
+ return true;
+ }
+ } cmdGodInsert;
+diff --git a/db/index.cpp b/db/index.cpp
+index c696e27..218ecb3 100644
+--- a/db/index.cpp
++++ b/db/index.cpp
+@@ -127,7 +127,6 @@ namespace mongo {
+ void getIndexChanges(vector<IndexChanges>& v, NamespaceDetails& d, BSONObj newObj, BSONObj oldObj, bool &changedId) {
+ int z = d.nIndexesBeingBuilt();
+ v.resize(z);
+- NamespaceDetails::IndexIterator i = d.ii();
+ for( int i = 0; i < z; i++ ) {
+ IndexDetails& idx = d.idx(i);
+ BSONObj idxKey = idx.info.obj().getObjectField("key"); // eg { ts : 1 }
+diff --git a/db/update.cpp b/db/update.cpp
+index e173902..85c3f9c 100644
+--- a/db/update.cpp
++++ b/db/update.cpp
+@@ -992,7 +992,7 @@ namespace mongo {
+ BSONObj newObj = mss->createNewFromMods();
+ checkTooLarge(newObj);
+ assert(nsdt);
+- DiskLoc newLoc = theDataFileMgr.updateRecord(ns, d, nsdt, r, loc , newObj.objdata(), newObj.objsize(), debug);
++ theDataFileMgr.updateRecord(ns, d, nsdt, r, loc , newObj.objdata(), newObj.objsize(), debug);
+ }
+
+ if ( logop ) {
+diff --git a/dbtests/queryoptimizertests.cpp b/dbtests/queryoptimizertests.cpp
+index acf9217..2d6f752 100644
+--- a/dbtests/queryoptimizertests.cpp
++++ b/dbtests/queryoptimizertests.cpp
+@@ -1558,7 +1558,6 @@ namespace QueryOptimizerTests {
+ theDataFileMgr.insertWithObjMod( ns(), temp );
+ }
+ BSONObj hint = fromjson( "{$hint:{a:1,b:1}}" );
+- BSONElement hintElt = hint.firstElement();
+ auto_ptr< FieldRangeSet > frs( new FieldRangeSet( ns(), fromjson( "{a:5,b:{$in:[2,3,6,9,11]}}" ) ) );
+ QueryPlan qp( nsd(), 1, *frs, *frs, fromjson( "{a:5,b:{$in:[2,3,6,9,11]}}" ), BSONObj() );
+ boost::shared_ptr<Cursor> c = qp.newCursor();
+@@ -1581,7 +1580,6 @@ namespace QueryOptimizerTests {
+ theDataFileMgr.insertWithObjMod( ns(), temp );
+ }
+ BSONObj hint = fromjson( "{$hint:{a:1,b:1}}" );
+- BSONElement hintElt = hint.firstElement();
+ auto_ptr< FieldRangeSet > frs( new FieldRangeSet( ns(), fromjson( "{a:{$gte:5},b:{$in:[2,3,6,9,11]}}" ) ) );
+ QueryPlan qp( nsd(), 1, *frs, *frs, fromjson( "{a:{$gte:5},b:{$in:[2,3,6,9,11]}}" ), BSONObj() );
+ boost::shared_ptr<Cursor> c = qp.newCursor();
+diff --git a/shell/shell_utils.cpp b/shell/shell_utils.cpp
+index 6c398ef..53484fd 100644
+--- a/shell/shell_utils.cpp
++++ b/shell/shell_utils.cpp
+@@ -260,7 +260,7 @@ namespace mongo {
+ BSONElement e = oneArg(args);
+ bool found = false;
+
+- path root( args.firstElement().valuestrsafe() );
++ path root( e.valuestrsafe() );
+ if ( boost::filesystem::exists( root ) ) {
+ found = true;
+ boost::filesystem::remove_all( root );
+diff --git a/tools/tool.cpp b/tools/tool.cpp
+index 92a4bd4..150481b 100644
+--- a/tools/tool.cpp
++++ b/tools/tool.cpp
+@@ -413,14 +413,14 @@ namespace mongo {
+ ProgressMeter m( fileLength );
+
+ while ( read < fileLength ) {
+- int readlen = fread(buf, 4, 1, file);
++ fread(buf, 4, 1, file);
+ int size = ((int*)buf)[0];
+ if ( size >= BUF_SIZE ) {
+ cerr << "got an object of size: " << size << " terminating..." << endl;
+ }
+ uassert( 10264 , "invalid object size" , size < BUF_SIZE );
+
+- readlen = fread(buf+4, size-4, 1, file);
++ fread(buf+4, size-4, 1, file);
+
+ BSONObj o( buf );
+ if ( _objcheck && ! o.valid() ) {
+diff --git a/util/ramlog.h b/util/ramlog.h
+index fc588e6..b2f3aa0 100644
+--- a/util/ramlog.h
++++ b/util/ramlog.h
+@@ -108,7 +108,6 @@ namespace mongo {
+ vector<const char*> v;
+ get( v );
+
+- bool first = true;
+ s << "<pre>\n";
+ for( int i = 0; i < (int)v.size(); i++ ) {
+ assert( strlen(v[i]) > 20 );
+@@ -126,7 +125,7 @@ namespace mongo {
+ stringstream r;
+ if( nr == 1 ) r << "repeat last line";
+ else r << "repeats last " << nr << " lines; ends " << string(v[last]+4,0,15);
+- first = false; s << html::a("", r.str(), clean(v,i,x.str()));
++ s << html::a("", r.str(), clean(v,i,x.str()));
+ }
+ else s << x.str();
+ s << '\n';
diff --git a/community/mongodb/gcc46fixes2.diff b/community/mongodb/gcc46fixes2.diff
new file mode 100644
index 000000000..17257b136
--- /dev/null
+++ b/community/mongodb/gcc46fixes2.diff
@@ -0,0 +1,26 @@
+commit 5931bc0231c91ecdfc5dd313d8cce578eae426bb
+Author: Eliot Horowitz <eliot@10gen.com>
+Date: Wed Mar 30 01:01:18 2011 -0400
+
+ remove unused variable
+
+diff --git a/db/commands.cpp b/db/commands.cpp
+index c301fb3..0bbd765 100644
+--- a/db/commands.cpp
++++ b/db/commands.cpp
+@@ -127,7 +127,6 @@ namespace mongo {
+ if ( strcmp(p, ".$cmd") != 0 ) return false;
+
+ bool ok = false;
+- bool valid = false;
+
+ BSONElement e = jsobj.firstElement();
+ map<string,Command*>::iterator i;
+@@ -138,7 +137,6 @@ namespace mongo {
+ migrated over to the command object format.
+ */
+ else if ( (i = _commands->find(e.fieldName())) != _commands->end() ) {
+- valid = true;
+ string errmsg;
+ Command *c = i->second;
+ if ( c->adminOnly() && !startsWith(ns, "admin.") ) {
diff --git a/community/ogre/PKGBUILD b/community/ogre/PKGBUILD
index 9efa8a699..28e1c7066 100644
--- a/community/ogre/PKGBUILD
+++ b/community/ogre/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 46578 2011-05-09 16:26:46Z svenstaro $
+# $Id: PKGBUILD 47685 2011-05-24 19:41:50Z svenstaro $
# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
pkgbase=ogre
pkgname=('ogre' 'ogre-docs')
pkgver=1.7.3
-pkgrel=1
+pkgrel=2
pkgdesc="A scene-oriented, flexible 3D engine written in C++"
arch=('i686' 'x86_64')
url='http://www.ogre3d.org'
diff --git a/community/performous/PKGBUILD b/community/performous/PKGBUILD
index 3f839322c..16518d9c9 100644
--- a/community/performous/PKGBUILD
+++ b/community/performous/PKGBUILD
@@ -1,13 +1,13 @@
-# $Id: PKGBUILD 40964 2011-03-02 22:24:28Z lcarlier $
+# $Id: PKGBUILD 47641 2011-05-24 14:35:06Z tdziedzic $
# Maintainer : Laurent Carlier <lordheavym@gmail.com>
# Contributor: Christoph Zeiler <archNOSPAM_at_moonblade.dot.org>
pkgname=performous
pkgver=0.6.1
-pkgrel=4
+pkgrel=5
pkgdesc='A free game like "Singstar", "Rockband" or "Stepmania"'
arch=('i686' 'x86_64')
-url="http://$pkgname.org/"
+url="http://performous.org/"
license=('GPL')
depends=('boost-libs>=1.46' 'sdl' 'jack' 'imagemagick' 'ffmpeg' 'glew' 'libxml++' 'portaudio' 'portmidi' \
'opencv' 'librsvg' 'libjpeg' 'libpng' 'cairo')
diff --git a/community/pingus/PKGBUILD b/community/pingus/PKGBUILD
index a0458f18a..bba3aea9e 100644
--- a/community/pingus/PKGBUILD
+++ b/community/pingus/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 40956 2011-03-02 21:08:01Z lcarlier $
+# $Id: PKGBUILD 47672 2011-05-24 18:43:41Z tdziedzic $
# Maintainer: Eric Belanger <eric@archlinux.org>
pkgname=pingus
pkgver=0.7.3
-pkgrel=3
+pkgrel=4
pkgdesc="A Lemmings clone, i.e. a level-based puzzle game."
arch=('i686' 'x86_64')
url="http://pingus.seul.org"
@@ -17,14 +17,15 @@ sha1sums=('ca7fe5cea65fb3392d1e81056a879831925502f2'
'f35649f3b0b2bfcb01ce75085cf719dcaa609a54')
build() {
- cd "${srcdir}/${pkgname}-${pkgver}"
+ cd ${pkgname}-${pkgver}
scons prefix=/usr
}
package() {
- cd "${srcdir}/${pkgname}-${pkgver}"
+ cd ${pkgname}-${pkgver}
./install.sh "${pkgdir}/usr"
+
install -D -m644 "${srcdir}/pingus.desktop" "${pkgdir}/usr/share/applications/pingus.desktop"
}
diff --git a/community/pokerth/PKGBUILD b/community/pokerth/PKGBUILD
index c605b8ddc..040111905 100644
--- a/community/pokerth/PKGBUILD
+++ b/community/pokerth/PKGBUILD
@@ -1,11 +1,11 @@
-# $Id: PKGBUILD 45135 2011-04-17 08:17:41Z tdziedzic $
+# $Id: PKGBUILD 47635 2011-05-24 14:23:55Z tdziedzic $
# Maintainer: Mateusz Herych <heniekk@gmail.com>
# Contributor: Vasco Costa <vasco.costa@meiodigital.com>
pkgname=pokerth
_realname=PokerTH
pkgver=0.8.3
-pkgrel=3
+pkgrel=4
pkgdesc="Poker game written in C++/QT4"
arch=('i686' 'x86_64')
url="http://www.pokerth.net/"
@@ -16,16 +16,23 @@ source=(http://downloads.sourceforge.net/sourceforge/pokerth/$_realname-$pkgver-
md5sums=('adbe56ad5f547eb255dad91de564bf1c')
build() {
- cd "$srcdir/$_realname-$pkgver-src"
+ cd $_realname-$pkgver-src
sed -i 's/QMAKE_CXXFLAGS += -std=gnu++0x/QMAKE_CXXFLAGS += -std=gnu++0x -DBOOST_FILESYSTEM_VERSION=2/' *.pro
+
+ # fix g++: error: unrecognized option '-no_dead_strip_inits_and_terms'
+ sed \
+ -e 's/QMAKE_LFLAGS += -no_dead_strip_inits_and_terms//' \
+ -i zlib_compress.pro pokerth_game.pro pokerth_server.pro
+
qmake $pkgname.pro
+
make
}
package() {
- cd "$srcdir/$_realname-$pkgver-src"
+ cd $_realname-$pkgver-src
make INSTALL_ROOT="$pkgdir" install
diff --git a/community/qbittorrent/PKGBUILD b/community/qbittorrent/PKGBUILD
index 25d24c608..ae549bae2 100644
--- a/community/qbittorrent/PKGBUILD
+++ b/community/qbittorrent/PKGBUILD
@@ -4,7 +4,7 @@
pkgname=qbittorrent
pkgver=2.7.3
-pkgrel=1
+pkgrel=2
pkgdesc="A bittorrent client written in C++ / Qt4 using the good libtorrent library"
arch=('i686' 'x86_64')
url="http://www.qbittorrent.org/"
diff --git a/community/schroot/PKGBUILD b/community/schroot/PKGBUILD
index 117a2ac93..949227809 100644
--- a/community/schroot/PKGBUILD
+++ b/community/schroot/PKGBUILD
@@ -1,15 +1,15 @@
-# $Id: PKGBUILD 43438 2011-03-26 08:44:13Z spupykin $
+# $Id: PKGBUILD 47626 2011-05-24 13:55:50Z tdziedzic $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Andreas Wagner <Andreas dot Wagner at em dot uni-frankfurt dot de>
pkgname=schroot
-pkgver=1.4.21
+pkgver=1.4.22
pkgrel=1
pkgdesc="Allows users to execute shell commands under different root filesystems. \
(Successor to dchroot)."
url="http://packages.qa.debian.org/s/schroot.html"
license=('GPL3')
-depends=('pam' 'lockdev' 'boost>=1.41' 'e2fsprogs')
+depends=('pam' 'lockdev' 'boost' 'e2fsprogs')
optdepends=('btrfs-progs-unstable' 'lvm2')
arch=('i686' 'x86_64')
conflicts=('dchroot')
@@ -24,13 +24,13 @@ source=("http://ftp.debian.org/debian/pool/main/s/$pkgname/${pkgname}_${pkgver}.
'script-arch32'
'copyfiles-arch32'
'mount-arch32')
-md5sums=('fbbb65213e26a0a3e2e1bac04a24d20d'
+md5sums=('0dde4c76b1623cc277d92f8dc06109d1'
'8e86445e188129232e1782d978dfc967'
'd4558d5691fbdaa46ce669e8f327133b'
'f0d5d5b5e34a860f6f90b5628c680f46')
build() {
- cd ${srcdir}/${pkgname}-${pkgver}
+ cd ${pkgname}-${pkgver}
export LDFLAGS="${LDFLAGS//-Wl,--as-needed}"
@@ -43,7 +43,13 @@ build() {
# --enable-csbuild
make
+}
+
+package() {
+ cd ${pkgname}-${pkgver}
+
make DESTDIR=$pkgdir install
+
install -m 644 ${srcdir}/script-arch32 ${pkgdir}/etc/schroot
install -m 644 ${srcdir}/mount-arch32 ${pkgdir}/etc/schroot
install -m 644 ${srcdir}/copyfiles-arch32 ${pkgdir}/etc/schroot
diff --git a/community/smc/PKGBUILD b/community/smc/PKGBUILD
index 05bdc6ea2..a3fe89406 100644
--- a/community/smc/PKGBUILD
+++ b/community/smc/PKGBUILD
@@ -1,17 +1,17 @@
-# $Id: PKGBUILD 40953 2011-03-02 21:01:34Z lcarlier $
+# $Id: PKGBUILD 47652 2011-05-24 16:35:46Z schuay $
# Maintainer:
# Contributor: Juergen Hoetzel <juergen@archlinux.org>
# Contributor: Kritoke <typeolinux@yahoo.com>
pkgname=smc
pkgver=1.9
-pkgrel=10
+pkgrel=11
pkgdesc="Secret Maryo Chronicles"
arch=('i686' 'x86_64')
url="http://www.secretmaryo.org/"
license=('GPL3')
-depends=('sdl_image' 'sdl_ttf' 'sdl_mixer' 'cegui>=0.7' 'boost-libs>=1.46' 'smc-data')
-makedepends=('autoconf' 'automake' 'boost>=1.46')
+depends=('sdl_image' 'sdl_ttf' 'sdl_mixer' 'cegui' 'boost-libs' 'smc-data')
+makedepends=('autoconf' 'automake' 'boost')
source=(http://downloads.sourceforge.net/smclone/$pkgname-$pkgver.tar.bz2
smc-for-cegui-v0-7.diff
smc.desktop
diff --git a/community/spring/PKGBUILD b/community/spring/PKGBUILD
index 26101bb64..5430aace6 100644
--- a/community/spring/PKGBUILD
+++ b/community/spring/PKGBUILD
@@ -1,11 +1,11 @@
-# $Id: PKGBUILD 41178 2011-03-04 19:28:06Z svenstaro $
+# $Id: PKGBUILD 47736 2011-05-25 04:13:58Z svenstaro $
# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
# Contributor: Arkham <arkham at archlinux dot us>
# Contributor: Christoph Zeiler <archNOSPAM_at_moonblade.dot.org>
pkgname=spring
pkgver=0.82.7.1
-pkgrel=2
+pkgrel=3
pkgdesc='A free 3D real-time-strategy (RTS) game engine'
arch=('i686' 'x86_64')
url="http://springrts.com/"
@@ -14,8 +14,10 @@ depends=('openal' 'glew' 'boost-libs' 'freetype2' 'devil' 'libvorbis')
makedepends=('boost' 'cmake' 'zip' 'lzma-utils' 'p7zip' 'python' 'java-environment')
optdepends=('python: python-based bots'
'java-runtime: java-based bots')
-source=(http://downloads.sourceforge.net/sourceforge/springrts/${pkgname}_${pkgver}_src.tar.lzma)
-md5sums=('378cf0b18a5dd5b840964e5945778503')
+source=(http://downloads.sourceforge.net/sourceforge/springrts/${pkgname}_${pkgver}_src.tar.lzma
+ gcc46.patch)
+md5sums=('378cf0b18a5dd5b840964e5945778503'
+ 'e9586b611db1ed04fe4f0c5982fda7d2')
build() {
bsdtar -xf ${pkgname}_${pkgver}_src.tar.lzma
@@ -24,6 +26,7 @@ build() {
sed -i '1i\
#include <list>' rts/lib/lobby/Connection.h
+ patch -Np1 < $srcdir/gcc46.patch
cmake . \
-DCMAKE_INSTALL_PREFIX=/usr \
-DDATADIR=share/spring
diff --git a/community/springlobby/PKGBUILD b/community/springlobby/PKGBUILD
index 9aaa521f3..2ccb51e50 100644
--- a/community/springlobby/PKGBUILD
+++ b/community/springlobby/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 46590 2011-05-09 22:11:42Z svenstaro $
+# $Id: PKGBUILD 47682 2011-05-24 19:40:45Z svenstaro $
# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
# Contributor: DuGi <dugi@irc.pl>
pkgname=springlobby
pkgver=0.131
-pkgrel=1
+pkgrel=2
pkgdesc="A free cross-platform lobby client for the Spring RTS project."
arch=('i686' 'x86_64')
url="http://springlobby.info/"
diff --git a/community/tagpy/PKGBUILD b/community/tagpy/PKGBUILD
index 95b9e5409..246a92e12 100644
--- a/community/tagpy/PKGBUILD
+++ b/community/tagpy/PKGBUILD
@@ -1,11 +1,11 @@
-# $Id: PKGBUILD 41005 2011-03-03 04:37:04Z tdziedzic $
+# $Id: PKGBUILD 47614 2011-05-24 13:24:59Z jelle $
# Maintainer: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Callan Barrett <wizzomafizzo@gmail.com>
# Contributor: Scott Horowitz <stonecrest@gmail.com>
pkgname=tagpy
pkgver=0.94.8
-pkgrel=3
+pkgrel=4
pkgdesc="Python bindings for TagLib"
arch=('i686' 'x86_64')
url="http://pypi.python.org/pypi/tagpy"
@@ -32,6 +32,5 @@ build() {
package(){
cd ${srcdir}/${pkgname}-${pkgver}
python2 setup.py install --root="${pkgdir}" --optimize=1
-
install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/$pkgname/LICENSE"
}
diff --git a/community/twinkle/PKGBUILD b/community/twinkle/PKGBUILD
index 152d08e3d..02e37d080 100644
--- a/community/twinkle/PKGBUILD
+++ b/community/twinkle/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 47223 2011-05-19 07:52:09Z andrea $
+# $Id: PKGBUILD 47620 2011-05-24 13:41:29Z jelle $
# Maintainer:
# Contributor: Jeff Mickey <jeff@archlinux.org>
# Contributor: Alexander Baldeck <alexander@archlinux.org>
@@ -6,7 +6,7 @@
pkgname=twinkle
pkgver=1.4.2
-pkgrel=9
+pkgrel=10
pkgdesc="A softphone for voice over IP and instant messaging communications using the SIP protocol"
arch=('i686' 'x86_64')
url="http://www.twinklephone.com/"
diff --git a/extra/akonadi/PKGBUILD b/extra/akonadi/PKGBUILD
index 4cef1ed2b..3e181dafa 100644
--- a/extra/akonadi/PKGBUILD
+++ b/extra/akonadi/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 122924 2011-05-07 10:20:40Z andrea $
+# $Id: PKGBUILD 124793 2011-05-24 13:10:03Z andrea $
# Maintainer: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Pierre Schmitz <pierre@archlinux.de>
pkgname=akonadi
pkgver=1.5.3
-pkgrel=1
+pkgrel=2
pkgdesc="PIM layer, which provides an asynchronous API to access all kind of PIM data"
arch=('i686' 'x86_64')
url='http://pim.kde.org/akonadi'
diff --git a/extra/avogadro/PKGBUILD b/extra/avogadro/PKGBUILD
index 3e20b8186..6f1a6baf5 100644
--- a/extra/avogadro/PKGBUILD
+++ b/extra/avogadro/PKGBUILD
@@ -1,15 +1,15 @@
-# $Id: PKGBUILD 120742 2011-04-26 09:43:00Z andrea $
+# $Id: PKGBUILD 124796 2011-05-24 13:18:50Z andrea $
# Maintainer: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Nick B <Shirakawasuna at gmail _dot_com>
pkgname=avogadro
pkgver=1.0.3
-pkgrel=1
+pkgrel=2
pkgdesc="An advanced molecular editor based on Qt"
arch=('i686' 'x86_64')
url="http://avogadro.openmolecules.net/wiki/Main_Page"
license=('GPL2')
-depends=('eigen' 'openbabel' 'python2-qt' 'boost-libs' 'glew' 'python2-numpy')
+depends=('eigen' 'openbabel' 'python2-pyqt' 'boost-libs' 'glew' 'python2-numpy')
makedepends=('cmake' 'boost')
source=("http://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.bz2")
md5sums=('92c2702c1980f70fb6d87a1a58147911')
diff --git a/extra/boost/PKGBUILD b/extra/boost/PKGBUILD
index d4f0c9c78..d95541e63 100644
--- a/extra/boost/PKGBUILD
+++ b/extra/boost/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 114691 2011-03-15 13:50:13Z andrea $
+# $Id: PKGBUILD 124783 2011-05-24 12:31:42Z ibiru $
# Maintainer: kevin <kevin@archlinux.org>
# Contributor: Giovanni Scafora <giovanni@archlinux.org>
# Contributor: Kritoke <kritoke@gamebox.net>
@@ -6,9 +6,9 @@
pkgbase=boost
pkgname=('boost-libs' 'boost')
-pkgver=1.46.0
+pkgver=1.46.1
_boostver=${pkgver//./_}
-pkgrel=4
+pkgrel=1
arch=('i686' 'x86_64')
url="http://www.boost.org/"
makedepends=('icu' 'python' 'python2' 'bzip2' 'zlib' 'openmpi')
@@ -16,7 +16,7 @@ source=(http://downloads.sourceforge.net/sourceforge/${pkgbase}/${pkgbase}_${_bo
4994-compile-fix-for-Python32-v2.patch
boost-1.46.0-spirit.patch)
license=('custom')
-md5sums=('820393d5746553c192db7b81ba0e53fe'
+md5sums=('341e5d993b19d099bf1a548495ea91ec'
'cb59e8adbf2a45ef9264a2f4ab92b849'
'9d6e2f13fef23bf27d7bdddc104e182a')
diff --git a/extra/bzr/PKGBUILD b/extra/bzr/PKGBUILD
index 849d9913b..7ae96eb77 100644
--- a/extra/bzr/PKGBUILD
+++ b/extra/bzr/PKGBUILD
@@ -1,19 +1,18 @@
-# $Id: PKGBUILD 119485 2011-04-11 18:46:01Z eric $
+# $Id: PKGBUILD 124960 2011-05-25 12:48:29Z andrea $
# Maintainer :
# Contributor: Hugo Doria <hugo@archlinux.org>
pkgname=bzr
-pkgver=2.3.1
+pkgver=2.3.3
pkgrel=1
pkgdesc="A decentralized revision control system (bazaar)"
arch=('i686' 'x86_64')
-url="http://www.bazaar-vcs.org"
+url="http://bazaar.canonical.com/en/"
license=('GPL')
depends=('python2')
optdepends=('python-paramiko: for sftp support')
-source=(http://launchpad.net/bzr/${pkgver%.*}/${pkgver}/+download/${pkgname}-${pkgver}.tar.gz)
-md5sums=('1a4367ce59a2880f321ecb882e195856')
-sha1sums=('49b9dfb5a01ffd87a120f8a7abf4833a482ba245')
+source=("http://launchpad.net/${pkgname}/${pkgver%.*}/${pkgver}/+download/${pkgname}-${pkgver}.tar.gz")
+md5sums=('a8ca30af0431c691ce7e71a74497e31d')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
@@ -23,7 +22,7 @@ build() {
package() {
cd "${srcdir}/${pkgname}-${pkgver}"
- python2 setup.py install --prefix=/usr --root="${pkgdir}"
+ python2 setup.py install --prefix=/usr --root="${pkgdir}" --optimize=1
# bash-completion
install -D -m644 contrib/bash/bzr "${pkgdir}/etc/bash_completion.d/bzr"
diff --git a/extra/claws-mail/PKGBUILD b/extra/claws-mail/PKGBUILD
index 7e3760798..09a8564f2 100644
--- a/extra/claws-mail/PKGBUILD
+++ b/extra/claws-mail/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 121163 2011-04-29 06:26:08Z andyrtr $
+# $Id: PKGBUILD 124918 2011-05-25 08:15:13Z ibiru $
# Maintainer: Andreas Radke <andyrtr@archlinux.org>
pkgname=claws-mail
pkgver=3.7.9
-pkgrel=2
+pkgrel=3
pkgdesc="A GTK+ based e-mail client."
arch=('i686' 'x86_64')
license=('GPL3')
@@ -20,12 +20,17 @@ replaces=('sylpheed-claws')
provides=('claws')
options=(!libtool)
install=claws-mail.install
-source=(http://downloads.sourceforge.net/sourceforge/sylpheed-claws/${pkgname}-${pkgver}.tar.bz2)
-md5sums=('2f9d2dcabf84e312cfeb56efa799b5b3')
+source=(http://downloads.sourceforge.net/sourceforge/sylpheed-claws/${pkgname}-${pkgver}.tar.bz2
+ claws-notify-crash.patch)
+md5sums=('2f9d2dcabf84e312cfeb56efa799b5b3'
+ '9a2903449f679344b5f5f51c91825b45')
build() {
cd ${srcdir}/${pkgname}-${pkgver}
+
+ patch -Np0 -i $srcdir/claws-notify-crash.patch
sed -i 's@^#!.*python.*@#!/usr/bin/python2@' tools/*.py
+
./configure --prefix=/usr --disable-static \
--enable-enchant \
--enable-gnutls \
diff --git a/extra/claws-mail/claws-notify-crash.patch b/extra/claws-mail/claws-notify-crash.patch
new file mode 100644
index 000000000..e1d4eb686
--- /dev/null
+++ b/extra/claws-mail/claws-notify-crash.patch
@@ -0,0 +1,18 @@
+Index: src/main.c
+===================================================================
+RCS file: //claws/src/main.c,v
+retrieving revision 1.115.2.237
+retrieving revision 1.115.2.238
+diff -u -r1.115.2.237 -r1.115.2.238
+--- src/main.c 10 Apr 2011 17:19:04 -0000 1.115.2.237
++++ src/main.c 30 Apr 2011 19:27:15 -0000 1.115.2.238
+@@ -331,7 +331,7 @@
+ gtk_widget_show(hack);
+ }
+
+- xdisplay = gdk_display_get_default();
++ xdisplay = GDK_DISPLAY_XDISPLAY(gdk_display_get_default());
+ sn_display = sn_display_new(xdisplay,
+ sn_error_trap_push,
+ sn_error_trap_pop);
+
diff --git a/extra/ekiga/PKGBUILD b/extra/ekiga/PKGBUILD
index 1b9b69283..7d4d83910 100644
--- a/extra/ekiga/PKGBUILD
+++ b/extra/ekiga/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 122127 2011-05-02 09:20:52Z heftig $
+# $Id: PKGBUILD 124817 2011-05-24 15:39:18Z heftig $
# Maintainer: Jan de Groot <jgc@archlinux.org>
# Contributor: Tom K <tomk@runbox.com>
pkgname=ekiga
pkgver=3.3.0
-pkgrel=3
+pkgrel=4
pkgdesc="VOIP/Videoconferencing app with full SIP and H.323 support (GnomeMeeting expanded and renamed)"
url="http://www.ekiga.org"
license=(GPL)
diff --git a/extra/help2man/PKGBUILD b/extra/help2man/PKGBUILD
index 171eb100d..ee5284faf 100644
--- a/extra/help2man/PKGBUILD
+++ b/extra/help2man/PKGBUILD
@@ -1,17 +1,18 @@
-# $Id: PKGBUILD 116002 2011-03-22 15:28:48Z giovanni $
+# $Id: PKGBUILD 124968 2011-05-25 13:58:20Z giovanni $
# Maintainer: Giovanni Scafora <giovanni@archlinux.org>
# Contributor: Paul Mattal <paul@mattal.com>
pkgname=help2man
-pkgver=1.39.2
+pkgver=1.39.4
pkgrel=1
pkgdesc="Conversion tool to create man files"
arch=('i686' 'x86_64')
url="http://www.gnu.org/software/help2man/"
license=('GPL')
depends=('perl-locale-gettext')
+install=help2man.install
source=("http://ftp.gnu.org/gnu/${pkgname}/${pkgname}-${pkgver}.tar.gz")
-md5sums=('36659da3ba7a9a51813e1c4848900a28')
+md5sums=('6b1160697451ba87067231d172285840')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
diff --git a/extra/help2man/help2man.install b/extra/help2man/help2man.install
new file mode 100644
index 000000000..ab6585b91
--- /dev/null
+++ b/extra/help2man/help2man.install
@@ -0,0 +1,18 @@
+info_dir=/usr/share/info
+info_files=(help2man.info)
+
+post_install() {
+ for f in ${info_files[@]}; do
+ install-info ${info_dir}/$f.gz ${info_dir}/dir 2> /dev/null
+ done
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+pre_remove() {
+ for f in ${info_files[@]}; do
+ install-info --delete ${info_dir}/$f.gz ${info_dir}/dir 2> /dev/null
+ done
+}
diff --git a/extra/hugin/PKGBUILD b/extra/hugin/PKGBUILD
index 23aa5c7e8..736aeb71b 100644
--- a/extra/hugin/PKGBUILD
+++ b/extra/hugin/PKGBUILD
@@ -1,11 +1,11 @@
-# $Id: PKGBUILD 112014 2011-03-03 05:10:44Z eric $
+# $Id: PKGBUILD 124912 2011-05-25 06:37:46Z eric $
# Maintainer: Tobias Kieslich <tobias@archlinux.org>
# Contributor: Giovanni Scafora <giovanni@archlinux.org>
# Contributor: Dominik Ryba <domryba@post.pl>
pkgname=hugin
pkgver=2010.4.0
-pkgrel=2
+pkgrel=3
pkgdesc="A frontend to the panorama-tools"
arch=('i686' 'x86_64')
url="http://hugin.sourceforge.net/"
@@ -14,13 +14,15 @@ depends=('wxgtk' 'libpano13' 'boost-libs' 'enblend-enfuse' 'exiv2' 'openexr'
'autopano-sift-c' 'lapack' 'desktop-file-utils' 'make' 'perl-exiftool')
makedepends=('zip' 'cmake' 'boost')
install=${pkgname}.install
-source=(http://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.bz2)
-md5sums=('bfd716655461987312b2f2f00c90dcc5')
-sha1sums=('47f25c0a8b97c27108e567bcd22203c87f268d07')
+source=(http://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.bz2 hugin-gcc46.patch)
+md5sums=('bfd716655461987312b2f2f00c90dcc5'
+ '4393c7b31da60f230c85e63a6a2e43a0')
+sha1sums=('47f25c0a8b97c27108e567bcd22203c87f268d07'
+ '52798a155a037f853f41402f797e8a4cb6bb3e07')
build() {
cd "${srcdir}"
-
+ (cd ${pkgname}-${pkgver}; patch -p1 -i ../hugin-gcc46.patch)
mkdir build && cd build
cmake "${srcdir}/${pkgname}-${pkgver}" \
diff --git a/extra/hugin/hugin-gcc46.patch b/extra/hugin/hugin-gcc46.patch
new file mode 100644
index 000000000..98a70ad50
--- /dev/null
+++ b/extra/hugin/hugin-gcc46.patch
@@ -0,0 +1,16 @@
+
+diff -r 0377a1af6110 -r 1fc6ad6e7c7a src/foreign/vigra/vigra/multi_iterator.hxx
+--- a/src/foreign/vigra/vigra/multi_iterator.hxx Mon Jun 25 16:36:21 2007 +0000
++++ b/src/foreign/vigra/vigra/multi_iterator.hxx Tue Jan 25 21:14:13 2011 +0000
+@@ -41,6 +41,7 @@
+ #define VIGRA_MULTI_ITERATOR_HXX
+
+ #include <sys/types.h>
++#include <stddef.h>
+ #include "tinyvector.hxx"
+ #include "iteratortags.hxx"
+
+
+
+
+
diff --git a/extra/kdeedu/PKGBUILD b/extra/kdeedu/PKGBUILD
index a5770014e..a5a24fb20 100644
--- a/extra/kdeedu/PKGBUILD
+++ b/extra/kdeedu/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 122727 2011-05-06 08:29:55Z andrea $
+# $Id: PKGBUILD 124802 2011-05-24 13:56:35Z andrea $
# Maintainer: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Pierre Schmitz <pierre@archlinux.de>
@@ -26,7 +26,7 @@ pkgname=('kdeedu-blinken'
'kdeedu-rocs'
'kdeedu-step')
pkgver=4.6.3
-pkgrel=1
+pkgrel=2
arch=('i686' 'x86_64')
url='http://www.kde.org'
license=('GPL' 'LGPL' 'FDL')
@@ -46,7 +46,6 @@ build() {
cd ${srcdir}
mkdir build
cd build
- # rpath is needed for cantor to find R
cmake ../${pkgbase}-${pkgver} \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_SKIP_RPATH=OFF \
diff --git a/extra/libftdi/PKGBUILD b/extra/libftdi/PKGBUILD
index 8d89b2f88..b43d6ab53 100644
--- a/extra/libftdi/PKGBUILD
+++ b/extra/libftdi/PKGBUILD
@@ -1,19 +1,19 @@
-# $Id: PKGBUILD 101400 2010-11-29 04:43:52Z allan $
+# $Id: PKGBUILD 125350 2011-05-26 02:17:50Z eric $
# Contributor: Tobias Powalowski <tpowa@archlinux.org>
pkgname=libftdi
-pkgver=0.18
-pkgrel=2
+pkgver=0.19
+pkgrel=1
pkgdesc="A library to talk to FTDI chips"
-arch=("i686" "x86_64")
+arch=('i686' 'x86_64')
url="http://www.intra2net.com/en/developer/libftdi/download.php"
-license=("GPL2" "LGPL2.1")
-depends=('libusb-compat')
-makedepends=("boost")
+license=('GPL2' 'LGPL2.1')
+depends=('libusb-compat' 'gcc-libs')
+makedepends=('boost')
options=('!libtool')
source=("http://www.intra2net.com/en/developer/libftdi/download/$pkgname-$pkgver.tar.gz")
-md5sums=('916f65fa68d154621fc0cf1f405f2726')
-sha1sums=('52401db0e7cb90a5d83f82c2859a4f8d44e52579')
+md5sums=('e6e25f33b4327b1b7aa1156947da45f3')
+sha1sums=('0f08caf8e754ace69cd682489fae3f7f09920fe1')
build() {
cd "$srcdir/$pkgname-$pkgver"
diff --git a/extra/liborigin2/PKGBUILD b/extra/liborigin2/PKGBUILD
index 1944f0fe8..9d29118a9 100644
--- a/extra/liborigin2/PKGBUILD
+++ b/extra/liborigin2/PKGBUILD
@@ -1,11 +1,11 @@
-# $Id: PKGBUILD 112096 2011-03-03 20:59:03Z eric $
+# $Id: PKGBUILD 124976 2011-05-25 14:38:34Z ibiru $
# Maintainer: Ronald van Haren <ronald.archlinux.org>
# Contributor: damir <damir@archlinux.org>
pkgbase=liborigin2
pkgname=('liborigin2' 'liborigin2-docs')
pkgver=20100913
-pkgrel=3
+pkgrel=4
arch=('i686' 'x86_64')
url="http://soft.proindependent.com/liborigin2/"
license=('GPL3')
diff --git a/extra/libpst/PKGBUILD b/extra/libpst/PKGBUILD
index ea581fe03..614c58ea4 100644
--- a/extra/libpst/PKGBUILD
+++ b/extra/libpst/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 112025 2011-03-03 09:42:31Z eric $
+# $Id: PKGBUILD 124979 2011-05-25 14:53:00Z ibiru $
# Maintainer: Jan de Groot <jgc@archlinux.org>
pkgbase=libpst
pkgname=('libpst' 'libpst-docs')
pkgver=0.6.49
-pkgrel=2
+pkgrel=3
arch=('i686' 'x86_64')
url="http://www.five-ten-sg.com/libpst/"
license=('GPL')
diff --git a/extra/libtorrent-rasterbar/PKGBUILD b/extra/libtorrent-rasterbar/PKGBUILD
index 44968f451..275c56431 100644
--- a/extra/libtorrent-rasterbar/PKGBUILD
+++ b/extra/libtorrent-rasterbar/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 120130 2011-04-20 11:35:26Z ibiru $
+# $Id: PKGBUILD 124787 2011-05-24 12:59:08Z ibiru $
# Maintainer : Ionut Biru <ibiru@archlinux.org>
# Contributor: Hugo Doria <hugo@archlinux.org>
pkgname=libtorrent-rasterbar
pkgver=0.15.6
-pkgrel=1
+pkgrel=2
pkgdesc="A C++ library that aims to be a good alternative to all the other bittorrent implementations around"
url="http://www.rasterbar.com/products/libtorrent/"
arch=('i686' 'x86_64')
diff --git a/extra/lyx/PKGBUILD b/extra/lyx/PKGBUILD
index dec0a4419..ad728c47b 100644
--- a/extra/lyx/PKGBUILD
+++ b/extra/lyx/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 112021 2011-03-03 08:05:12Z eric $
+# $Id: PKGBUILD 124982 2011-05-25 15:39:01Z ibiru $
# Maintainer: Ronald van Haren <ronald.archlinux.org>
# Contributor: Jason Chu <jason@archlinux.org>
pkgname=lyx
-pkgver=1.6.9
-pkgrel=2
+pkgver=1.6.10
+pkgrel=1
pkgdesc="An advanced open-source document processor."
arch=('i686' 'x86_64')
url="http://www.lyx.org"
@@ -12,14 +12,15 @@ depends=('qt' 'texlive-core' 'python2' 'perl' 'imagemagick' 'aspell' 'aiksaurus'
makedepends=('boost')
license=('GPL')
source=(ftp://ftp.lyx.org/pub/lyx/stable/1.6.x/$pkgname-$pkgver.tar.bz2 \
- lyx.desktop)
-sha1sums=('a1acacc8a26546542e32977ae222e811c98b1ca4'
+ lyx.desktop)
+sha1sums=('344e14897ea7d004bf181eac39355f1b08f0af83'
'e207a0b14d58aeb7b83f8fc47ab2e668cbc66844')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
find . -type f -exec sed -i 's|#!.*python|#!/usr/bin/env python2|' {} +
sed -i 's|"python|"python2|' lib/configure.py src/support/os.cpp
+ export CXXFLAGS="$CXXFLAGS -fpermissive"
./configure --prefix=/usr \
--with-frontend=qt4 --without-included-boost
make
diff --git a/extra/mkvtoolnix/PKGBUILD b/extra/mkvtoolnix/PKGBUILD
index f0d957de4..6b609da9d 100644
--- a/extra/mkvtoolnix/PKGBUILD
+++ b/extra/mkvtoolnix/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 124863 2011-05-24 19:57:14Z giovanni $
+# $Id: PKGBUILD 124985 2011-05-25 16:04:09Z ibiru $
# Maintainer: Giovanni Scafora <giovanni@archlinux.org>
# Contributor: 03/08/04 <lefungus@altern.org>
pkgname=mkvtoolnix
pkgver=4.8.0
-pkgrel=1
+pkgrel=2
pkgdesc="Set of tools to create, edit and inspect Matroska files"
arch=('i686' 'x86_64')
license=('GPL')
diff --git a/extra/neon/PKGBUILD b/extra/neon/PKGBUILD
index c0fe650cf..3e908b618 100644
--- a/extra/neon/PKGBUILD
+++ b/extra/neon/PKGBUILD
@@ -1,29 +1,32 @@
-# $Id: PKGBUILD 121086 2011-04-29 00:26:05Z stephane $
+# $Id: PKGBUILD 124952 2011-05-25 12:20:04Z andrea $
+# Maintainer:
# Contributor: Tom Newsom <Jeepster@gmx.co.uk>
-# Maintainer: Juergen Hoetzel <juergen@archlinux.org>
+# Contributor: Juergen Hoetzel <juergen@archlinux.org>
-# KEEP LIBTOOL FILES!
pkgname=neon
-pkgver=0.29.3
-pkgrel=3
+pkgver=0.29.6
+pkgrel=1
pkgdesc="HTTP and WebDAV client library with a C interface"
arch=('i686' 'x86_64')
license=('GPL' 'LGPL')
depends=('krb5' 'expat' 'ca-certificates')
url="http://www.webdav.org/neon/"
-source=("http://www.webdav.org/neon/${pkgname}-${pkgver}.tar.gz")
-md5sums=('ba1015b59c112d44d7797b62fe7bee51')
-options=('libtool')
+source=("http://www.webdav.org/${pkgname}/${pkgname}-${pkgver}.tar.gz")
+md5sums=('591e0c82e6979e7e615211b386b8f6bc')
+options=('libtool') # FS#16067
build() {
- cd ${srcdir}/${pkgname}-${pkgver}
+ cd "${srcdir}"/${pkgname}-${pkgver}
./configure --prefix=/usr \
- --with-expat --enable-shared --disable-static \
- --with-ssl=openssl --with-ca-bundle=/etc/ssl/certs/ca-certificates.crt
+ --with-expat \
+ --enable-shared \
+ --disable-static \
+ --with-ssl=openssl \
+ --with-ca-bundle=/etc/ssl/certs/ca-certificates.crt
make
}
package() {
- cd ${srcdir}/${pkgname}-${pkgver}
- make DESTDIR=${pkgdir} install
+ cd "${srcdir}"/${pkgname}-${pkgver}
+ make DESTDIR="${pkgdir}" install
}
diff --git a/extra/pidgin/PKGBUILD b/extra/pidgin/PKGBUILD
index f58b92149..05883a1d8 100644
--- a/extra/pidgin/PKGBUILD
+++ b/extra/pidgin/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 123134 2011-05-08 21:15:31Z foutrelis $
+# $Id: PKGBUILD 124929 2011-05-25 09:33:46Z foutrelis $
# Maintainer: Evangelos Foutras <foutrelis@gmail.com>
# Contributor: Ionut Biru <ibiru@archlinux.org>
# Contributor: Andrea Scarpino <andrea@archlinux.org>
@@ -7,7 +7,7 @@
pkgname=('pidgin' 'libpurple' 'finch')
pkgver=2.7.11
-pkgrel=3
+pkgrel=5
arch=('i686' 'x86_64')
url="http://pidgin.im/"
license=('GPL')
@@ -16,12 +16,22 @@ makedepends=('startup-notification' 'gtkspell' 'libxss' 'nss' 'libsasl' 'libsm'
'farsight2' 'avahi' 'tk' 'ca-certificates' 'intltool'
'networkmanager')
options=('!libtool')
-source=(http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.bz2)
-md5sums=('07c2a2535b4d7436b5ec7685fe063fec')
+source=(http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.bz2
+ nm09-pidgin.patch
+ nm09-more.patch)
+md5sums=('07c2a2535b4d7436b5ec7685fe063fec'
+ '744a21b4dbaf949dba7cd3b75b12b4fe'
+ 'a673659d86c7a65aa710f7c8c7feda82')
build() {
cd "$srcdir/$pkgname-$pkgver"
+ # Update for NetworkManager 0.9 connection states
+ # (http://developer.pidgin.im/ticket/13505)
+ # (http://developer.pidgin.im/ticket/13859)
+ patch -Np1 -i "$srcdir/nm09-pidgin.patch"
+ patch -Np1 -i "$srcdir/nm09-more.patch"
+
# Use Python 2
sed -i 's/env python$/\02/' */plugins/*.py \
libpurple/purple-{remote,notifications-example,url-handler}
@@ -51,7 +61,7 @@ package_pidgin(){
install=pidgin.install
cd "$srcdir/pidgin-$pkgver"
-
+
# For linking
make -C libpurple DESTDIR="$pkgdir" install-libLTLIBRARIES
@@ -72,7 +82,7 @@ package_libpurple(){
'cyrus-sasl-plugins')
optdepends=('avahi: Bonjour protocol support'
'dbus-python: for purple-remote and purple-url-handler')
-
+
cd "$srcdir/pidgin-$pkgver"
for _dir in libpurple share/sounds share/ca-certs m4macros po; do
@@ -100,3 +110,5 @@ package_finch(){
rm "$pkgdir"/usr/share/man/man1/pidgin.1
}
+
+# vim:set ts=2 sw=2 et:
diff --git a/extra/pidgin/nm09-more.patch b/extra/pidgin/nm09-more.patch
new file mode 100644
index 000000000..8c708df9a
--- /dev/null
+++ b/extra/pidgin/nm09-more.patch
@@ -0,0 +1,49 @@
+diff -up pidgin-2.7.11/libpurple/network.c.nm09more pidgin-2.7.11/libpurple/network.c
+--- pidgin-2.7.11/libpurple/network.c.nm09more 2011-04-26 12:01:27.700085246 -0500
++++ pidgin-2.7.11/libpurple/network.c 2011-05-24 13:13:28.185165657 -0500
+@@ -833,8 +833,20 @@ purple_network_is_available(void)
+ purple_debug_warning("network", "NetworkManager not active. Assuming connection exists.\n");
+ }
+
+- if (nm_state == NM_STATE_UNKNOWN || nm_state == NM_STATE_CONNECTED)
+- return TRUE;
++ switch (nm_state)
++ {
++ case NM_STATE_UNKNOWN:
++#if NM_CHECK_VERSION(0,8,992)
++ case NM_STATE_CONNECTED_LOCAL:
++ case NM_STATE_CONNECTED_SITE:
++ case NM_STATE_CONNECTED_GLOBAL:
++#else
++ case NM_STATE_CONNECTED:
++#endif
++ return TRUE;
++ default:
++ break;
++ }
+
+ return FALSE;
+
+@@ -1170,9 +1182,14 @@ purple_network_init(void)
+ NM_DBUS_SERVICE,
+ NM_DBUS_PATH,
+ NM_DBUS_INTERFACE);
++ /* NM 0.6 signal */
+ dbus_g_proxy_add_signal(nm_proxy, "StateChange", G_TYPE_UINT, G_TYPE_INVALID);
+ dbus_g_proxy_connect_signal(nm_proxy, "StateChange",
+ G_CALLBACK(nm_state_change_cb), NULL, NULL);
++ /* NM 0.7 and later signal */
++ dbus_g_proxy_add_signal(nm_proxy, "StateChanged", G_TYPE_UINT, G_TYPE_INVALID);
++ dbus_g_proxy_connect_signal(nm_proxy, "StateChanged",
++ G_CALLBACK(nm_state_change_cb), NULL, NULL);
+
+ dbus_proxy = dbus_g_proxy_new_for_name(nm_conn,
+ DBUS_SERVICE_DBUS,
+@@ -1207,6 +1224,7 @@ purple_network_uninit(void)
+ #ifdef HAVE_NETWORKMANAGER
+ if (nm_proxy) {
+ dbus_g_proxy_disconnect_signal(nm_proxy, "StateChange", G_CALLBACK(nm_state_change_cb), NULL);
++ dbus_g_proxy_disconnect_signal(nm_proxy, "StateChanged", G_CALLBACK(nm_state_change_cb), NULL);
+ g_object_unref(G_OBJECT(nm_proxy));
+ }
+ if (dbus_proxy) {
diff --git a/extra/pidgin/nm09-pidgin.patch b/extra/pidgin/nm09-pidgin.patch
new file mode 100644
index 000000000..1c2471d1f
--- /dev/null
+++ b/extra/pidgin/nm09-pidgin.patch
@@ -0,0 +1,38 @@
+diff -up pidgin-2.7.10/libpurple/network.c.foo pidgin-2.7.10/libpurple/network.c
+--- pidgin-2.7.10/libpurple/network.c.foo 2011-03-10 02:21:43.920933267 -0600
++++ pidgin-2.7.10/libpurple/network.c 2011-03-10 02:23:11.466838793 -0600
+@@ -71,6 +71,10 @@
+ #include <dbus/dbus-glib.h>
+ #include <NetworkManager.h>
+
++#if !defined(NM_CHECK_VERSION)
++#define NM_CHECK_VERSION(x,y,z) 0
++#endif
++
+ static DBusGConnection *nm_conn = NULL;
+ static DBusGProxy *nm_proxy = NULL;
+ static DBusGProxy *dbus_proxy = NULL;
+@@ -863,7 +867,13 @@ nm_update_state(NMState state)
+
+ switch(state)
+ {
++#if NM_CHECK_VERSION(0,8,992)
++ case NM_STATE_CONNECTED_LOCAL:
++ case NM_STATE_CONNECTED_SITE:
++ case NM_STATE_CONNECTED_GLOBAL:
++#else
+ case NM_STATE_CONNECTED:
++#endif
+ /* Call res_init in case DNS servers have changed */
+ res_init();
+ /* update STUN IP in case we it changed (theoretically we could
+@@ -880,6 +890,9 @@ nm_update_state(NMState state)
+ case NM_STATE_ASLEEP:
+ case NM_STATE_CONNECTING:
+ case NM_STATE_DISCONNECTED:
++#if NM_CHECK_VERSION(0,8,992)
++ case NM_STATE_DISCONNECTING:
++#endif
+ if (prev != NM_STATE_CONNECTED && prev != NM_STATE_UNKNOWN)
+ break;
+ if (ui_ops != NULL && ui_ops->network_disconnected != NULL)
diff --git a/extra/source-highlight/PKGBUILD b/extra/source-highlight/PKGBUILD
index 4846c97f0..144077a2b 100644
--- a/extra/source-highlight/PKGBUILD
+++ b/extra/source-highlight/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 111993 2011-03-02 22:17:55Z ibiru $
+# $Id: PKGBUILD 124988 2011-05-25 16:07:54Z ibiru $
# Maintainer: Giovanni Scafora <giovanni@archlinux.org>
# Contributor: Douglas Soares de Andrade <douglas@archlinux.org>
pkgname=source-highlight
pkgver=3.1.4
-pkgrel=2
+pkgrel=3
pkgdesc="Convert source code to syntax highlighted document"
arch=('i686' 'x86_64')
url="http://www.gnu.org/software/src-highlite/"
diff --git a/extra/vigra/PKGBUILD b/extra/vigra/PKGBUILD
index 88bd5696b..0f4d40330 100644
--- a/extra/vigra/PKGBUILD
+++ b/extra/vigra/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 112123 2011-03-04 03:09:16Z eric $
+# $Id: PKGBUILD 124991 2011-05-25 16:14:08Z ibiru $
# Maintainer: AndyRTR <andyrtr@archlinux.org>
# Contributor: Lukas Jirkovsky <l.jirkovsky@gmail.com>
pkgname=vigra
-pkgver=1.7.0
-pkgrel=6
+pkgver=1.7.1
+pkgrel=2
pkgdesc="Computer vision library"
arch=('i686' 'x86_64')
url="http://hci.iwr.uni-heidelberg.de/vigra/"
@@ -14,13 +14,14 @@ makedepends=('cmake' 'python-nose' 'doxygen' 'python-sphinx' 'boost' 'python-num
optdepends=('python2: for python bindings'
'boost-libs: for python bindings')
options=('!libtool')
-source=(http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/${pkgname}-${pkgver}-src.tar.gz libpng-1.4.patch)
-md5sums=('a40b3b013653f75dc84ba55b2df1fae2' 'db610e48558eb323490ad21d636bac76')
-sha1sums=('31875646cbb1928d93c96fc4da4fda31772cf8f6' '5f668c861f5fe927a4f51014afab94805db60c46')
+source=(http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/${pkgname}-${pkgver}-src.tar.gz
+ vigra-1.7.1.gcc460.patch)
+md5sums=('2bde208e0fd7626770169dd4fa097282'
+ '25ef8bc26bc38ee67e5b512d2acd0166')
build() {
- cd "${srcdir}"/${pkgname}-${pkgver}-src
- patch -p1 < ../libpng-1.4.patch
+ cd "${srcdir}"/${pkgname}-${pkgver}
+ patch -Np1 -i ${srcdir}/vigra-1.7.1.gcc460.patch
cmake -DCMAKE_INSTALL_PREFIX=/usr \
-DWITH_VIGRANUMPY=1 \
-DDOCINSTALL=share/doc
@@ -28,7 +29,7 @@ build() {
}
package() {
- cd "${srcdir}"/${pkgname}-${pkgver}-src
+ cd "${srcdir}"/${pkgname}-${pkgver}
make DESTDIR="${pkgdir}" install
# license
install -D -m644 LICENSE.txt "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
diff --git a/extra/vigra/vigra-1.7.1.gcc460.patch b/extra/vigra/vigra-1.7.1.gcc460.patch
new file mode 100644
index 000000000..46f194dbc
--- /dev/null
+++ b/extra/vigra/vigra-1.7.1.gcc460.patch
@@ -0,0 +1,33 @@
+diff -baur vigra-1.7.1.old/include/vigra/random_forest.hxx vigra-1.7.1/include/vigra/random_forest.hxx
+--- vigra-1.7.1.old/include/vigra/random_forest.hxx 2010-12-03 17:40:34.000000000 +0000
++++ vigra-1.7.1/include/vigra/random_forest.hxx 2011-01-28 00:16:32.000000000 +0000
+@@ -43,6 +43,7 @@
+ #include <set>
+ #include <list>
+ #include <numeric>
++#include <stddef.h>
+ #include "mathutil.hxx"
+ #include "array_vector.hxx"
+ #include "sized_int.hxx"
+diff -baur vigra-1.7.1.old/include/vigra/sifImport.hxx vigra-1.7.1/include/vigra/sifImport.hxx
+--- vigra-1.7.1.old/include/vigra/sifImport.hxx 2010-12-03 17:40:34.000000000 +0000
++++ vigra-1.7.1/include/vigra/sifImport.hxx 2011-01-28 00:23:31.000000000 +0000
+@@ -57,6 +57,7 @@
+ #include <fstream>
+ #include <cstring>
+ #include <vector>
++#include <stddef.h>
+ #include "vigra/multi_array.hxx"
+
+ namespace vigra {
+diff -baur vigra-1.7.1.old/include/vigra/multi_iterator.hxx vigra-1.7.1/include/vigra/multi_iterator.hxx
+--- vigra-1.7.1.old/include/vigra/multi_iterator.hxx 2010-12-03 17:40:34.000000000 +0000
++++ vigra-1.7.1/include/vigra/multi_iterator.hxx 2011-01-28 00:23:31.000000000 +0000
+@@ -41,6 +41,7 @@
+ #define VIGRA_MULTI_ITERATOR_HXX
+
+ #include <sys/types.h>
++#include <stddef.h>
+ #include "tinyvector.hxx"
+ #include "iteratortags.hxx"
+
diff --git a/extra/wesnoth/PKGBUILD b/extra/wesnoth/PKGBUILD
index a60a35818..67a9f56de 100644
--- a/extra/wesnoth/PKGBUILD
+++ b/extra/wesnoth/PKGBUILD
@@ -1,12 +1,12 @@
-# $Id: PKGBUILD 112017 2011-03-03 06:20:54Z eric $
+# $Id: PKGBUILD 125126 2011-05-25 17:01:35Z ibiru $
# Maintainer: Jan de Groot <jgc@archlinux.org>
# Contributor: Tobias Powalowski <tpowa@archlinux.org>
# Contributor: Jacobo Arvelo <unix4all@ya.com>
# Contributor: Douglas Soares de Andrade <douglas@archlinux.org>
pkgname=wesnoth
-pkgver=1.8.5
-pkgrel=3
+pkgver=1.8.6
+pkgrel=1
pkgdesc="A turn-based strategy game on a fantasy world"
arch=('i686' 'x86_64')
license=('GPL')
@@ -16,7 +16,7 @@ makedepends=('boost')
install=wesnoth.install
source=(http://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}-${pkgver}.tar.bz2
wesnoth-libpng-1.4.0.patch)
-md5sums=('a800285d1406690755dd0ea22b98b6df'
+md5sums=('f1c3179869b01b61e253e74aeb241034'
'ca7412ffc4682ef55ddf82d56b0e2f08')
build() {
diff --git a/kde-unstable/akonadi/PKGBUILD b/kde-unstable/akonadi/PKGBUILD
index 52f2939bd..c19e6d4ce 100644
--- a/kde-unstable/akonadi/PKGBUILD
+++ b/kde-unstable/akonadi/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 124449 2011-05-21 11:40:47Z andrea $
+# $Id: PKGBUILD 125234 2011-05-25 19:13:14Z andrea $
# Maintainer: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Pierre Schmitz <pierre@archlinux.de>
pkgname=akonadi
pkgver=1.5.80
-pkgrel=1
+pkgrel=2
pkgdesc="PIM layer, which provides an asynchronous API to access all kind of PIM data"
arch=('i686' 'x86_64')
url='http://pim.kde.org/akonadi'
diff --git a/kde-unstable/kdeaccessibility/PKGBUILD b/kde-unstable/kdeaccessibility/PKGBUILD
new file mode 100644
index 000000000..37fe2397e
--- /dev/null
+++ b/kde-unstable/kdeaccessibility/PKGBUILD
@@ -0,0 +1,83 @@
+# $Id: PKGBUILD 124844 2011-05-24 18:14:06Z andrea $
+# Maintainer: Andrea Scarpino <andrea@archlinux.org>
+# Contributor: Pierre Schmitz <pierre@archlinux.de>
+
+pkgbase=kdeaccessibility
+pkgname=('kdeaccessibility-jovie'
+ 'kdeaccessibility-kaccessible'
+ 'kdeaccessibility-kmag'
+ 'kdeaccessibility-kmousetool'
+ 'kdeaccessibility-kmouth')
+pkgver=4.6.80
+pkgrel=1
+arch=('i686' 'x86_64')
+url='http://accessibility.kde.org'
+license=('GPL' 'FDL')
+groups=('kde' 'kdeaccessibility')
+makedepends=('pkgconfig' 'cmake' 'automoc4' 'kdelibs' 'speech-dispatcher')
+source=("http://download.kde.org/stable/${pkgver}/src/${pkgbase}-${pkgver}.tar.bz2")
+sha1sums=('a8d4ca99dadc9439b6a1ee91645527f954665cb1')
+
+build() {
+ cd ${srcdir}
+ mkdir build
+ cd build
+ cmake ../${pkgbase}-${pkgver} \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_SKIP_RPATH=ON \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DWITH_Opentts=OFF
+ make
+}
+
+package_kdeaccessibility-jovie() {
+ pkgdesc='A text to speech application'
+ depends=('kdebase-runtime' 'speech-dispatcher')
+ replaces=('kdeaccessibility-kttsd')
+ install='kdeaccessibility.install'
+ cd $srcdir/build/jovie
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/jovie/doc
+ make DESTDIR=$pkgdir install
+}
+
+package_kdeaccessibility-kaccessible() {
+ pkgdesc='Provides accessibility services like focus tracking and a screenreader'
+ depends=('kdebase-runtime' 'speech-dispatcher')
+ install='kdeaccessibility.install'
+ cd $srcdir/build/kaccessible
+ make DESTDIR=$pkgdir install
+}
+
+package_kdeaccessibility-kmag() {
+ pkgdesc='Screen Magnifier'
+ depends=('kdebase-runtime')
+ url="http://kde.org/applications/utilities/kmag/"
+ install='kdeaccessibility.install'
+ cd $srcdir/build/kmag
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/kmag/doc
+ make DESTDIR=$pkgdir install
+}
+
+package_kdeaccessibility-kmousetool() {
+ pkgdesc='Clicks the mouse for you, reducing the effects of RSI'
+ depends=('kdebase-runtime')
+ url="http://kde.org/applications/utilities/kmousetool/"
+ install='kdeaccessibility.install'
+ cd $srcdir/build/kmousetool
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/kmousetool/doc
+ make DESTDIR=$pkgdir install
+}
+
+package_kdeaccessibility-kmouth() {
+ pkgdesc='Speech Synthesizer Frontend'
+ depends=('kdebase-runtime')
+ url="http://kde.org/applications/utilities/kmouth/"
+ install='kdeaccessibility.install'
+ cd $srcdir/build/kmouth
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/kmouth/doc
+ make DESTDIR=$pkgdir install
+}
diff --git a/kde-unstable/kdeaccessibility/kdeaccessibility.install b/kde-unstable/kdeaccessibility/kdeaccessibility.install
new file mode 100644
index 000000000..e70c054ec
--- /dev/null
+++ b/kde-unstable/kdeaccessibility/kdeaccessibility.install
@@ -0,0 +1,11 @@
+post_install() {
+ xdg-icon-resource forceupdate --theme hicolor &> /dev/null
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
diff --git a/kde-unstable/kdeadmin/PKGBUILD b/kde-unstable/kdeadmin/PKGBUILD
new file mode 100644
index 000000000..ceac7ec49
--- /dev/null
+++ b/kde-unstable/kdeadmin/PKGBUILD
@@ -0,0 +1,77 @@
+# $Id: PKGBUILD 124778 2011-05-24 11:55:25Z andrea $
+# Maintainer: Andrea Scarpino <andrea@archlinux.org>
+# Contributor: Pierre Schmitz <pierre@archlinux.de>
+
+pkgbase=kdeadmin
+pkgname=('kdeadmin-kcron'
+ 'kdeadmin-ksystemlog'
+ 'kdeadmin-kuser'
+ 'kdeadmin-system-config-printer-kde')
+pkgver=4.6.80
+pkgrel=1
+arch=('i686' 'x86_64')
+url='http://www.kde.org'
+license=('GPL' 'LGPL' 'FDL')
+groups=('kde' 'kdeadmin')
+makedepends=('pkgconfig' 'cmake' 'automoc4' 'kdebindings-python'
+ 'system-config-printer-common')
+source=("http://download.kde.org/unstable/${pkgver}/src/${pkgbase}-${pkgver}.tar.bz2"
+ 'syslog-path.patch')
+sha1sums=('ceb0ccd2d24b64770f6ac7649d312937a09a17e2'
+ '20095ce6e0f3e5b6800a7c6e52de6fddba62c031')
+
+build() {
+ cd ${srcdir}/${pkgbase}-${pkgver}
+ patch -p1 -i ${srcdir}/syslog-path.patch
+
+ cd ${srcdir}
+ mkdir build
+ cd build
+ cmake ../${pkgbase}-${pkgver} \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_SKIP_RPATH=ON \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DBUILD_strigi-analyzer=OFF
+ make
+}
+
+package_kdeadmin-kcron() {
+ pkgdesc='Configure and schedule tasks'
+ depends=('kdelibs')
+ cd $srcdir/build/kcron
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/kcron
+ make DESTDIR=$pkgdir install
+}
+
+package_kdeadmin-ksystemlog() {
+ pkgdesc='System log viewer tool'
+ depends=('kdebase-runtime')
+ url="http://kde.org/applications/system/ksystemlog/"
+ cd $srcdir/build/ksystemlog
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/ksystemlog
+ make DESTDIR=$pkgdir install
+}
+
+package_kdeadmin-kuser() {
+ pkgdesc='User Manager'
+ depends=('kdepim-runtime')
+ url="http://kde.org/applications/system/kuser/"
+ install='kdeadmin.install'
+ cd $srcdir/build/kuser
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/kuser
+ make DESTDIR=$pkgdir install
+}
+
+package_kdeadmin-system-config-printer-kde() {
+ pkgdesc='Configure local and remote Printers'
+ depends=('kdebindings-python' 'system-config-printer-common' 'python2-pyqt')
+ url="http://kde.org/applications/system/printerapplet/"
+ cd $srcdir/build/system-config-printer-kde
+ make DESTDIR=$pkgdir install
+
+ # Use the python2 executable
+ find ${pkgdir} -name '*.py' | xargs sed -i 's|#!/usr/bin/env python|#!/usr/bin/env python2|'
+}
diff --git a/kde-unstable/kdeadmin/kdeadmin.install b/kde-unstable/kdeadmin/kdeadmin.install
new file mode 100644
index 000000000..e70c054ec
--- /dev/null
+++ b/kde-unstable/kdeadmin/kdeadmin.install
@@ -0,0 +1,11 @@
+post_install() {
+ xdg-icon-resource forceupdate --theme hicolor &> /dev/null
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
diff --git a/kde-unstable/kdeadmin/syslog-path.patch b/kde-unstable/kdeadmin/syslog-path.patch
new file mode 100644
index 000000000..8a9142bf6
--- /dev/null
+++ b/kde-unstable/kdeadmin/syslog-path.patch
@@ -0,0 +1,11 @@
+--- kdeadmin-4.6.0/ksystemlog/src/modes/system/systemConfiguration.h~ 2011-01-27 14:24:29.840000005 +0100
++++ kdeadmin-4.6.0/ksystemlog/src/modes/system/systemConfiguration.h 2011-01-27 14:24:53.803333335 +0100
+@@ -39,7 +39,7 @@
+ SystemConfiguration() :
+ GenericLogModeConfiguration(
+ QLatin1String( SYSTEM_LOG_MODE_ID ),
+- QStringList() << QLatin1String( "/var/log/syslog" ),
++ QStringList() << QLatin1String( "/var/log/messages.log" ),
+ QList<int>() << INFORMATION_LOG_LEVEL_ID
+ ) {
+
diff --git a/kde-unstable/kdeartwork/PKGBUILD b/kde-unstable/kdeartwork/PKGBUILD
new file mode 100644
index 000000000..0118d8b45
--- /dev/null
+++ b/kde-unstable/kdeartwork/PKGBUILD
@@ -0,0 +1,104 @@
+# $Id: PKGBUILD 124845 2011-05-24 18:14:29Z andrea $
+# Maintainer: Andrea Scarpino <andrea@archlinux.org>
+# Contributor: Pierre Schmitz <pierre@archlinux.de>
+
+pkgbase=kdeartwork
+pkgname=('kdeartwork-aurorae'
+ 'kdeartwork-colorschemes'
+ 'kdeartwork-desktopthemes'
+ 'kdeartwork-emoticons'
+ 'kdeartwork-iconthemes'
+ 'kdeartwork-kscreensaver'
+ 'kdeartwork-sounds'
+ 'kdeartwork-styles'
+ 'kdeartwork-wallpapers'
+ 'kdeartwork-weatherwallpapers')
+pkgver=4.6.80
+pkgrel=1
+arch=('i686' 'x86_64')
+url='http://www.kde.org'
+license=('GPL' 'LGPL' 'FDL')
+groups=('kde' 'kdeartwork')
+makedepends=('pkgconfig' 'cmake' 'automoc4' 'xscreensaver' 'eigen'
+ 'kdebase-workspace' 'libkexiv2')
+source=("http://download.kde.org/unstable/${pkgver}/src/${pkgbase}-${pkgver}.tar.bz2")
+sha1sums=('70c5274f2c933b87c10a1ae53eb6971ae3887e87')
+
+build() {
+ cd $srcdir
+ mkdir build
+ cd build
+ cmake ../${pkgbase}-${pkgver} \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_SKIP_RPATH=ON \
+ -DCMAKE_INSTALL_PREFIX=/usr
+ make
+}
+
+package_kdeartwork-aurorae() {
+ pkgdesc='An Aurorae theme based on the Oxygen plasma theme'
+ cd $srcdir/build/aurorae
+ make DESTDIR=$pkgdir install
+}
+
+package_kdeartwork-colorschemes() {
+ pkgdesc='KDE color schemes'
+ replaces=('kdeaccessibility-colorschemes')
+ cd $srcdir/build/ColorSchemes
+ make DESTDIR=$pkgdir install
+}
+
+package_kdeartwork-desktopthemes() {
+ pkgdesc='KDE desktop themes'
+ cd $srcdir/build/desktopthemes
+ make DESTDIR=$pkgdir install
+}
+
+package_kdeartwork-emoticons() {
+ pkgdesc='KDE emoticons'
+ cd $srcdir/build/emoticons
+ make DESTDIR=$pkgdir install
+}
+
+package_kdeartwork-iconthemes() {
+ pkgdesc='KDE icon themes'
+ replaces=('kdeaccessibility-iconthemes')
+ cd $srcdir/build/IconThemes
+ make DESTDIR=$pkgdir install
+}
+
+package_kdeartwork-kscreensaver() {
+ pkgdesc='KDE screensaver'
+ depends=('kdebase-workspace' 'libkexiv2')
+ cd $srcdir/build/kscreensaver
+ make DESTDIR=$pkgdir install
+}
+
+package_kdeartwork-sounds() {
+ pkgdesc='KDE sounds'
+ cd $srcdir/build/sounds
+ make DESTDIR=$pkgdir install
+}
+
+package_kdeartwork-styles() {
+ pkgdesc='KDE styles'
+ depends=('kdebase-workspace')
+ cd $srcdir/build/styles
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/kwin-styles
+ make DESTDIR=$pkgdir install
+}
+
+package_kdeartwork-wallpapers() {
+ pkgdesc='KDE wallpapers'
+ cd $srcdir/build/wallpapers
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/HighResolutionWallpapers
+ make DESTDIR=$pkgdir install
+}
+
+package_kdeartwork-weatherwallpapers() {
+ pkgdesc='KDE weather wallpapers'
+ cd $srcdir/build/WeatherWallpapers
+ make DESTDIR=$pkgdir install
+}
diff --git a/kde-unstable/kdebase-konsole/PKGBUILD b/kde-unstable/kdebase-konsole/PKGBUILD
new file mode 100644
index 000000000..105e3dc39
--- /dev/null
+++ b/kde-unstable/kdebase-konsole/PKGBUILD
@@ -0,0 +1,30 @@
+# $Id: PKGBUILD 124800 2011-05-24 13:26:15Z andrea $
+# Maintainer: Andrea Scarpino <andrea@archlinux.org>
+
+pkgname=kdebase-konsole
+pkgver=4.6.80
+pkgrel=1
+arch=('i686' 'x86_64')
+url='http://kde.org/applications/system/konsole/'
+pkgdesc="Terminal"
+license=('GPL' 'LGPL' 'FDL')
+groups=('kde' 'kdebase')
+depends=('kdebase-runtime')
+makedepends=('cmake' 'automoc4')
+source=("http://download.kde.org/unstable/${pkgver}/src/konsole-${pkgver}.tar.bz2")
+sha1sums=('7e7b5a0b37ae4d22e51a61f70afccbba86a93921')
+
+build() {
+ cd "${srcdir}"
+ mkdir build
+ cd build
+ cmake ../konsole-${pkgver} \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr
+ make
+}
+
+package() {
+ cd "${srcdir}"/build
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/kde-unstable/kdebase-runtime/PKGBUILD b/kde-unstable/kdebase-runtime/PKGBUILD
new file mode 100644
index 000000000..41d9de7c2
--- /dev/null
+++ b/kde-unstable/kdebase-runtime/PKGBUILD
@@ -0,0 +1,39 @@
+# $Id: PKGBUILD 124658 2011-05-23 19:42:48Z andrea $
+# Maintainer: Andrea Scarpino <andrea@archlinux.org>
+# Contributor: Pierre Schmitz <pierre@archlinux.de>
+
+pkgname=kdebase-runtime
+_pkgname=kde-runtime
+pkgver=4.6.80
+pkgrel=1
+pkgdesc="KDE Base Runtime Environment"
+arch=('i686' 'x86_64')
+url='http://www.kde.org'
+license=('GPL' 'LGPL')
+depends=('kdelibs' 'ntrack' 'smbclient' 'libssh' 'libcanberra' 'oxygen-icons'
+ 'xorg-xauth' 'hicolor-icon-theme' 'libqzeitgeist')
+makedepends=('pkg-config' 'cmake' 'automoc4' 'kdepimlibs' 'openslp' 'xine-lib')
+optdepends=('htdig: to build the search index in khelpcenter'
+ 'rarian: needed by khelpcenter'
+ 'gdb: drkonq crash handler')
+install="${pkgname}.install"
+source=("http://download.kde.org/stable/${pkgver}/src/${_pkgname}-${pkgver}.tar.bz2")
+sha1sums=('5d06c11f43beb21ebf6c47d2a7addcbe710e019e')
+
+build() {
+ cd "${srcdir}"
+ mkdir build
+ cd build
+ cmake ../${_pkgname}-${pkgver} \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_SKIP_RPATH=ON \
+ -DCMAKE_INSTALL_PREFIX=/usr
+ make
+}
+
+package() {
+ cd "$srcdir/build"
+ make DESTDIR="$pkgdir" install
+ rm -f "${pkgdir}/usr/share/icons/hicolor/index.theme"
+ ln -sf /usr/lib/kde4/libexec/kdesu "${pkgdir}/usr/bin/"
+}
diff --git a/kde-unstable/kdebase-runtime/kdebase-runtime.install b/kde-unstable/kdebase-runtime/kdebase-runtime.install
new file mode 100644
index 000000000..3f06b8deb
--- /dev/null
+++ b/kde-unstable/kdebase-runtime/kdebase-runtime.install
@@ -0,0 +1,12 @@
+post_install() {
+ xdg-icon-resource forceupdate --theme hicolor &> /dev/null
+ update-mime-database usr/share/mime &> /dev/null
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
diff --git a/kde-unstable/kdebase-workspace/PKGBUILD b/kde-unstable/kdebase-workspace/PKGBUILD
new file mode 100644
index 000000000..e1763778b
--- /dev/null
+++ b/kde-unstable/kdebase-workspace/PKGBUILD
@@ -0,0 +1,76 @@
+# $Id: PKGBUILD 124944 2011-05-25 10:38:26Z andrea $
+# Maintainer: Andrea Scarpino <andrea@archlinux.org>
+# Contributor: Pierre Schmitz <pierre@archlinux.de>
+
+pkgname=kdebase-workspace
+_pkgname=kde-workspace
+pkgver=4.6.80
+pkgrel=1
+pkgdesc="KDE Base Workspace"
+arch=('i686' 'x86_64')
+url='http://www.kde.org'
+license=('GPL' 'LGPL' 'FDL')
+groups=('kde')
+# note on libxdamage:
+# not detected by namcap because libgl depends on it
+# but nvidia providing libgl does not depend on libxdamage
+depends=('kdepim-runtime' 'lm_sensors' 'libraw1394' 'libqalculate' 'qimageblitz'
+ 'polkit-kde' 'consolekit' 'xorg-xprop' 'libxdamage' 'libxklavier' 'libdmtx'
+ 'xorg-xsetroot' 'libxcomposite' 'libxinerama' 'libgles' 'kde-wallpapers')
+makedepends=('pkgconfig' 'cmake' 'automoc4' 'boost' 'kdebindings-python')
+replaces=('kdmtheme' 'kde-common' 'guidance-power-manager' 'policykit-kde' 'kdebase-kinfocenter')
+conflicts=('kde-common' 'guidance-power-manager' 'policykit-kde' 'kdebase-kinfocenter')
+install="${pkgname}.install"
+backup=('usr/share/config/kdm/kdmrc'
+ 'etc/pam.d/kde'
+ 'etc/pam.d/kde-np'
+ 'etc/pam.d/kscreensaver')
+options=('emptydirs')
+source=("http://download.kde.org/stable/${pkgver}/src/${_pkgname}-${pkgver}.tar.bz2"
+ 'kdm-zsh-profile.patch' 'kdm' 'kde.pam' 'kde-np.pam' 'kscreensaver.pam'
+ 'fixpath.patch' 'terminate-server.patch')
+sha1sums=('99bf68ee90c4cfa3568527a55c7c68d4247d9b13'
+ '8c2bdefb23a03b753b78d16944d03fa3939d2d99'
+ '5db3a245201bd4a50e65aa2ef583cf5490e4f646'
+ 'f7b38af38549242a240f1a90ab9964ca8a366129'
+ '603cc79c4d2b4eae62bb5f244aeecb3a778b5516'
+ '106635aa1aae51d6f0668b1853f6c49a4fe9d3d8'
+ 'd7b5883f7e65c6839b1f65f94d58026673dd0226'
+ 'ac7bc292c865bc1ab8c02e6341aa7aeaf1a3eeee')
+
+build() {
+ cd ${srcdir}/${_pkgname}-${pkgver}
+ patch -p0 -i ${srcdir}/kdm-zsh-profile.patch
+ patch -p0 -i ${srcdir}/fixpath.patch
+ patch -p0 -i ${srcdir}/terminate-server.patch
+
+ cd ${srcdir}
+ mkdir build
+ cd build
+ cmake ../${_pkgname}-${pkgver} \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_SKIP_RPATH=ON \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DWITH_Xmms=OFF \
+ -DWITH_Googlegadgets=OFF \
+ -DWITH_libgps=OFF \
+ -DWITH_Prison=OFF \
+ -DWITH_NetworkManager=OFF \
+ -DKWIN_MOBILE_EFFECTS=OFF
+ make
+}
+
+package() {
+ cd $srcdir/build
+ make DESTDIR=$pkgdir install
+
+ install -D -m755 ${srcdir}/kdm ${pkgdir}/etc/rc.d/kdm
+ install -D -m644 ${srcdir}/kde.pam ${pkgdir}/etc/pam.d/kde
+ install -D -m644 ${srcdir}/kde-np.pam ${pkgdir}/etc/pam.d/kde-np
+ install -D -m644 ${srcdir}/kscreensaver.pam ${pkgdir}/etc/pam.d/kscreensaver
+ install -d -m755 ${pkgdir}/usr/share/xsessions/
+ ln -sf /usr/share/apps/kdm/sessions/kde-plasma{,-safe}.desktop ${pkgdir}/usr/share/xsessions/
+ install -d -m755 ${pkgdir}/etc/kde/{env,shutdown}
+
+ install -d -g 135 -o 135 ${pkgdir}/var/lib/kdm
+}
diff --git a/kde-unstable/kdebase-workspace/fixpath.patch b/kde-unstable/kdebase-workspace/fixpath.patch
new file mode 100644
index 000000000..be2b8383e
--- /dev/null
+++ b/kde-unstable/kdebase-workspace/fixpath.patch
@@ -0,0 +1,34 @@
+--- startkde.cmake.orig 2009-01-15 14:24:44.000000000 +0100
++++ startkde.cmake 2009-01-15 14:33:08.000000000 +0100
+@@ -34,22 +34,6 @@
+ MALLOC_CHECK_=2
+ export MALLOC_CHECK_
+
+-# in case we have been started with full pathname spec without being in PATH
+-bindir=`echo "$0" | sed -n 's,^\(/.*\)/[^/][^/]*$,\1,p'`
+-if [ -n "$bindir" ]; then
+- qbindir=`$bindir/kde4-config --qt-binaries`
+- if [ -n "$qbindir" ]; then
+- case $PATH in
+- $qbindir|$qbindir:*|*:$qbindir|*:$qbindir:*) ;;
+- *) PATH=$qbindir:$PATH; export PATH;;
+- esac
+- fi
+- case $PATH in
+- $bindir|$bindir:*|*:$bindir|*:$bindir:*) ;;
+- *) PATH=$bindir:$PATH; export PATH;;
+- esac
+-fi
+-
+ # Boot sequence:
+ #
+ # kdeinit is used to fork off processes which improves memory usage
+@@ -206,7 +190,7 @@
+ # For anything else (that doesn't set env vars, or that needs a window manager),
+ # better use the Autostart folder.
+
+-libpath=`kde4-config --path lib | tr : '\n'`
++libpath=`kde4-config --path lib | tr : '\n'`$(echo -e '\n/etc/kde/lib/')
+
+ for prefix in `echo "$libpath" | sed -n -e 's,/lib[^/]*/,/env/,p'`; do
+ for file in "$prefix"*.sh; do
diff --git a/kde-unstable/kdebase-workspace/kde-np.pam b/kde-unstable/kdebase-workspace/kde-np.pam
new file mode 100644
index 000000000..81eeef47b
--- /dev/null
+++ b/kde-unstable/kdebase-workspace/kde-np.pam
@@ -0,0 +1,7 @@
+#%PAM-1.0
+auth required pam_nologin.so
+auth required pam_permit.so
+account required pam_unix.so
+password required pam_unix.so
+session required pam_unix.so
+session required pam_limits.so \ No newline at end of file
diff --git a/kde-unstable/kdebase-workspace/kde.pam b/kde-unstable/kdebase-workspace/kde.pam
new file mode 100644
index 000000000..1a259390f
--- /dev/null
+++ b/kde-unstable/kdebase-workspace/kde.pam
@@ -0,0 +1,7 @@
+#%PAM-1.0
+auth required pam_unix.so
+auth required pam_nologin.so
+account required pam_unix.so
+password required pam_unix.so
+session required pam_unix.so
+session required pam_limits.so \ No newline at end of file
diff --git a/kde-unstable/kdebase-workspace/kdebase-workspace.install b/kde-unstable/kdebase-workspace/kdebase-workspace.install
new file mode 100644
index 000000000..f7d6d305b
--- /dev/null
+++ b/kde-unstable/kdebase-workspace/kdebase-workspace.install
@@ -0,0 +1,25 @@
+post_install() {
+ groupadd -g 135 kdm &>/dev/null
+ useradd -u 135 -g kdm -d /var/lib/kdm -s /bin/false -r -M kdm &>/dev/null
+ chown -R 135:135 var/lib/kdm &>/dev/null
+ xdg-icon-resource forceupdate --theme hicolor &>/dev/null
+ update-desktop-database -q
+}
+
+post_upgrade() {
+ getent group kdm >/dev/null 2>&1 || groupadd -g 135 kdm &>/dev/null
+ getent passwd kdm >/dev/null 2>&1 || useradd -u 135 -g kdm -d /var/lib/kdm -s /bin/false -r -M kdm &>/dev/null
+ chown -R 135:135 var/lib/kdm &>/dev/null
+ xdg-icon-resource forceupdate --theme hicolor &> /dev/null
+ update-desktop-database -q
+}
+
+post_remove() {
+ if getent passwd kdm >/dev/null 2>&1; then
+ userdel kdm
+ fi
+ if getent group kdm >/dev/null 2>&1; then
+ groupdel kdm
+ fi
+ xdg-icon-resource forceupdate --theme hicolor &> /dev/null
+}
diff --git a/kde-unstable/kdebase-workspace/kdm b/kde-unstable/kdebase-workspace/kdm
new file mode 100644
index 000000000..799d58f4b
--- /dev/null
+++ b/kde-unstable/kdebase-workspace/kdm
@@ -0,0 +1,36 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+PID=$(pidof -o %PPID /usr/bin/kdm)
+case "$1" in
+ start)
+ stat_busy "Starting KDE Desktop Manager"
+ [ -z "$PID" ] && /usr/bin/kdm &>/dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon kdm
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping KDE Desktop Manager"
+ [ ! -z "$PID" ] && kill $PID &> /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon kdm
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 3
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0
diff --git a/kde-unstable/kdebase-workspace/kdm-zsh-profile.patch b/kde-unstable/kdebase-workspace/kdm-zsh-profile.patch
new file mode 100644
index 000000000..779456b39
--- /dev/null
+++ b/kde-unstable/kdebase-workspace/kdm-zsh-profile.patch
@@ -0,0 +1,11 @@
+--- kdm/kfrontend/genkdmconf.c 2008-02-13 09:40:49.000000000 +0000
++++ kdm/kfrontend/genkdmconf.c 2008-05-16 12:47:36.000000000 +0000
+@@ -662,7 +662,7 @@
+ " [ -d /etc/zsh ] && zdir=/etc/zsh || zdir=/etc\n"
+ " zhome=${ZDOTDIR:-$HOME}\n"
+ " # zshenv is always sourced automatically.\n"
+-" [ -f $zdir/zprofile ] && . $zdir/zprofile\n"
++" [ -f /etc/profile ] && . /etc/profile\n"
+ " [ -f $zhome/.zprofile ] && . $zhome/.zprofile\n"
+ " [ -f $zdir/zlogin ] && . $zdir/zlogin\n"
+ " [ -f $zhome/.zlogin ] && . $zhome/.zlogin\n"
diff --git a/kde-unstable/kdebase-workspace/kscreensaver.pam b/kde-unstable/kdebase-workspace/kscreensaver.pam
new file mode 100644
index 000000000..b4d80c21f
--- /dev/null
+++ b/kde-unstable/kdebase-workspace/kscreensaver.pam
@@ -0,0 +1 @@
+auth required pam_unix_auth.so
diff --git a/kde-unstable/kdebase-workspace/terminate-server.patch b/kde-unstable/kdebase-workspace/terminate-server.patch
new file mode 100644
index 000000000..094591317
--- /dev/null
+++ b/kde-unstable/kdebase-workspace/terminate-server.patch
@@ -0,0 +1,11 @@
+--- kdm/config.def 2009-08-27 10:17:39.000000000 +0200
++++ kdm/config.def 2009-10-31 00:40:21.000000000 +0100
+@@ -1448,7 +1448,7 @@
+
+ Key: TerminateServer
+ Type: bool
+-Default: false
++Default: true
+ User: core
+ Instance: #:*/!
+ Merge: xdm
diff --git a/kde-unstable/kdebase/PKGBUILD b/kde-unstable/kdebase/PKGBUILD
new file mode 100644
index 000000000..da7098290
--- /dev/null
+++ b/kde-unstable/kdebase/PKGBUILD
@@ -0,0 +1,117 @@
+# $Id: PKGBUILD 124659 2011-05-23 19:43:17Z andrea $
+# Maintainer: Andrea Scarpino <andrea@archlinux.org>
+# Contributor: Pierre Schmitz <pierre@archlinux.de>
+
+pkgbase=kdebase
+pkgname=('kdebase-dolphin'
+ 'kdebase-kdepasswd'
+ 'kdebase-kdialog'
+ 'kdebase-keditbookmarks'
+ 'kdebase-kfind'
+ 'kdebase-konq-plugins'
+ 'kdebase-konqueror'
+ 'kdebase-lib'
+ 'kdebase-plasma')
+pkgver=4.6.80
+pkgrel=1
+arch=('i686' 'x86_64')
+url='http://www.kde.org'
+license=('GPL' 'LGPL' 'FDL')
+groups=('kde' 'kdebase')
+makedepends=('kdelibs' 'pkgconfig' 'cmake' 'automoc4' 'tidyhtml')
+source=("http://download.kde.org/unstable/${pkgver}/src/kde-baseapps-${pkgver}.tar.bz2")
+sha1sums=('f89b848791628d675e26dd7e703bd79834d1c951')
+
+build() {
+ cd ${srcdir}
+ mkdir build
+ cd build
+ cmake ../kde-baseapps-${pkgver} \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_SKIP_RPATH=ON \
+ -DCMAKE_INSTALL_PREFIX=/usr
+ make
+}
+
+package_kdebase-dolphin() {
+ pkgdesc='File Manager'
+ depends=('kdebase-runtime' 'kdebase-lib')
+ optdepends=('ruby: servicemenu installation')
+ url="http://kde.org/applications/system/dolphin/"
+ cd $srcdir/build/dolphin
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/dolphin
+ make DESTDIR=$pkgdir install
+}
+
+package_kdebase-kdepasswd() {
+ pkgdesc='Change Password'
+ depends=('kdebase-runtime' 'kdebase-lib')
+ cd $srcdir/build/kdepasswd
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/kdepasswd
+ make DESTDIR=$pkgdir install
+}
+
+package_kdebase-kdialog() {
+ pkgdesc='A utility for displaying dialog boxes from shell scripts'
+ depends=('kdebase-runtime')
+ cd $srcdir/build/kdialog
+ make DESTDIR=$pkgdir install
+}
+
+package_kdebase-keditbookmarks() {
+ pkgdesc='Bookmark Organizer and Editor'
+ depends=('kdebase-runtime')
+ cd $srcdir/build/keditbookmarks
+ make DESTDIR=$pkgdir install
+}
+
+package_kdebase-kfind() {
+ pkgdesc='Find Files/Folders'
+ depends=('kdebase-runtime' 'kdebase-lib')
+ url="http://kde.org/applications/utilities/kfind/"
+ install='kdebase.install'
+ cd $srcdir/build/kfind
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/kfind
+ make DESTDIR=$pkgdir install
+}
+
+package_kdebase-konq-plugins() {
+ pkgdesc='Extra plugins for Konqueror'
+ depends=('kdebase-konqueror')
+ replaces=('konq-plugins')
+ install='kdebase.install'
+ cd $srcdir/build/konq-plugins
+ make DESTDIR=$pkgdir install
+}
+
+package_kdebase-konqueror() {
+ pkgdesc='KDE File Manager & Web Browser'
+ depends=('kdebase-dolphin' 'kdebase-keditbookmarks')
+ optdepends=('kwebkitpart: to enable webkit engine')
+ url="http://kde.org/applications/internet/konqueror/"
+ install='kdebase.install'
+ conflicts=('kdebase-nsplugins')
+ replaces=('kdebase-nsplugins')
+ for i in konqueror doc/konqueror nsplugins; do
+ cd $srcdir/build/${i}
+ make DESTDIR=$pkgdir install
+ done
+}
+
+package_kdebase-lib() {
+ pkgdesc='KDE libraries for the basic desktop applications'
+ groups=()
+ depends=('kdelibs')
+ cd $srcdir/build/lib
+ make DESTDIR=$pkgdir install
+}
+
+package_kdebase-plasma() {
+ pkgdesc='Display the contents of folders (User´s home folder as default)'
+ depends=('kdebase-workspace' 'kdebase-lib')
+ cd $srcdir/build/plasma
+ make DESTDIR=$pkgdir install
+}
diff --git a/kde-unstable/kdebase/kdebase.install b/kde-unstable/kdebase/kdebase.install
new file mode 100644
index 000000000..e70c054ec
--- /dev/null
+++ b/kde-unstable/kdebase/kdebase.install
@@ -0,0 +1,11 @@
+post_install() {
+ xdg-icon-resource forceupdate --theme hicolor &> /dev/null
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
diff --git a/kde-unstable/kdebindings-kimono/PKGBUILD b/kde-unstable/kdebindings-kimono/PKGBUILD
new file mode 100644
index 000000000..0fa73a2b1
--- /dev/null
+++ b/kde-unstable/kdebindings-kimono/PKGBUILD
@@ -0,0 +1,31 @@
+# $Id: PKGBUILD 124934 2011-05-25 09:35:20Z andrea $
+# Maintainer: Andrea Scarpino <andrea@archlinux.org>
+
+pkgname=kdebindings-kimono
+pkgver=4.6.80
+pkgrel=1
+pkgdesc=".NET/Mono bindings for the KDE libraries"
+url="http://kde.org/"
+arch=('i686' 'x86_64')
+license=('GPL' 'LGPL' 'FDL')
+groups=('kde' 'kdebindings')
+depends=('kdebindings-qyoto' 'kdebindings-smokekde')
+makedepends=('cmake' 'automoc4' 'kdebindings-smokegen' 'boost' 'kdepimlibs')
+conflicts=('kdebindings-csharp')
+source=("http://download.kde.org/unstable/${pkgver}/src/kimono-${pkgver}.tar.bz2")
+sha1sums=('911dfbee3141ca0f72c13e15bafc549ccd9ab33a')
+
+build() {
+ cd "${srcdir}"
+ mkdir build
+ cd build
+ cmake ../kimono-${pkgver} \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr
+ make
+}
+
+package() {
+ cd "${srcdir}"/build
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/kde-unstable/kdebindings-korundum/PKGBUILD b/kde-unstable/kdebindings-korundum/PKGBUILD
new file mode 100644
index 000000000..9c40054a2
--- /dev/null
+++ b/kde-unstable/kdebindings-korundum/PKGBUILD
@@ -0,0 +1,32 @@
+# $Id: PKGBUILD 124940 2011-05-25 09:48:53Z andrea $
+# Maintainer: Andrea Scarpino <andrea@archlinux.org>
+
+pkgname=kdebindings-korundum
+pkgver=4.6.80
+pkgrel=1
+pkgdesc="KDE bindings for ruby"
+url="http://kde.org/"
+arch=('i686' 'x86_64')
+license=('GPL' 'LGPL' 'FDL')
+groups=('kde' 'kdebindings')
+depends=('kdebindings-qtruby' 'kdebindings-smokekde')
+makedepends=('cmake' 'automoc4' 'kdebindings-smokegen' 'boost'
+ 'kdepimlibs' 'kdegraphics-okular' 'kdesdk-kate')
+conflicts=('kdebindings-ruby')
+source=("http://download.kde.org/unstable/${pkgver}/src/korundum-${pkgver}.tar.bz2")
+sha1sums=('30209e7e3d3dc54c7eb787d7e7bcc90735c5bc1a')
+
+build() {
+ cd "${srcdir}"
+ mkdir build
+ cd build
+ cmake ../korundum-${pkgver} \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr
+ make
+}
+
+package() {
+ cd "${srcdir}"/build
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/kde-unstable/kdebindings-perlkde/PKGBUILD b/kde-unstable/kdebindings-perlkde/PKGBUILD
new file mode 100644
index 000000000..4dfb0d07e
--- /dev/null
+++ b/kde-unstable/kdebindings-perlkde/PKGBUILD
@@ -0,0 +1,31 @@
+# $Id: PKGBUILD 124941 2011-05-25 09:55:03Z andrea $
+# Maintainer: Andrea Scarpino <andrea@archlinux.org>
+
+pkgname=kdebindings-perlkde
+pkgver=4.6.80
+pkgrel=1
+pkgdesc="Perl bindings for the KDE libraries"
+url="http://kde.org/"
+arch=('i686' 'x86_64')
+license=('GPL' 'LGPL' 'FDL')
+groups=('kde' 'kdebindings')
+depends=('kdebindings-perlqt' 'kdebindings-smokekde')
+makedepends=('cmake' 'automoc4' 'kdebindings-smokegen' 'kdepimlibs'
+ 'kdegraphics-okular' 'kdesdk-kate')
+source=("http://download.kde.org/unstable/${pkgver}/src/perlkde-${pkgver}.tar.bz2")
+sha1sums=('0d689b8ffcfaeb1f4e216f00f0ddacb5f59b9047')
+
+build() {
+ cd "${srcdir}"
+ mkdir build
+ cd build
+ cmake ../perlkde-${pkgver} \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr
+ make
+}
+
+package() {
+ cd "${srcdir}"/build
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/kde-unstable/kdebindings-perlqt/PKGBUILD b/kde-unstable/kdebindings-perlqt/PKGBUILD
new file mode 100644
index 000000000..a8268f3c5
--- /dev/null
+++ b/kde-unstable/kdebindings-perlqt/PKGBUILD
@@ -0,0 +1,30 @@
+# $Id: PKGBUILD 124667 2011-05-23 20:36:47Z andrea $
+# Maintainer: Andrea Scarpino <andrea@archlinux.org>
+
+pkgname=kdebindings-perlqt
+pkgver=4.6.80
+pkgrel=1
+pkgdesc="Perl bindings for the Qt libraries"
+url="http://kde.org/"
+arch=('i686' 'x86_64')
+license=('GPL' 'LGPL' 'FDL')
+groups=('kde' 'kdebindings')
+depends=('kdebindings-smokeqt')
+makedepends=('cmake' 'automoc4' 'kdebindings-smokegen')
+source=("http://download.kde.org/unstable/${pkgver}/src/perlqt-${pkgver}.tar.bz2")
+sha1sums=('aa6f72ff5eed3f178a1d7274e61c2c7ed81fd74e')
+
+build() {
+ cd "${srcdir}"
+ mkdir build
+ cd build
+ cmake ../perlqt-${pkgver} \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr
+ make
+}
+
+package() {
+ cd "${srcdir}"/build
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/kde-unstable/kdebindings-python/PKGBUILD b/kde-unstable/kdebindings-python/PKGBUILD
new file mode 100644
index 000000000..817ca914a
--- /dev/null
+++ b/kde-unstable/kdebindings-python/PKGBUILD
@@ -0,0 +1,41 @@
+# $Id: PKGBUILD 124775 2011-05-24 11:26:16Z andrea $
+# Maintainer: Andrea Scarpino <andrea@archlinux.org>
+
+pkgname=kdebindings-python
+pkgver=4.6.80
+pkgrel=1
+pkgdesc="KDE bindings for python"
+url="http://kde.org/"
+arch=('i686' 'x86_64')
+license=('GPL' 'LGPL' 'FDL')
+groups=('kde' 'kdebindings')
+depends=('kdepim-runtime' 'python2-pyqt' 'qscintilla' 'boost-libs')
+makedepends=('cmake' 'automoc4' 'boost')
+source=("http://download.kde.org/unstable/${pkgver}/src/pykde4-${pkgver}.tar.bz2"
+ 'fix-build.patch')
+sha1sums=('f45e40298046ecea382f9b85c34b3e21d856a9da'
+ '3d2329981ea571d38f0354c6d1300a2743a775db')
+
+build() {
+ cd "${srcdir}"/pykde4-${pkgver}
+ patch -p3 -i "${srcdir}"/fix-build.patch
+
+ cd "${srcdir}"
+ mkdir build
+ cd build
+ cmake ../pykde4-${pkgver} \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DPYTHON_EXECUTABLE=/usr/bin/python2
+ make
+}
+
+package() {
+ cd "${srcdir}"/build
+ make DESTDIR="${pkgdir}" install
+
+ # Use the python2 executable
+ find "${pkgdir}" -name '*.py' | xargs sed -i 's|#!/usr/bin/env python|#!/usr/bin/env python2|'
+}
+sha1sums=('f45e40298046ecea382f9b85c34b3e21d856a9da'
+ '4eb8917ad922819bbea038d79a9786cf5d0e2767')
diff --git a/kde-unstable/kdebindings-qtruby/PKGBUILD b/kde-unstable/kdebindings-qtruby/PKGBUILD
new file mode 100644
index 000000000..82fd53c1b
--- /dev/null
+++ b/kde-unstable/kdebindings-qtruby/PKGBUILD
@@ -0,0 +1,31 @@
+# $Id: PKGBUILD 124815 2011-05-24 15:22:45Z andrea $
+# Maintainer: Andrea Scarpino <andrea@archlinux.org>
+
+pkgname=kdebindings-qtruby
+pkgver=4.6.80
+pkgrel=1
+pkgdesc="Qt bindings for ruby"
+url="http://kde.org/"
+arch=('i686' 'x86_64')
+license=('GPL' 'LGPL' 'FDL')
+groups=('kde' 'kdebindings')
+depends=('kdebindings-smokeqt' 'ruby')
+makedepends=('cmake' 'automoc4' 'kdebindings-smokegen')
+conflicts=('kdebindings-ruby')
+source=("http://download.kde.org/unstable/${pkgver}/src/qtruby-${pkgver}.tar.bz2")
+sha1sums=('9b153784efb3187ca4f38a14355b8a5ce283316c')
+
+build() {
+ cd "${srcdir}"
+ mkdir build
+ cd build
+ cmake ../qtruby-${pkgver} \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr
+ make
+}
+
+package() {
+ cd "${srcdir}"/build
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/kde-unstable/kdebindings-qyoto/PKGBUILD b/kde-unstable/kdebindings-qyoto/PKGBUILD
new file mode 100644
index 000000000..d130b397d
--- /dev/null
+++ b/kde-unstable/kdebindings-qyoto/PKGBUILD
@@ -0,0 +1,31 @@
+# $Id: PKGBUILD 124815 2011-05-24 15:22:45Z andrea $
+# Maintainer: Andrea Scarpino <andrea@archlinux.org>
+
+pkgname=kdebindings-qyoto
+pkgver=4.6.80
+pkgrel=1
+pkgdesc=".NET/Mono bindings for the Qt libraries"
+url="http://kde.org/"
+arch=('i686' 'x86_64')
+license=('GPL' 'LGPL' 'FDL')
+groups=('kde' 'kdebindings')
+depends=('kdebindings-smokeqt' 'mono')
+makedepends=('cmake' 'automoc4' 'kdebindings-smokegen')
+conflicts=('kdebindings-csharp')
+source=("http://download.kde.org/unstable/${pkgver}/src/qyoto-${pkgver}.tar.bz2")
+sha1sums=('7f63ae1c1e30edf226ca8418d5fa78edaf42cb36')
+
+build() {
+ cd "${srcdir}"
+ mkdir build
+ cd build
+ cmake ../qyoto-${pkgver} \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr
+ make
+}
+
+package() {
+ cd "${srcdir}"/build
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/kde-unstable/kdebindings-smokegen/PKGBUILD b/kde-unstable/kdebindings-smokegen/PKGBUILD
new file mode 100644
index 000000000..ba2edc4f6
--- /dev/null
+++ b/kde-unstable/kdebindings-smokegen/PKGBUILD
@@ -0,0 +1,30 @@
+# $Id: PKGBUILD 124815 2011-05-24 15:22:45Z andrea $
+# Maintainer: Andrea Scarpino <andrea@archlinux.org>
+
+pkgname=kdebindings-smokegen
+pkgver=4.6.80
+pkgrel=1
+pkgdesc="A general purpose C++ parser with a plugin infrastructure"
+url="http://kde.org/"
+arch=('i686' 'x86_64')
+license=('GPL' 'LGPL' 'FDL')
+depends=('kdebase-runtime')
+makedepends=('cmake' 'automoc4')
+conflicts=('kdebindings-smoke')
+source=("http://download.kde.org/unstable/${pkgver}/src/smokegen-${pkgver}.tar.bz2")
+sha1sums=('ce860f4308df4cc91b1e49d0f1f5bca3805c4cf1')
+
+build() {
+ cd "${srcdir}"
+ mkdir build
+ cd build
+ cmake ../smokegen-${pkgver} \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr
+ make
+}
+
+package() {
+ cd "${srcdir}"/build
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/kde-unstable/kdebindings-smokekde/PKGBUILD b/kde-unstable/kdebindings-smokekde/PKGBUILD
new file mode 100644
index 000000000..6f9724353
--- /dev/null
+++ b/kde-unstable/kdebindings-smokekde/PKGBUILD
@@ -0,0 +1,32 @@
+# $Id: PKGBUILD 124928 2011-05-25 09:28:04Z andrea $
+# Maintainer: Andrea Scarpino <andrea@archlinux.org>
+
+pkgname=kdebindings-smokekde
+pkgver=4.6.80
+pkgrel=1
+pkgdesc="Language independent library for KDE bindings"
+url="http://kde.org/"
+arch=('i686' 'x86_64')
+license=('GPL' 'LGPL' 'FDL')
+groups=('kde' 'kdebindings')
+depends=('kdebindings-smokeqt')
+makedepends=('cmake' 'automoc4' 'kdebindings-smokegen' 'boost'
+ 'kdepimlibs' 'kdegraphics-okular' 'kdesdk-kate')
+conflicts=('kdebindings-smoke')
+source=("http://download.kde.org/unstable/${pkgver}/src/smokekde-${pkgver}.tar.bz2")
+sha1sums=('9fd8cbac3f0affce6fa078b07ca418a5e0c79521')
+
+build() {
+ cd "${srcdir}"
+ mkdir build
+ cd build
+ cmake ../smokekde-${pkgver} \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr
+ make
+}
+
+package() {
+ cd "${srcdir}"/build
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/kde-unstable/kdebindings-smokeqt/PKGBUILD b/kde-unstable/kdebindings-smokeqt/PKGBUILD
new file mode 100644
index 000000000..c7bdbcbd1
--- /dev/null
+++ b/kde-unstable/kdebindings-smokeqt/PKGBUILD
@@ -0,0 +1,31 @@
+# $Id: PKGBUILD 124815 2011-05-24 15:22:45Z andrea $
+# Maintainer: Andrea Scarpino <andrea@archlinux.org>
+
+pkgname=kdebindings-smokeqt
+pkgver=4.6.80
+pkgrel=1
+pkgdesc="Language independent library for Qt bindings"
+url="http://kde.org/"
+arch=('i686' 'x86_64')
+license=('GPL' 'LGPL' 'FDL')
+groups=('kde' 'kdebindings')
+depends=('kdebase-runtime' 'qimageblitz' 'qscintilla' 'qwt')
+makedepends=('cmake' 'automoc4' 'kdebindings-smokegen')
+conflicts=('kdebindings-smoke')
+source=("http://download.kde.org/unstable/${pkgver}/src/smokeqt-${pkgver}.tar.bz2")
+sha1sums=('872b77e7e445b7492a647e63e267677604d76a96')
+
+build() {
+ cd "${srcdir}"
+ mkdir build
+ cd build
+ cmake ../smokeqt-${pkgver} \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr
+ make
+}
+
+package() {
+ cd "${srcdir}"/build
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/kde-unstable/kdeedu-blinken/PKGBUILD b/kde-unstable/kdeedu-blinken/PKGBUILD
new file mode 100644
index 000000000..7ebd3c811
--- /dev/null
+++ b/kde-unstable/kdeedu-blinken/PKGBUILD
@@ -0,0 +1,31 @@
+# $Id: PKGBUILD 124761 2011-05-24 08:01:51Z andrea $
+# Maintainer: Andrea Scarpino <andrea@archlinux.org>
+
+pkgname=kdeedu-blinken
+pkgver=4.6.80
+pkgrel=1
+pkgdesc="Memory Enhancement Game"
+url="http://kde.org/applications/education/blinken/"
+arch=('i686' 'x86_64')
+license=('GPL' 'LGPL' 'FDL')
+groups=('kde' 'kdeedu')
+depends=('kdebase-runtime')
+makedepends=('cmake' 'automoc4')
+install=${pkgname}.install
+source=("http://download.kde.org/unstable/${pkgver}/src/blinken-${pkgver}.tar.bz2")
+sha1sums=('847ee81d2a4f5f1acb4bf8c0835c2e8187a631ea')
+
+build() {
+ cd "${srcdir}"
+ mkdir build
+ cd build
+ cmake ../blinken-${pkgver} \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr
+ make
+}
+
+package() {
+ cd "${srcdir}"/build
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/kde-unstable/kdeedu-blinken/kdeedu-blinken.install b/kde-unstable/kdeedu-blinken/kdeedu-blinken.install
new file mode 100644
index 000000000..e70c054ec
--- /dev/null
+++ b/kde-unstable/kdeedu-blinken/kdeedu-blinken.install
@@ -0,0 +1,11 @@
+post_install() {
+ xdg-icon-resource forceupdate --theme hicolor &> /dev/null
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
diff --git a/kde-unstable/kdeedu-cantor/PKGBUILD b/kde-unstable/kdeedu-cantor/PKGBUILD
new file mode 100644
index 000000000..a82cacfaa
--- /dev/null
+++ b/kde-unstable/kdeedu-cantor/PKGBUILD
@@ -0,0 +1,31 @@
+# $Id: PKGBUILD 124761 2011-05-24 08:01:51Z andrea $
+# Maintainer: Andrea Scarpino <andrea@archlinux.org>
+
+pkgname=kdeedu-cantor
+pkgver=4.6.80
+pkgrel=1
+pkgdesc="KDE Frontend to Mathematical Software"
+url="http://kde.org/applications/education/cantor/"
+arch=('i686' 'x86_64')
+license=('GPL' 'LGPL' 'FDL')
+groups=('kde' 'kdeedu')
+depends=('kdebase-runtime' 'r' 'libspectre')
+makedepends=('cmake' 'automoc4')
+install=${pkgname}.install
+source=("http://download.kde.org/unstable/${pkgver}/src/cantor-${pkgver}.tar.bz2")
+sha1sums=('0c6ebd5e523bf5fdf01bbf654ce60a55fc72cbe2')
+
+build() {
+ cd "${srcdir}"
+ mkdir build
+ cd build
+ cmake ../cantor-${pkgver} \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr
+ make
+}
+
+package() {
+ cd "${srcdir}"/build
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/kde-unstable/kdeedu-cantor/kdeedu-cantor.install b/kde-unstable/kdeedu-cantor/kdeedu-cantor.install
new file mode 100644
index 000000000..81ce5c4b0
--- /dev/null
+++ b/kde-unstable/kdeedu-cantor/kdeedu-cantor.install
@@ -0,0 +1,12 @@
+post_install() {
+ xdg-icon-resource forceupdate --theme hicolor &> /dev/null
+ update-desktop-database -q
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
diff --git a/kde-unstable/kdeedu-kalgebra/PKGBUILD b/kde-unstable/kdeedu-kalgebra/PKGBUILD
new file mode 100644
index 000000000..40b24830e
--- /dev/null
+++ b/kde-unstable/kdeedu-kalgebra/PKGBUILD
@@ -0,0 +1,31 @@
+# $Id: PKGBUILD 124761 2011-05-24 08:01:51Z andrea $
+# Maintainer: Andrea Scarpino <andrea@archlinux.org>
+
+pkgname=kdeedu-kalgebra
+pkgver=4.6.80
+pkgrel=1
+pkgdesc="Graph Calculator"
+url="http://kde.org/applications/education/kalgebra/"
+arch=('i686' 'x86_64')
+license=('GPL' 'LGPL' 'FDL')
+groups=('kde' 'kdeedu')
+depends=('kdebase-runtime' 'libkdeedu')
+makedepends=('cmake' 'automoc4')
+install=${pkgname}.install
+source=("http://download.kde.org/unstable/${pkgver}/src/kalgebra-${pkgver}.tar.bz2")
+sha1sums=('d448a675782157d8c553db497e048231d6eb5f53')
+
+build() {
+ cd "${srcdir}"
+ mkdir build
+ cd build
+ cmake ../kalgebra-${pkgver} \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr
+ make
+}
+
+package() {
+ cd "${srcdir}"/build
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/kde-unstable/kdeedu-kalgebra/kdeedu-kalgebra.install b/kde-unstable/kdeedu-kalgebra/kdeedu-kalgebra.install
new file mode 100644
index 000000000..81ce5c4b0
--- /dev/null
+++ b/kde-unstable/kdeedu-kalgebra/kdeedu-kalgebra.install
@@ -0,0 +1,12 @@
+post_install() {
+ xdg-icon-resource forceupdate --theme hicolor &> /dev/null
+ update-desktop-database -q
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
diff --git a/kde-unstable/kdeedu-kalzium/PKGBUILD b/kde-unstable/kdeedu-kalzium/PKGBUILD
new file mode 100644
index 000000000..8bc1d0c3c
--- /dev/null
+++ b/kde-unstable/kdeedu-kalzium/PKGBUILD
@@ -0,0 +1,31 @@
+# $Id: PKGBUILD 124761 2011-05-24 08:01:51Z andrea $
+# Maintainer: Andrea Scarpino <andrea@archlinux.org>
+
+pkgname=kdeedu-kalzium
+pkgver=4.6.80
+pkgrel=1
+pkgdesc="Periodic Table of Elements"
+url="http://kde.org/applications/education/kalzium/"
+arch=('i686' 'x86_64')
+license=('GPL' 'LGPL' 'FDL')
+groups=('kde' 'kdeedu')
+depends=('kdelibs' 'avogadro' 'ocaml')
+makedepends=('cmake' 'automoc4')
+install=${pkgname}.install
+source=("http://download.kde.org/unstable/${pkgver}/src/kalzium-${pkgver}.tar.bz2")
+sha1sums=('1ace4d42711904d9556efbe1ff89dc4c803887fe')
+
+build() {
+ cd "${srcdir}"
+ mkdir build
+ cd build
+ cmake ../kalzium-${pkgver} \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr
+ make
+}
+
+package() {
+ cd "${srcdir}"/build
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/kde-unstable/kdeedu-kalzium/kdeedu-kalzium.install b/kde-unstable/kdeedu-kalzium/kdeedu-kalzium.install
new file mode 100644
index 000000000..e70c054ec
--- /dev/null
+++ b/kde-unstable/kdeedu-kalzium/kdeedu-kalzium.install
@@ -0,0 +1,11 @@
+post_install() {
+ xdg-icon-resource forceupdate --theme hicolor &> /dev/null
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
diff --git a/kde-unstable/kdeedu-kanagram/PKGBUILD b/kde-unstable/kdeedu-kanagram/PKGBUILD
new file mode 100644
index 000000000..45a33746c
--- /dev/null
+++ b/kde-unstable/kdeedu-kanagram/PKGBUILD
@@ -0,0 +1,31 @@
+# $Id: PKGBUILD 124761 2011-05-24 08:01:51Z andrea $
+# Maintainer: Andrea Scarpino <andrea@archlinux.org>
+
+pkgname=kdeedu-kanagram
+pkgver=4.6.80
+pkgrel=1
+pkgdesc="Letter Order Game"
+url="http://kde.org/applications/education/kanagram/"
+arch=('i686' 'x86_64')
+license=('GPL' 'LGPL' 'FDL')
+groups=('kde' 'kdeedu')
+depends=('kdebase-runtime' 'libkdeedu')
+makedepends=('cmake' 'automoc4')
+install=${pkgname}.install
+source=("http://download.kde.org/unstable/${pkgver}/src/kanagram-${pkgver}.tar.bz2")
+sha1sums=('b7075ffa2c366acecfce13b5bef9938c6317aefb')
+
+build() {
+ cd "${srcdir}"
+ mkdir build
+ cd build
+ cmake ../kanagram-${pkgver} \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr
+ make
+}
+
+package() {
+ cd "${srcdir}"/build
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/kde-unstable/kdeedu-kanagram/kdeedu-kanagram.install b/kde-unstable/kdeedu-kanagram/kdeedu-kanagram.install
new file mode 100644
index 000000000..e70c054ec
--- /dev/null
+++ b/kde-unstable/kdeedu-kanagram/kdeedu-kanagram.install
@@ -0,0 +1,11 @@
+post_install() {
+ xdg-icon-resource forceupdate --theme hicolor &> /dev/null
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
diff --git a/kde-unstable/kdeedu-kbruch/PKGBUILD b/kde-unstable/kdeedu-kbruch/PKGBUILD
new file mode 100644
index 000000000..9710c1df2
--- /dev/null
+++ b/kde-unstable/kdeedu-kbruch/PKGBUILD
@@ -0,0 +1,31 @@
+# $Id: PKGBUILD 124761 2011-05-24 08:01:51Z andrea $
+# Maintainer: Andrea Scarpino <andrea@archlinux.org>
+
+pkgname=kdeedu-kbruch
+pkgver=4.6.80
+pkgrel=1
+pkgdesc="Exercise Fractions"
+url="http://kde.org/applications/education/kbruch/"
+arch=('i686' 'x86_64')
+license=('GPL' 'LGPL' 'FDL')
+groups=('kde' 'kdeedu')
+depends=('kdebase-runtime')
+makedepends=('cmake' 'automoc4')
+install=${pkgname}.install
+source=("http://download.kde.org/unstable/${pkgver}/src/kbruch-${pkgver}.tar.bz2")
+sha1sums=('205b7f2171e67b55fc1bbcd0844702daf9dcb4a6')
+
+build() {
+ cd "${srcdir}"
+ mkdir build
+ cd build
+ cmake ../kbruch-${pkgver} \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr
+ make
+}
+
+package() {
+ cd "${srcdir}"/build
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/kde-unstable/kdeedu-kbruch/kdeedu-kbruch.install b/kde-unstable/kdeedu-kbruch/kdeedu-kbruch.install
new file mode 100644
index 000000000..e70c054ec
--- /dev/null
+++ b/kde-unstable/kdeedu-kbruch/kdeedu-kbruch.install
@@ -0,0 +1,11 @@
+post_install() {
+ xdg-icon-resource forceupdate --theme hicolor &> /dev/null
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
diff --git a/kde-unstable/kdeedu-kgeography/PKGBUILD b/kde-unstable/kdeedu-kgeography/PKGBUILD
new file mode 100644
index 000000000..720c4027a
--- /dev/null
+++ b/kde-unstable/kdeedu-kgeography/PKGBUILD
@@ -0,0 +1,31 @@
+# $Id: PKGBUILD 124761 2011-05-24 08:01:51Z andrea $
+# Maintainer: Andrea Scarpino <andrea@archlinux.org>
+
+pkgname=kdeedu-kgeography
+pkgver=4.6.80
+pkgrel=1
+pkgdesc="Geography Trainer"
+url="http://kde.org/applications/education/kgeography/"
+arch=('i686' 'x86_64')
+license=('GPL' 'LGPL' 'FDL')
+groups=('kde' 'kdeedu')
+depends=('kdebase-runtime')
+makedepends=('cmake' 'automoc4')
+install=${pkgname}.install
+source=("http://download.kde.org/unstable/${pkgver}/src/kgeography-${pkgver}.tar.bz2")
+sha1sums=('2d161ef150618780e6f2bcf3a8e19993a5c95fa6')
+
+build() {
+ cd "${srcdir}"
+ mkdir build
+ cd build
+ cmake ../kgeography-${pkgver} \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr
+ make
+}
+
+package() {
+ cd "${srcdir}"/build
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/kde-unstable/kdeedu-kgeography/kdeedu-kgeography.install b/kde-unstable/kdeedu-kgeography/kdeedu-kgeography.install
new file mode 100644
index 000000000..e70c054ec
--- /dev/null
+++ b/kde-unstable/kdeedu-kgeography/kdeedu-kgeography.install
@@ -0,0 +1,11 @@
+post_install() {
+ xdg-icon-resource forceupdate --theme hicolor &> /dev/null
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
diff --git a/kde-unstable/kdeedu-khangman/PKGBUILD b/kde-unstable/kdeedu-khangman/PKGBUILD
new file mode 100644
index 000000000..56df0fbce
--- /dev/null
+++ b/kde-unstable/kdeedu-khangman/PKGBUILD
@@ -0,0 +1,31 @@
+# $Id: PKGBUILD 124761 2011-05-24 08:01:51Z andrea $
+# Maintainer: Andrea Scarpino <andrea@archlinux.org>
+
+pkgname=kdeedu-khangman
+pkgver=4.6.80
+pkgrel=1
+pkgdesc="Hangman Game"
+url="http://kde.org/applications/education/khangman/"
+arch=('i686' 'x86_64')
+license=('GPL' 'LGPL' 'FDL')
+groups=('kde' 'kdeedu')
+depends=('kdebase-runtime' 'libkdeedu')
+makedepends=('cmake' 'automoc4')
+install=${pkgname}.install
+source=("http://download.kde.org/unstable/${pkgver}/src/khangman-${pkgver}.tar.bz2")
+sha1sums=('a3e140a71c27400d49f75b862965123c1df6e992')
+
+build() {
+ cd "${srcdir}"
+ mkdir build
+ cd build
+ cmake ../khangman-${pkgver} \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr
+ make
+}
+
+package() {
+ cd "${srcdir}"/build
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/kde-unstable/kdeedu-khangman/kdeedu-khangman.install b/kde-unstable/kdeedu-khangman/kdeedu-khangman.install
new file mode 100644
index 000000000..e70c054ec
--- /dev/null
+++ b/kde-unstable/kdeedu-khangman/kdeedu-khangman.install
@@ -0,0 +1,11 @@
+post_install() {
+ xdg-icon-resource forceupdate --theme hicolor &> /dev/null
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
diff --git a/kde-unstable/kdeedu-kig/PKGBUILD b/kde-unstable/kdeedu-kig/PKGBUILD
new file mode 100644
index 000000000..ca6f92279
--- /dev/null
+++ b/kde-unstable/kdeedu-kig/PKGBUILD
@@ -0,0 +1,34 @@
+# $Id: PKGBUILD 125335 2011-05-25 23:12:03Z andrea $
+# Maintainer: Andrea Scarpino <andrea@archlinux.org>
+
+pkgname=kdeedu-kig
+pkgver=4.6.80
+pkgrel=2
+pkgdesc="Interactive Geometry"
+url="http://kde.org/applications/education/kig/"
+arch=('i686' 'x86_64')
+license=('GPL' 'LGPL' 'FDL')
+groups=('kde' 'kdeedu')
+depends=('kdebase-runtime')
+makedepends=('cmake' 'automoc4')
+install=${pkgname}.install
+source=("http://download.kde.org/unstable/${pkgver}/src/kig-${pkgver}.tar.bz2")
+sha1sums=('d0b2ca69262b1e720be8ab2b6cfb9dd6b5a81371')
+
+build() {
+ cd "${srcdir}"
+ mkdir build
+ cd build
+ cmake ../kig-${pkgver} \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr
+ make
+}
+
+package() {
+ cd "${srcdir}"/build
+ make DESTDIR="${pkgdir}" install
+
+ # Use the python2 executable
+ sed -i 's|#!/usr/bin/env python|#!/usr/bin/env python2|' "${pkgdir}"/usr/bin/pykig.py
+}
diff --git a/kde-unstable/kdeedu-kig/kdeedu-kig.install b/kde-unstable/kdeedu-kig/kdeedu-kig.install
new file mode 100644
index 000000000..81ce5c4b0
--- /dev/null
+++ b/kde-unstable/kdeedu-kig/kdeedu-kig.install
@@ -0,0 +1,12 @@
+post_install() {
+ xdg-icon-resource forceupdate --theme hicolor &> /dev/null
+ update-desktop-database -q
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
diff --git a/kde-unstable/kdeedu-kiten/PKGBUILD b/kde-unstable/kdeedu-kiten/PKGBUILD
new file mode 100644
index 000000000..6ba5c4b19
--- /dev/null
+++ b/kde-unstable/kdeedu-kiten/PKGBUILD
@@ -0,0 +1,31 @@
+# $Id: PKGBUILD 124761 2011-05-24 08:01:51Z andrea $
+# Maintainer: Andrea Scarpino <andrea@archlinux.org>
+
+pkgname=kdeedu-kiten
+pkgver=4.6.80
+pkgrel=1
+pkgdesc="Japanese Reference/Study Tool"
+url="http://kde.org/applications/education/kiten/"
+arch=('i686' 'x86_64')
+license=('GPL' 'LGPL' 'FDL')
+groups=('kde' 'kdeedu')
+depends=('kdebase-runtime')
+makedepends=('cmake' 'automoc4')
+install=${pkgname}.install
+source=("http://download.kde.org/unstable/${pkgver}/src/kiten-${pkgver}.tar.bz2")
+sha1sums=('a5120c87015e044b4313e889b80afd608341e414')
+
+build() {
+ cd "${srcdir}"
+ mkdir build
+ cd build
+ cmake ../kiten-${pkgver} \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr
+ make
+}
+
+package() {
+ cd "${srcdir}"/build
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/kde-unstable/kdeedu-kiten/kdeedu-kiten.install b/kde-unstable/kdeedu-kiten/kdeedu-kiten.install
new file mode 100644
index 000000000..e70c054ec
--- /dev/null
+++ b/kde-unstable/kdeedu-kiten/kdeedu-kiten.install
@@ -0,0 +1,11 @@
+post_install() {
+ xdg-icon-resource forceupdate --theme hicolor &> /dev/null
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
diff --git a/kde-unstable/kdeedu-klettres/PKGBUILD b/kde-unstable/kdeedu-klettres/PKGBUILD
new file mode 100644
index 000000000..70f5e54b4
--- /dev/null
+++ b/kde-unstable/kdeedu-klettres/PKGBUILD
@@ -0,0 +1,31 @@
+# $Id: PKGBUILD 124761 2011-05-24 08:01:51Z andrea $
+# Maintainer: Andrea Scarpino <andrea@archlinux.org>
+
+pkgname=kdeedu-klettres
+pkgver=4.6.80
+pkgrel=1
+pkgdesc="Learn The Alphabet"
+url="http://kde.org/applications/education/klettres/"
+arch=('i686' 'x86_64')
+license=('GPL' 'LGPL' 'FDL')
+groups=('kde' 'kdeedu')
+depends=('kdebase-runtime')
+makedepends=('cmake' 'automoc4')
+install=${pkgname}.install
+source=("http://download.kde.org/unstable/${pkgver}/src/klettres-${pkgver}.tar.bz2")
+sha1sums=('395a1c700eaf1fee83216facbe5442162d383e64')
+
+build() {
+ cd "${srcdir}"
+ mkdir build
+ cd build
+ cmake ../klettres-${pkgver} \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr
+ make
+}
+
+package() {
+ cd "${srcdir}"/build
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/kde-unstable/kdeedu-klettres/kdeedu-klettres.install b/kde-unstable/kdeedu-klettres/kdeedu-klettres.install
new file mode 100644
index 000000000..e70c054ec
--- /dev/null
+++ b/kde-unstable/kdeedu-klettres/kdeedu-klettres.install
@@ -0,0 +1,11 @@
+post_install() {
+ xdg-icon-resource forceupdate --theme hicolor &> /dev/null
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
diff --git a/kde-unstable/kdeedu-kmplot/PKGBUILD b/kde-unstable/kdeedu-kmplot/PKGBUILD
new file mode 100644
index 000000000..8db40962f
--- /dev/null
+++ b/kde-unstable/kdeedu-kmplot/PKGBUILD
@@ -0,0 +1,31 @@
+# $Id: PKGBUILD 124761 2011-05-24 08:01:51Z andrea $
+# Maintainer: Andrea Scarpino <andrea@archlinux.org>
+
+pkgname=kdeedu-kmplot
+pkgver=4.6.80
+pkgrel=1
+pkgdesc="Mathematical Function Plotter"
+url="http://kde.org/applications/education/kmplot/"
+arch=('i686' 'x86_64')
+license=('GPL' 'LGPL' 'FDL')
+groups=('kde' 'kdeedu')
+depends=('kdebase-runtime')
+makedepends=('cmake' 'automoc4')
+install=${pkgname}.install
+source=("http://download.kde.org/unstable/${pkgver}/src/kmplot-${pkgver}.tar.bz2")
+sha1sums=('be3593a33b05a59d82020d988804e82737abbc09')
+
+build() {
+ cd "${srcdir}"
+ mkdir build
+ cd build
+ cmake ../kmplot-${pkgver} \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr
+ make
+}
+
+package() {
+ cd "${srcdir}"/build
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/kde-unstable/kdeedu-kmplot/kdeedu-kmplot.install b/kde-unstable/kdeedu-kmplot/kdeedu-kmplot.install
new file mode 100644
index 000000000..81ce5c4b0
--- /dev/null
+++ b/kde-unstable/kdeedu-kmplot/kdeedu-kmplot.install
@@ -0,0 +1,12 @@
+post_install() {
+ xdg-icon-resource forceupdate --theme hicolor &> /dev/null
+ update-desktop-database -q
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
diff --git a/kde-unstable/kdeedu-kstars/PKGBUILD b/kde-unstable/kdeedu-kstars/PKGBUILD
new file mode 100644
index 000000000..77306c68d
--- /dev/null
+++ b/kde-unstable/kdeedu-kstars/PKGBUILD
@@ -0,0 +1,32 @@
+# $Id: PKGBUILD 124761 2011-05-24 08:01:51Z andrea $
+# Maintainer: Andrea Scarpino <andrea@archlinux.org>
+
+pkgname=kdeedu-kstars
+pkgver=4.6.80
+pkgrel=1
+pkgdesc="Desktop Planetarium"
+url="http://kde.org/applications/education/kstars/"
+arch=('i686' 'x86_64')
+license=('GPL' 'LGPL' 'FDL')
+groups=('kde' 'kdeedu')
+depends=('kdebase-runtime' 'eigen' 'cfitsio' 'libindi')
+makedepends=('cmake' 'automoc4')
+install=${pkgname}.install
+source=("http://download.kde.org/unstable/${pkgver}/src/kstars-${pkgver}.tar.bz2")
+sha1sums=('c74818da033d70200b873a954a2f05af3e03c610')
+
+build() {
+ cd "${srcdir}"
+ mkdir build
+ cd build
+ cmake ../kstars-${pkgver} \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DWITH_Xplanet=OFF
+ make
+}
+
+package() {
+ cd "${srcdir}"/build
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/kde-unstable/kdeedu-kstars/kdeedu-kstars.install b/kde-unstable/kdeedu-kstars/kdeedu-kstars.install
new file mode 100644
index 000000000..e70c054ec
--- /dev/null
+++ b/kde-unstable/kdeedu-kstars/kdeedu-kstars.install
@@ -0,0 +1,11 @@
+post_install() {
+ xdg-icon-resource forceupdate --theme hicolor &> /dev/null
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
diff --git a/kde-unstable/kdeedu-ktouch/PKGBUILD b/kde-unstable/kdeedu-ktouch/PKGBUILD
new file mode 100644
index 000000000..0b8e706e9
--- /dev/null
+++ b/kde-unstable/kdeedu-ktouch/PKGBUILD
@@ -0,0 +1,31 @@
+# $Id: PKGBUILD 124761 2011-05-24 08:01:51Z andrea $
+# Maintainer: Andrea Scarpino <andrea@archlinux.org>
+
+pkgname=kdeedu-ktouch
+pkgver=4.6.80
+pkgrel=1
+pkgdesc="Touch Typing Tutor"
+url="http://kde.org/applications/education/ktouch/"
+arch=('i686' 'x86_64')
+license=('GPL' 'LGPL' 'FDL')
+groups=('kde' 'kdeedu')
+depends=('kdebase-runtime')
+makedepends=('cmake' 'automoc4')
+install=${pkgname}.install
+source=("http://download.kde.org/unstable/${pkgver}/src/ktouch-${pkgver}.tar.bz2")
+sha1sums=('7e80926b1fe45d7af861891a140e843b27cbf171')
+
+build() {
+ cd "${srcdir}"
+ mkdir build
+ cd build
+ cmake ../ktouch-${pkgver} \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr
+ make
+}
+
+package() {
+ cd "${srcdir}"/build
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/kde-unstable/kdeedu-ktouch/kdeedu-ktouch.install b/kde-unstable/kdeedu-ktouch/kdeedu-ktouch.install
new file mode 100644
index 000000000..e70c054ec
--- /dev/null
+++ b/kde-unstable/kdeedu-ktouch/kdeedu-ktouch.install
@@ -0,0 +1,11 @@
+post_install() {
+ xdg-icon-resource forceupdate --theme hicolor &> /dev/null
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
diff --git a/kde-unstable/kdeedu-kturtle/PKGBUILD b/kde-unstable/kdeedu-kturtle/PKGBUILD
new file mode 100644
index 000000000..dc60d6200
--- /dev/null
+++ b/kde-unstable/kdeedu-kturtle/PKGBUILD
@@ -0,0 +1,31 @@
+# $Id: PKGBUILD 124761 2011-05-24 08:01:51Z andrea $
+# Maintainer: Andrea Scarpino <andrea@archlinux.org>
+
+pkgname=kdeedu-kturtle
+pkgver=4.6.80
+pkgrel=1
+pkgdesc="Educational Programming Environment"
+url="http://kde.org/applications/education/kturtle/"
+arch=('i686' 'x86_64')
+license=('GPL' 'LGPL' 'FDL')
+groups=('kde' 'kdeedu')
+depends=('kdebase-runtime')
+makedepends=('cmake' 'automoc4')
+install=${pkgname}.install
+source=("http://download.kde.org/unstable/${pkgver}/src/kturtle-${pkgver}.tar.bz2")
+sha1sums=('5aa67c458212315616a9c67e06a3e8a8a79ee302')
+
+build() {
+ cd "${srcdir}"
+ mkdir build
+ cd build
+ cmake ../kturtle-${pkgver} \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr
+ make
+}
+
+package() {
+ cd "${srcdir}"/build
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/kde-unstable/kdeedu-kturtle/kdeedu-kturtle.install b/kde-unstable/kdeedu-kturtle/kdeedu-kturtle.install
new file mode 100644
index 000000000..e70c054ec
--- /dev/null
+++ b/kde-unstable/kdeedu-kturtle/kdeedu-kturtle.install
@@ -0,0 +1,11 @@
+post_install() {
+ xdg-icon-resource forceupdate --theme hicolor &> /dev/null
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
diff --git a/kde-unstable/kdeedu-kwordquiz/PKGBUILD b/kde-unstable/kdeedu-kwordquiz/PKGBUILD
new file mode 100644
index 000000000..76696bc6d
--- /dev/null
+++ b/kde-unstable/kdeedu-kwordquiz/PKGBUILD
@@ -0,0 +1,31 @@
+# $Id: PKGBUILD 124761 2011-05-24 08:01:51Z andrea $
+# Maintainer: Andrea Scarpino <andrea@archlinux.org>
+
+pkgname=kdeedu-kwordquiz
+pkgver=4.6.80
+pkgrel=1
+pkgdesc="Flash Card Trainer"
+url="http://kde.org/applications/education/kwordquiz/"
+arch=('i686' 'x86_64')
+license=('GPL' 'LGPL' 'FDL')
+groups=('kde' 'kdeedu')
+depends=('kdebase-runtime' 'libkdeedu')
+makedepends=('cmake' 'automoc4')
+install=${pkgname}.install
+source=("http://download.kde.org/unstable/${pkgver}/src/kwordquiz-${pkgver}.tar.bz2")
+sha1sums=('44277946ffad538cd50690af9475e0520698bafb')
+
+build() {
+ cd "${srcdir}"
+ mkdir build
+ cd build
+ cmake ../kwordquiz-${pkgver} \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr
+ make
+}
+
+package() {
+ cd "${srcdir}"/build
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/kde-unstable/kdeedu-kwordquiz/kdeedu-kwordquiz.install b/kde-unstable/kdeedu-kwordquiz/kdeedu-kwordquiz.install
new file mode 100644
index 000000000..81ce5c4b0
--- /dev/null
+++ b/kde-unstable/kdeedu-kwordquiz/kdeedu-kwordquiz.install
@@ -0,0 +1,12 @@
+post_install() {
+ xdg-icon-resource forceupdate --theme hicolor &> /dev/null
+ update-desktop-database -q
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
diff --git a/kde-unstable/kdeedu-marble/PKGBUILD b/kde-unstable/kdeedu-marble/PKGBUILD
new file mode 100644
index 000000000..39fe50f17
--- /dev/null
+++ b/kde-unstable/kdeedu-marble/PKGBUILD
@@ -0,0 +1,36 @@
+# $Id: PKGBUILD 124761 2011-05-24 08:01:51Z andrea $
+# Maintainer: Andrea Scarpino <andrea@archlinux.org>
+
+pkgname=kdeedu-marble
+pkgver=4.6.80
+pkgrel=1
+pkgdesc="Desktop Globe"
+url="http://kde.org/applications/education/marble/"
+arch=('i686' 'x86_64')
+license=('GPL' 'LGPL' 'FDL')
+groups=('kde' 'kdeedu')
+depends=('kdebase-runtime' 'gpsd')
+makedepends=('cmake' 'automoc4')
+install=${pkgname}.install
+source=("http://download.kde.org/unstable/${pkgver}/src/marble-${pkgver}.tar.bz2"
+ 'gpsd-2.96.patch')
+sha1sums=('4d7663909efe3b42006debd78f1217bb3dfffd88'
+ 'f44dfd3bb384e631d59b93d7dda3413795da8183')
+
+build() {
+ cd "${srcdir}"/marble-${pkgver}
+ patch -p1 -i "${srcdir}"/gpsd-2.96.patch
+
+ cd "${srcdir}"
+ mkdir build
+ cd build
+ cmake ../marble-${pkgver} \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr
+ make
+}
+
+package() {
+ cd "${srcdir}"/build
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/kde-unstable/kdeedu-marble/gpsd-2.96.patch b/kde-unstable/kdeedu-marble/gpsd-2.96.patch
new file mode 100644
index 000000000..e27702181
--- /dev/null
+++ b/kde-unstable/kdeedu-marble/gpsd-2.96.patch
@@ -0,0 +1,41 @@
+--- marble-4.6.80/src/plugins/positionprovider/gpsd/GpsdConnection.cpp
++++ marble-4.6.80/src/plugins/positionprovider/gpsd/GpsdConnection.cpp
+@@ -18,6 +18,9 @@ using namespace Marble;
+
+ GpsdConnection::GpsdConnection( QObject* parent )
+ : QObject( parent ),
++#if defined( GPSD_API_MAJOR_VERSION ) && ( GPSD_API_MAJOR_VERSION >= 5 )
++ m_gpsd("localhost", DEFAULT_GPSD_PORT),
++#endif
+ m_timer( 0 )
+ {
+ connect( &m_timer, SIGNAL( timeout() ), this, SLOT( update() ) );
+@@ -26,7 +29,11 @@ GpsdConnection::GpsdConnection( QObject*
+ void GpsdConnection::initialize()
+ {
+ m_timer.stop();
++#if defined( GPSD_API_MAJOR_VERSION ) && ( GPSD_API_MAJOR_VERSION >= 5 )
++ gps_data_t* data;
++#else
+ gps_data_t* data = m_gpsd.open();
++#endif
+ if ( data ) {
+ m_status = PositionProviderStatusAcquiring;
+ emit statusChanged( m_status );
+@@ -73,8 +80,16 @@ void GpsdConnection::initialize()
+ void GpsdConnection::update()
+ {
+ #if defined( GPSD_API_MAJOR_VERSION ) && ( GPSD_API_MAJOR_VERSION >= 3 ) && defined( PACKET_SET )
++#if defined( GPSD_API_MAJOR_VERSION ) && ( GPSD_API_MAJOR_VERSION >= 5 )
++ if ( m_gpsd.waiting(0) ) {
++#else
+ if ( m_gpsd.waiting() ) {
++#endif
++#if defined( GPSD_API_MAJOR_VERSION ) && ( GPSD_API_MAJOR_VERSION >= 5 )
++ gps_data_t* data = m_gpsd.read();
++#else
+ gps_data_t* data = m_gpsd.poll();
++#endif
+ if ( data && data->set & PACKET_SET ) {
+ emit gpsdInfo( *data );
+ }
diff --git a/kde-unstable/kdeedu-marble/kdeedu-marble.install b/kde-unstable/kdeedu-marble/kdeedu-marble.install
new file mode 100644
index 000000000..81ce5c4b0
--- /dev/null
+++ b/kde-unstable/kdeedu-marble/kdeedu-marble.install
@@ -0,0 +1,12 @@
+post_install() {
+ xdg-icon-resource forceupdate --theme hicolor &> /dev/null
+ update-desktop-database -q
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
diff --git a/kde-unstable/kdeedu-parley/PKGBUILD b/kde-unstable/kdeedu-parley/PKGBUILD
new file mode 100644
index 000000000..7b27fa558
--- /dev/null
+++ b/kde-unstable/kdeedu-parley/PKGBUILD
@@ -0,0 +1,31 @@
+# $Id: PKGBUILD 124761 2011-05-24 08:01:51Z andrea $
+# Maintainer: Andrea Scarpino <andrea@archlinux.org>
+
+pkgname=kdeedu-parley
+pkgver=4.6.80
+pkgrel=1
+pkgdesc="Vocabulary Trainer"
+url="http://kde.org/applications/education/parley/"
+arch=('i686' 'x86_64')
+license=('GPL' 'LGPL' 'FDL')
+groups=('kde' 'kdeedu')
+depends=('kdebase-runtime' 'libkdeedu')
+makedepends=('cmake' 'automoc4')
+install=${pkgname}.install
+source=("http://download.kde.org/unstable/${pkgver}/src/parley-${pkgver}.tar.bz2")
+sha1sums=('991f7aeee7849913a167d65b792791724bc5c1aa')
+
+build() {
+ cd "${srcdir}"
+ mkdir build
+ cd build
+ cmake ../parley-${pkgver} \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr
+ make
+}
+
+package() {
+ cd "${srcdir}"/build
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/kde-unstable/kdeedu-parley/kdeedu-parley.install b/kde-unstable/kdeedu-parley/kdeedu-parley.install
new file mode 100644
index 000000000..81ce5c4b0
--- /dev/null
+++ b/kde-unstable/kdeedu-parley/kdeedu-parley.install
@@ -0,0 +1,12 @@
+post_install() {
+ xdg-icon-resource forceupdate --theme hicolor &> /dev/null
+ update-desktop-database -q
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
diff --git a/kde-unstable/kdeedu-rocs/PKGBUILD b/kde-unstable/kdeedu-rocs/PKGBUILD
new file mode 100644
index 000000000..1ab660c03
--- /dev/null
+++ b/kde-unstable/kdeedu-rocs/PKGBUILD
@@ -0,0 +1,30 @@
+# $Id: PKGBUILD 124761 2011-05-24 08:01:51Z andrea $
+# Maintainer: Andrea Scarpino <andrea@archlinux.org>
+
+pkgname=kdeedu-rocs
+pkgver=4.6.80
+pkgrel=1
+pkgdesc="Rocs Graph Theory"
+url="http://kde.org/applications/education/rocs/"
+arch=('i686' 'x86_64')
+license=('GPL' 'LGPL' 'FDL')
+groups=('kde' 'kdeedu')
+depends=('kdebase-runtime' 'boost-libs')
+makedepends=('cmake' 'automoc4' 'boost')
+source=("http://download.kde.org/unstable/${pkgver}/src/rocs-${pkgver}.tar.bz2")
+sha1sums=('90ea18d54bc7dc6a87db72e34fb9131849300392')
+
+build() {
+ cd "${srcdir}"
+ mkdir build
+ cd build
+ cmake ../rocs-${pkgver} \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr
+ make
+}
+
+package() {
+ cd "${srcdir}"/build
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/kde-unstable/kdeedu-step/PKGBUILD b/kde-unstable/kdeedu-step/PKGBUILD
new file mode 100644
index 000000000..6b63198df
--- /dev/null
+++ b/kde-unstable/kdeedu-step/PKGBUILD
@@ -0,0 +1,31 @@
+# $Id: PKGBUILD 124761 2011-05-24 08:01:51Z andrea $
+# Maintainer: Andrea Scarpino <andrea@archlinux.org>
+
+pkgname=kdeedu-step
+pkgver=4.6.80
+pkgrel=1
+pkgdesc="Interactive Physical Simulator"
+url="http://kde.org/applications/education/step/"
+arch=('i686' 'x86_64')
+license=('GPL' 'LGPL' 'FDL')
+groups=('kde' 'kdeedu')
+depends=('kdebase-runtime' 'libqalculate' 'gsl' 'eigen')
+makedepends=('cmake' 'automoc4')
+install=${pkgname}.install
+source=("http://download.kde.org/unstable/${pkgver}/src/step-${pkgver}.tar.bz2")
+sha1sums=('a71d1ed2f92c9b881640b273adafa71240ca6e8a')
+
+build() {
+ cd "${srcdir}"
+ mkdir build
+ cd build
+ cmake ../step-${pkgver} \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr
+ make
+}
+
+package() {
+ cd "${srcdir}"/build
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/kde-unstable/kdeedu-step/kdeedu-step.install b/kde-unstable/kdeedu-step/kdeedu-step.install
new file mode 100644
index 000000000..e70c054ec
--- /dev/null
+++ b/kde-unstable/kdeedu-step/kdeedu-step.install
@@ -0,0 +1,11 @@
+post_install() {
+ xdg-icon-resource forceupdate --theme hicolor &> /dev/null
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
diff --git a/kde-unstable/kdegames/PKGBUILD b/kde-unstable/kdegames/PKGBUILD
new file mode 100644
index 000000000..bc3b1576a
--- /dev/null
+++ b/kde-unstable/kdegames/PKGBUILD
@@ -0,0 +1,514 @@
+# $Id: PKGBUILD 124786 2011-05-24 12:57:40Z andrea $
+# Maintainer: Andrea Scarpino <andrea@archlinux.org>
+# Contributor: Pierre Schmitz <pierre@archlinux.de>
+
+pkgbase=kdegames
+pkgname=('kdegames-bomber'
+ 'kdegames-bovo'
+ 'kdegames-granatier'
+ 'kdegames-kajongg'
+ 'kdegames-kapman'
+ 'kdegames-katomic'
+ 'kdegames-kbattleship'
+ 'kdegames-kblackbox'
+ 'kdegames-kblocks'
+ 'kdegames-kbounce'
+ 'kdegames-kbreakout'
+ 'kdegames-kdiamond'
+ 'kdegames-kfourinline'
+ 'kdegames-kgoldrunner'
+ 'kdegames-kigo'
+ 'kdegames-killbots'
+ 'kdegames-kiriki'
+ 'kdegames-kjumpingcube'
+ 'kdegames-klines'
+ 'kdegames-klickety'
+ 'kdegames-kmahjongg'
+ 'kdegames-kmines'
+ 'kdegames-knetwalk'
+ 'kdegames-kolf'
+ 'kdegames-kollision'
+ 'kdegames-konquest'
+ 'kdegames-kpatience'
+ 'kdegames-kreversi'
+ 'kdegames-kshisen'
+ 'kdegames-ksirk'
+ 'kdegames-kspaceduel'
+ 'kdegames-ksquares'
+ 'kdegames-ksudoku'
+ 'kdegames-ktron'
+ 'kdegames-ktuberling'
+ 'kdegames-kubrick'
+ 'kdegames-libkdegames'
+ 'kdegames-libkmahjongg'
+ 'kdegames-lskat'
+ 'kdegames-palapeli')
+pkgver=4.6.80
+pkgrel=1
+arch=('i686' 'x86_64')
+url='http://www.kde.org'
+license=('GPL' 'LGPL' 'FDL')
+groups=('kde' 'kdegames')
+makedepends=('pkgconfig' 'cmake' 'automoc4' 'ggz-client-libs' 'twisted'
+ 'kdebindings-python' 'openal')
+source=("http://download.kde.org/unstable/${pkgver}/src/${pkgbase}-${pkgver}.tar.bz2")
+sha1sums=('c9e21203e8f47e1748c309a4ff14c87953c43839')
+
+build() {
+ cd $srcdir
+ mkdir build
+ cd build
+ cmake ../${pkgbase}-${pkgver} \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_SKIP_RPATH=ON \
+ -DCMAKE_INSTALL_PREFIX=/usr
+ make
+}
+
+package_kdegames-bomber() {
+ pkgdesc='Arcade Bombing Game'
+ depends=('kdebase-runtime' 'kdegames-libkdegames')
+ url="http://kde.org/applications/games/bomber/"
+ install='kdegames.install'
+ cd $srcdir/build/bomber
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/bomber
+ make DESTDIR=$pkgdir install
+}
+
+package_kdegames-bovo() {
+ pkgdesc='Five-in-a-row Board Game'
+ depends=('kdebase-runtime' 'kdegames-libkdegames')
+ url="http://kde.org/applications/games/bovo/"
+ install='kdegames.install'
+ cd $srcdir/build/bovo
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/bovo
+ make DESTDIR=$pkgdir install
+}
+
+package_kdegames-granatier() {
+ pkgdesc='Granatier'
+ depends=('kdebase-runtime' 'kdegames-libkdegames' 'openal')
+ url="http://kde.org/applications/games/granatier/"
+ install='kdegames.install'
+ cd $srcdir/build/granatier
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/granatier
+ make DESTDIR=$pkgdir install
+}
+
+package_kdegames-kajongg() {
+ pkgdesc='The ancient Chinese board game for 4 players'
+ depends=('kdegames-libkdegames' 'kdegames-libkmahjongg' 'kdebindings-python' 'twisted')
+ install='kdegames.install'
+ cd $srcdir/build/kajongg
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/kajongg
+ make DESTDIR=$pkgdir install
+
+ # Use the python2 executable
+ find "${pkgdir}" -name '*.py' | xargs sed -i 's|#!/usr/bin/env python|#!/usr/bin/env python2|'
+}
+
+package_kdegames-kapman() {
+ pkgdesc='Eat pills escaping ghosts'
+ depends=('kdebase-runtime' 'kdegames-libkdegames')
+ url="http://kde.org/applications/games/kapman/"
+ install='kdegames.install'
+ cd $srcdir/build/kapman
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/kapman
+ make DESTDIR=$pkgdir install
+}
+
+package_kdegames-katomic() {
+ pkgdesc='Sokoban-like Logic Game'
+ depends=('kdebase-runtime' 'kdegames-libkdegames')
+ url="http://kde.org/applications/games/katomic/"
+ install='kdegames.install'
+ cd $srcdir/build/katomic
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/katomic
+ make DESTDIR=$pkgdir install
+}
+
+package_kdegames-kbattleship() {
+ pkgdesc='Battleship Game'
+ depends=('kdebase-runtime' 'kdegames-libkdegames' 'ggz-client-libs')
+ url="http://kde.org/applications/games/kbattleship/"
+ install='kdegames-kbattleship.install'
+ cd $srcdir/build/kbattleship
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/kbattleship
+ make DESTDIR=$pkgdir install
+ install -D -m644 $srcdir/${pkgbase}-${pkgver}/kbattleship/src/module.dsc \
+ $pkgdir/usr/share/ggz/kbattleship.dsc
+}
+
+package_kdegames-kblackbox() {
+ pkgdesc='Blackbox Logic Game'
+ depends=('kdebase-runtime' 'kdegames-libkdegames')
+ url="http://kde.org/applications/games/kblackbox/"
+ install='kdegames.install'
+ cd $srcdir/build/kblackbox
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/kblackbox
+ make DESTDIR=$pkgdir install
+}
+
+package_kdegames-kblocks() {
+ pkgdesc='Falling Blocks Game'
+ depends=('kdebase-runtime' 'kdegames-libkdegames')
+ url="http://kde.org/applications/games/kblocks/"
+ install='kdegames.install'
+ cd $srcdir/build/kblocks
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/kblocks
+ make DESTDIR=$pkgdir install
+}
+
+package_kdegames-kbounce() {
+ pkgdesc='Ball Bouncing Game'
+ depends=('kdebase-runtime' 'kdegames-libkdegames')
+ url="http://kde.org/applications/games/kbounce/"
+ install='kdegames.install'
+ cd $srcdir/build/kbounce
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/kbounce
+ make DESTDIR=$pkgdir install
+}
+
+package_kdegames-kbreakout() {
+ pkgdesc='Breakout-like Game'
+ depends=('kdebase-runtime' 'kdegames-libkdegames')
+ url="http://kde.org/applications/games/kbreakout/"
+ install='kdegames.install'
+ cd $srcdir/build/kbreakout
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/kbreakout
+ make DESTDIR=$pkgdir install
+}
+
+package_kdegames-kdiamond() {
+ pkgdesc='Three-in-a-row game'
+ depends=('kdebase-runtime' 'kdegames-libkdegames')
+ url="http://kde.org/applications/games/kdiamond/"
+ install='kdegames.install'
+ cd $srcdir/build/kdiamond
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/kdiamond
+ make DESTDIR=$pkgdir install
+}
+
+package_kdegames-kfourinline() {
+ pkgdesc='Four-in-a-row Board Game'
+ depends=('kdebase-runtime' 'kdegames-libkdegames')
+ url="http://kde.org/applications/games/kfourinline/"
+ install='kdegames-kfourinline.install'
+ cd $srcdir/build/kfourinline
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/kfourinline
+ make DESTDIR=$pkgdir install
+}
+
+package_kdegames-kgoldrunner() {
+ pkgdesc='A game of action and puzzle-solving'
+ depends=('kdebase-runtime' 'kdegames-libkdegames')
+ url="http://kde.org/applications/games/kgoldrunner/"
+ install='kdegames.install'
+ cd $srcdir/build/kgoldrunner
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/kgoldrunner
+ make DESTDIR=$pkgdir install
+}
+
+package_kdegames-kigo() {
+ pkgdesc='Go Board Game'
+ depends=('kdebase-runtime' 'kdegames-libkdegames' 'gnugo')
+ url="http://kde.org/applications/games/kigo/"
+ install='kdegames-kigo.install'
+ cd $srcdir/build/kigo
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/kigo
+ make DESTDIR=$pkgdir install
+}
+
+package_kdegames-killbots() {
+ pkgdesc='Killbots'
+ depends=('kdebase-runtime' 'kdegames-libkdegames')
+ url="http://kde.org/applications/games/killbots/"
+ install='kdegames.install'
+ cd $srcdir/build/killbots
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/killbots
+ make DESTDIR=$pkgdir install
+}
+
+package_kdegames-kiriki() {
+ pkgdesc='Yahtzee-like Dice Game'
+ depends=('kdebase-runtime' 'kdegames-libkdegames')
+ url="http://kde.org/applications/games/kiriki/"
+ install='kdegames.install'
+ cd $srcdir/build/kiriki
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/kiriki
+ make DESTDIR=$pkgdir install
+}
+
+package_kdegames-kjumpingcube() {
+ pkgdesc='Territory Capture Game'
+ depends=('kdebase-runtime' 'kdegames-libkdegames')
+ url="http://kde.org/applications/games/kjumpingcube/"
+ install='kdegames.install'
+ cd $srcdir/build/kjumpingcube
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/kjumpingcube
+ make DESTDIR=$pkgdir install
+}
+
+package_kdegames-klickety() {
+ pkgdesc='Board Game'
+ depends=('kdebase-runtime' 'kdegames-libkdegames')
+ replaces=('kdegames-ksame')
+ conflicts=('kdegames-ksame')
+ url="http://kde.org/applications/games/ksame/"
+ install='kdegames.install'
+ cd $srcdir/build/klickety
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/klickety
+ make DESTDIR=$pkgdir install
+}
+
+package_kdegames-klines() {
+ pkgdesc='Tactical Game'
+ depends=('kdebase-runtime' 'kdegames-libkdegames')
+ url="http://kde.org/applications/games/klines/"
+ install='kdegames.install'
+ cd $srcdir/build/klines
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/klines
+ make DESTDIR=$pkgdir install
+}
+
+package_kdegames-kmahjongg() {
+ pkgdesc='Mahjongg Solitaire'
+ depends=('kdebase-runtime' 'kdegames-libkdegames' 'kdegames-libkmahjongg')
+ url="http://kde.org/applications/games/kmahjongg/"
+ install='kdegames.install'
+ cd $srcdir/build/kmahjongg
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/kmahjongg
+ make DESTDIR=$pkgdir install
+}
+
+package_kdegames-kmines() {
+ pkgdesc='Minesweeper-like Game'
+ depends=('kdebase-runtime' 'kdegames-libkdegames')
+ url="http://kde.org/applications/games/kmines/"
+ install='kdegames.install'
+ cd $srcdir/build/kmines
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/kmines
+ make DESTDIR=$pkgdir install
+}
+
+package_kdegames-knetwalk() {
+ pkgdesc='Network Construction Game'
+ depends=('kdebase-runtime' 'kdegames-libkdegames')
+ url="http://kde.org/applications/games/knetwalk/"
+ install='kdegames.install'
+ cd $srcdir/build/knetwalk
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/knetwalk
+ make DESTDIR=$pkgdir install
+}
+
+package_kdegames-kolf() {
+ pkgdesc='Miniature Golf'
+ depends=('kdebase-runtime' 'kdegames-libkdegames')
+ url="http://kde.org/applications/games/kolf/"
+ install='kdegames-kolf.install'
+ cd $srcdir/build/kolf
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/kolf
+ make DESTDIR=$pkgdir install
+}
+
+package_kdegames-kollision() {
+ pkgdesc='A simple ball dodging game'
+ depends=('kdebase-runtime' 'kdegames-libkdegames')
+ url="http://kde.org/applications/games/kollision/"
+ install='kdegames.install'
+ cd $srcdir/build/kollision
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/kollision
+ make DESTDIR=$pkgdir install
+}
+
+package_kdegames-konquest() {
+ pkgdesc='Galactic Strategy Game'
+ depends=('kdebase-runtime' 'kdegames-libkdegames')
+ url="http://kde.org/applications/games/konquest/"
+ install='kdegames.install'
+ cd $srcdir/build/konquest
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/konquest
+ make DESTDIR=$pkgdir install
+}
+
+package_kdegames-kpatience() {
+ pkgdesc='Patience Card Game'
+ depends=('kdebase-runtime' 'kdegames-libkdegames')
+ url="http://kde.org/applications/games/kpatience/"
+ install='kdegames.install'
+ replaces=('kdegames-kpat')
+ cd $srcdir/build/kpat
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/kpat
+ make DESTDIR=$pkgdir install
+}
+
+package_kdegames-kreversi() {
+ pkgdesc='Reversi Board Game'
+ depends=('kdebase-runtime' 'kdegames-libkdegames' 'ggz-client-libs')
+ url="http://kde.org/applications/games/kreversi/"
+ install='kdegames-kreversi.install'
+ cd $srcdir/build/kreversi
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/kreversi
+ make DESTDIR=$pkgdir install
+ install -D -m644 $srcdir/${pkgbase}-${pkgver}/kreversi/module.dsc \
+ $pkgdir/usr/share/ggz/kreversi.dsc
+}
+
+package_kdegames-kshisen() {
+ pkgdesc='Shisen-Sho Mahjongg-like Tile Game'
+ depends=('kdebase-runtime' 'kdegames-libkdegames' 'kdegames-libkmahjongg')
+ url="http://kde.org/applications/games/kshisen/"
+ install='kdegames.install'
+ cd $srcdir/build/kshisen
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/kshisen
+ make DESTDIR=$pkgdir install
+}
+
+package_kdegames-ksirk() {
+ pkgdesc='World Domination Strategy Game'
+ depends=('kdebase-runtime' 'kdegames-libkdegames')
+ url="http://kde.org/applications/games/ksirk/"
+ install='kdegames.install'
+ cd $srcdir/build/ksirk
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/ksirk
+ make DESTDIR=$pkgdir install
+}
+
+package_kdegames-kspaceduel() {
+ pkgdesc='Space Arcade Game'
+ depends=('kdebase-runtime' 'kdegames-libkdegames')
+ url="http://kde.org/applications/games/kspaceduel/"
+ install='kdegames-kspaceduel.install'
+ cd $srcdir/build/kspaceduel
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/kspaceduel
+ make DESTDIR=$pkgdir install
+}
+
+package_kdegames-ksquares() {
+ pkgdesc='Connect the dots to create squares'
+ depends=('kdebase-runtime' 'kdegames-libkdegames' 'ggz-client-libs')
+ url="http://kde.org/applications/games/ksquares/"
+ install='kdegames-ksquares.install'
+ cd $srcdir/build/ksquares
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/ksquares
+ make DESTDIR=$pkgdir install
+ install -D -m644 $srcdir/${pkgbase}-${pkgver}/ksquares/src/module.dsc \
+ $pkgdir/usr/share/ggz/ksquares.dsc
+}
+
+package_kdegames-ksudoku() {
+ pkgdesc='KSudoku, Sudoku game & more for KDE'
+ depends=('kdebase-runtime' 'kdegames-libkdegames')
+ url="http://kde.org/applications/games/ksudoku/"
+ install='kdegames.install'
+ cd $srcdir/build/ksudoku
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/ksudoku
+ make DESTDIR=$pkgdir install
+}
+
+package_kdegames-ktron() {
+ pkgdesc='Tron-like Game'
+ depends=('kdebase-runtime' 'kdegames-libkdegames')
+ url="http://kde.org/applications/games/ktron/"
+ install='kdegames.install'
+ cd $srcdir/build/ktron
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/ktron
+ make DESTDIR=$pkgdir install
+}
+
+package_kdegames-ktuberling() {
+ pkgdesc='Picture Game for Children'
+ depends=('kdebase-runtime' 'kdegames-libkdegames')
+ url="http://kde.org/applications/games/ktuberling/"
+ install='kdegames-ktuberling.install'
+ cd $srcdir/build/ktuberling
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/ktuberling
+ make DESTDIR=$pkgdir install
+}
+
+package_kdegames-kubrick() {
+ pkgdesc='A 3-D game based on Rubik´s Cube'
+ depends=('kdebase-runtime' 'kdegames-libkdegames')
+ url="http://kde.org/applications/games/kubrick/"
+ install='kdegames.install'
+ cd $srcdir/build/kubrick
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/kubrick
+ make DESTDIR=$pkgdir install
+}
+
+package_kdegames-libkdegames() {
+ pkgdesc='KDE game library'
+ groups=()
+ depends=('kdelibs')
+ cd $srcdir/build/libkdegames
+ make DESTDIR=$pkgdir install
+ for i in $srcdir/${pkgbase}-${pkgver}/cmake/modules/*.cmake; do
+ install -D -m644 $i $pkgdir/usr/share/apps/cmake/modules/$(basename $i)
+ done
+}
+
+package_kdegames-libkmahjongg() {
+ pkgdesc='Library used for loading and rendering of Mahjongg tilesets'
+ groups=()
+ depends=('kdelibs')
+ cd $srcdir/build/libkmahjongg
+ make DESTDIR=$pkgdir install
+}
+
+package_kdegames-lskat() {
+ pkgdesc='Card Game'
+ depends=('kdebase-runtime' 'kdegames-libkdegames')
+ url="http://kde.org/applications/games/lskat/"
+ install='kdegames-lskat.install'
+ cd $srcdir/build/lskat
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/lskat
+ make DESTDIR=$pkgdir install
+}
+
+package_kdegames-palapeli() {
+ pkgdesc='Jigsaw puzzle game'
+ depends=('kdebase-runtime' 'kdegames-libkdegames')
+ url="http://kde.org/applications/games/palapeli/"
+ install='kdegames-palapeli.install'
+ cd $srcdir/build/palapeli
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/palapeli
+ make DESTDIR=$pkgdir install
+}
diff --git a/kde-unstable/kdegames/kdegames-kbattleship.install b/kde-unstable/kdegames/kdegames-kbattleship.install
new file mode 100644
index 000000000..ac4516ed0
--- /dev/null
+++ b/kde-unstable/kdegames/kdegames-kbattleship.install
@@ -0,0 +1,24 @@
+post_install() {
+ xdg-icon-resource forceupdate --theme hicolor &> /dev/null
+ update-desktop-database -q
+ ggz-config -i -f -m usr/share/ggz/kbattleship.dsc >& /dev/null
+}
+
+pre_remove() {
+ if [ -f usr/share/ggz/kbattleship.dsc ]; then
+ ggz-config -r -m usr/share/ggz/kbattleship.dsc >& /dev/null
+ fi
+}
+
+pre_upgrade() {
+ pre_remove
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ xdg-icon-resource forceupdate --theme hicolor &> /dev/null
+ update-desktop-database -q
+}
diff --git a/kde-unstable/kdegames/kdegames-kfourinline.install b/kde-unstable/kdegames/kdegames-kfourinline.install
new file mode 100644
index 000000000..9b20edb30
--- /dev/null
+++ b/kde-unstable/kdegames/kdegames-kfourinline.install
@@ -0,0 +1,12 @@
+post_install() {
+ xdg-icon-resource forceupdate --theme hicolor &> /dev/null
+ update-desktop-database -q
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
diff --git a/kde-unstable/kdegames/kdegames-kigo.install b/kde-unstable/kdegames/kdegames-kigo.install
new file mode 100644
index 000000000..9b20edb30
--- /dev/null
+++ b/kde-unstable/kdegames/kdegames-kigo.install
@@ -0,0 +1,12 @@
+post_install() {
+ xdg-icon-resource forceupdate --theme hicolor &> /dev/null
+ update-desktop-database -q
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
diff --git a/kde-unstable/kdegames/kdegames-kolf.install b/kde-unstable/kdegames/kdegames-kolf.install
new file mode 100644
index 000000000..9b20edb30
--- /dev/null
+++ b/kde-unstable/kdegames/kdegames-kolf.install
@@ -0,0 +1,12 @@
+post_install() {
+ xdg-icon-resource forceupdate --theme hicolor &> /dev/null
+ update-desktop-database -q
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
diff --git a/kde-unstable/kdegames/kdegames-kreversi.install b/kde-unstable/kdegames/kdegames-kreversi.install
new file mode 100644
index 000000000..4623e6e49
--- /dev/null
+++ b/kde-unstable/kdegames/kdegames-kreversi.install
@@ -0,0 +1,22 @@
+post_install() {
+ xdg-icon-resource forceupdate --theme hicolor &> /dev/null
+ ggz-config -i -f -m usr/share/ggz/kreversi.dsc >& /dev/null
+}
+
+pre_remove() {
+ if [ -f usr/share/ggz/kreversi.dsc ]; then
+ ggz-config -r -m usr/share/ggz/kreversi.dsc >& /dev/null
+ fi
+}
+
+pre_upgrade() {
+ pre_remove
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ xdg-icon-resource forceupdate --theme hicolor &> /dev/null
+}
diff --git a/kde-unstable/kdegames/kdegames-kspaceduel.install b/kde-unstable/kdegames/kdegames-kspaceduel.install
new file mode 100644
index 000000000..9b20edb30
--- /dev/null
+++ b/kde-unstable/kdegames/kdegames-kspaceduel.install
@@ -0,0 +1,12 @@
+post_install() {
+ xdg-icon-resource forceupdate --theme hicolor &> /dev/null
+ update-desktop-database -q
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
diff --git a/kde-unstable/kdegames/kdegames-ksquares.install b/kde-unstable/kdegames/kdegames-ksquares.install
new file mode 100644
index 000000000..5a619897d
--- /dev/null
+++ b/kde-unstable/kdegames/kdegames-ksquares.install
@@ -0,0 +1,22 @@
+post_install() {
+ xdg-icon-resource forceupdate --theme hicolor &> /dev/null
+ ggz-config -i -f -m usr/share/ggz/ksquares.dsc >& /dev/null
+}
+
+pre_remove() {
+ if [ -f usr/share/ggz/ksquares.dsc ]; then
+ ggz-config -r -m usr/share/ggz/ksquares.dsc >& /dev/null
+ fi
+}
+
+pre_upgrade() {
+ pre_remove
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ xdg-icon-resource forceupdate --theme hicolor &> /dev/null
+}
diff --git a/kde-unstable/kdegames/kdegames-ktuberling.install b/kde-unstable/kdegames/kdegames-ktuberling.install
new file mode 100644
index 000000000..9b20edb30
--- /dev/null
+++ b/kde-unstable/kdegames/kdegames-ktuberling.install
@@ -0,0 +1,12 @@
+post_install() {
+ xdg-icon-resource forceupdate --theme hicolor &> /dev/null
+ update-desktop-database -q
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
diff --git a/kde-unstable/kdegames/kdegames-lskat.install b/kde-unstable/kdegames/kdegames-lskat.install
new file mode 100644
index 000000000..9b20edb30
--- /dev/null
+++ b/kde-unstable/kdegames/kdegames-lskat.install
@@ -0,0 +1,12 @@
+post_install() {
+ xdg-icon-resource forceupdate --theme hicolor &> /dev/null
+ update-desktop-database -q
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
diff --git a/kde-unstable/kdegames/kdegames-palapeli.install b/kde-unstable/kdegames/kdegames-palapeli.install
new file mode 100644
index 000000000..c77e68041
--- /dev/null
+++ b/kde-unstable/kdegames/kdegames-palapeli.install
@@ -0,0 +1,13 @@
+post_install() {
+ xdg-icon-resource forceupdate --theme hicolor &> /dev/null
+ update-mime-database usr/share/mime &> /dev/null
+ update-desktop-database -q
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
diff --git a/kde-unstable/kdegames/kdegames.install b/kde-unstable/kdegames/kdegames.install
new file mode 100644
index 000000000..e70c054ec
--- /dev/null
+++ b/kde-unstable/kdegames/kdegames.install
@@ -0,0 +1,11 @@
+post_install() {
+ xdg-icon-resource forceupdate --theme hicolor &> /dev/null
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
diff --git a/kde-unstable/kdegraphics-gwenview/PKGBUILD b/kde-unstable/kdegraphics-gwenview/PKGBUILD
new file mode 100644
index 000000000..c8528477b
--- /dev/null
+++ b/kde-unstable/kdegraphics-gwenview/PKGBUILD
@@ -0,0 +1,31 @@
+# $Id: PKGBUILD 124674 2011-05-23 20:43:19Z andrea $
+# Maintainer: Andrea Scarpino <andrea@archlinux.org>
+
+pkgname=kdegraphics-gwenview
+pkgver=4.6.80
+pkgrel=1
+pkgdesc="A fast and easy to use image viewer for KDE"
+url="http://kde.org/applications/graphics/gwenview/"
+arch=('i686' 'x86_64')
+license=('GPL' 'LGPL' 'FDL')
+groups=('kde' 'kdegraphics')
+depends=('kdebase-lib' 'libkipi')
+makedepends=('cmake' 'automoc4')
+optdepends=('kipi-plugins')
+source=("http://download.kde.org/unstable/${pkgver}/src/gwenview-${pkgver}.tar.bz2")
+sha1sums=('41b93bdcab6ba169be4ed3fcfb481c6ae1161bd6')
+
+build() {
+ cd "${srcdir}"
+ mkdir build
+ cd build
+ cmake ../gwenview-${pkgver} \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr
+ make
+}
+
+package() {
+ cd "${srcdir}"/build
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/kde-unstable/kdegraphics-gwenview/kdegraphics-gwenview.install b/kde-unstable/kdegraphics-gwenview/kdegraphics-gwenview.install
new file mode 100644
index 000000000..81ce5c4b0
--- /dev/null
+++ b/kde-unstable/kdegraphics-gwenview/kdegraphics-gwenview.install
@@ -0,0 +1,12 @@
+post_install() {
+ xdg-icon-resource forceupdate --theme hicolor &> /dev/null
+ update-desktop-database -q
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
diff --git a/kde-unstable/kdegraphics-kamera/PKGBUILD b/kde-unstable/kdegraphics-kamera/PKGBUILD
new file mode 100644
index 000000000..17b0a9b3f
--- /dev/null
+++ b/kde-unstable/kdegraphics-kamera/PKGBUILD
@@ -0,0 +1,30 @@
+# $Id: PKGBUILD 124674 2011-05-23 20:43:19Z andrea $
+# Maintainer: Andrea Scarpino <andrea@archlinux.org>
+
+pkgname=kdegraphics-kamera
+pkgver=4.6.80
+pkgrel=1
+pkgdesc="Configure Kamera"
+url="http://kde.org/applications/graphics/kamera/"
+arch=('i686' 'x86_64')
+license=('GPL' 'LGPL' 'FDL')
+groups=('kde' 'kdegraphics')
+depends=('kdebase-runtime' 'gphoto2')
+makedepends=('cmake' 'automoc4')
+source=("http://download.kde.org/unstable/${pkgver}/src/kamera-${pkgver}.tar.bz2")
+sha1sums=('cba0e4ca19fe62a9cbfe7b2559e5364c16944901')
+
+build() {
+ cd "${srcdir}"
+ mkdir build
+ cd build
+ cmake ../kamera-${pkgver} \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr
+ make
+}
+
+package() {
+ cd "${srcdir}"/build
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/kde-unstable/kdegraphics-kcolorchooser/PKGBUILD b/kde-unstable/kdegraphics-kcolorchooser/PKGBUILD
new file mode 100644
index 000000000..ebad9e424
--- /dev/null
+++ b/kde-unstable/kdegraphics-kcolorchooser/PKGBUILD
@@ -0,0 +1,31 @@
+# $Id: PKGBUILD 124674 2011-05-23 20:43:19Z andrea $
+# Maintainer: Andrea Scarpino <andrea@archlinux.org>
+
+pkgname=kdegraphics-kcolorchooser
+pkgver=4.6.80
+pkgrel=1
+pkgdesc="Color Chooser"
+url="http://kde.org/applications/graphics/kcolorchooser/"
+arch=('i686' 'x86_64')
+license=('GPL' 'LGPL' 'FDL')
+groups=('kde' 'kdegraphics')
+depends=('kdebase-runtime')
+makedepends=('cmake' 'automoc4')
+install=${pkgname}.install
+source=("http://download.kde.org/unstable/${pkgver}/src/kcolorchooser-${pkgver}.tar.bz2")
+sha1sums=('99aad5ebb4b1d5d99426e8a33c2f15717cc4087e')
+
+build() {
+ cd "${srcdir}"
+ mkdir build
+ cd build
+ cmake ../kcolorchooser-${pkgver} \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr
+ make
+}
+
+package() {
+ cd "${srcdir}"/build
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/kde-unstable/kdegraphics-kcolorchooser/kdegraphics-kcolorchooser.install b/kde-unstable/kdegraphics-kcolorchooser/kdegraphics-kcolorchooser.install
new file mode 100644
index 000000000..e70c054ec
--- /dev/null
+++ b/kde-unstable/kdegraphics-kcolorchooser/kdegraphics-kcolorchooser.install
@@ -0,0 +1,11 @@
+post_install() {
+ xdg-icon-resource forceupdate --theme hicolor &> /dev/null
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
diff --git a/kde-unstable/kdegraphics-kgamma/PKGBUILD b/kde-unstable/kdegraphics-kgamma/PKGBUILD
new file mode 100644
index 000000000..18926be42
--- /dev/null
+++ b/kde-unstable/kdegraphics-kgamma/PKGBUILD
@@ -0,0 +1,33 @@
+# $Id: PKGBUILD 124788 2011-05-24 12:59:42Z andrea $
+# Maintainer: Andrea Scarpino <andrea@archlinux.org>
+
+pkgname=kdegraphics-kgamma
+pkgver=4.6.80
+pkgrel=1
+pkgdesc="A monitor calibration tool"
+url="http://kde.org/applications/graphics/kgamma/"
+arch=('i686' 'x86_64')
+license=('GPL' 'LGPL' 'FDL')
+groups=('kde' 'kdegraphics')
+# note on libxxf86vm:
+# not detected by namcap because libgl depends on it
+# but nvidia providing libgl does not depend on libxxf86vm
+depends=('kdebase-runtime' 'libxxf86vm')
+makedepends=('cmake' 'automoc4')
+source=("http://download.kde.org/unstable/${pkgver}/src/kgamma-${pkgver}.tar.bz2")
+sha1sums=('aac4e43df0095e0511bb27cc27a23b10847eb075')
+
+build() {
+ cd "${srcdir}"
+ mkdir build
+ cd build
+ cmake ../kgamma-${pkgver} \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr
+ make
+}
+
+package() {
+ cd "${srcdir}"/build
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/kde-unstable/kdegraphics-kolourpaint/PKGBUILD b/kde-unstable/kdegraphics-kolourpaint/PKGBUILD
new file mode 100644
index 000000000..c68c46c2d
--- /dev/null
+++ b/kde-unstable/kdegraphics-kolourpaint/PKGBUILD
@@ -0,0 +1,31 @@
+# $Id: PKGBUILD 124674 2011-05-23 20:43:19Z andrea $
+# Maintainer: Andrea Scarpino <andrea@archlinux.org>
+
+pkgname=kdegraphics-kolourpaint
+pkgver=4.6.80
+pkgrel=1
+pkgdesc="Paint Program"
+url="http://kde.org/applications/graphics/kolourpaint/"
+arch=('i686' 'x86_64')
+license=('GPL' 'LGPL' 'FDL')
+groups=('kde' 'kdegraphics')
+depends=('kdebase-runtime' 'qimageblitz')
+makedepends=('cmake' 'automoc4')
+install=${pkgname}.install
+source=("http://download.kde.org/unstable/${pkgver}/src/kolourpaint-${pkgver}.tar.bz2")
+sha1sums=('c79fc3a31d61623a02e7c89ede19cbe7e49a8518')
+
+build() {
+ cd "${srcdir}"
+ mkdir build
+ cd build
+ cmake ../kolourpaint-${pkgver} \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr
+ make
+}
+
+package() {
+ cd "${srcdir}"/build
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/kde-unstable/kdegraphics-kolourpaint/kdegraphics-kolourpaint.install b/kde-unstable/kdegraphics-kolourpaint/kdegraphics-kolourpaint.install
new file mode 100644
index 000000000..81ce5c4b0
--- /dev/null
+++ b/kde-unstable/kdegraphics-kolourpaint/kdegraphics-kolourpaint.install
@@ -0,0 +1,12 @@
+post_install() {
+ xdg-icon-resource forceupdate --theme hicolor &> /dev/null
+ update-desktop-database -q
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
diff --git a/kde-unstable/kdegraphics-kruler/PKGBUILD b/kde-unstable/kdegraphics-kruler/PKGBUILD
new file mode 100644
index 000000000..663888d54
--- /dev/null
+++ b/kde-unstable/kdegraphics-kruler/PKGBUILD
@@ -0,0 +1,31 @@
+# $Id: PKGBUILD 124674 2011-05-23 20:43:19Z andrea $
+# Maintainer: Andrea Scarpino <andrea@archlinux.org>
+
+pkgname=kdegraphics-kruler
+pkgver=4.6.80
+pkgrel=1
+pkgdesc="Screen Ruler"
+url="http://kde.org/applications/graphics/kruler/"
+arch=('i686' 'x86_64')
+license=('GPL' 'LGPL' 'FDL')
+groups=('kde' 'kdegraphics')
+depends=('kdebase-runtime')
+makedepends=('cmake' 'automoc4')
+install=${pkgname}.install
+source=("http://download.kde.org/unstable/${pkgver}/src/kruler-${pkgver}.tar.bz2")
+sha1sums=('b43fee1954baa7b84866a1cd5f15cbcff54d5e3d')
+
+build() {
+ cd "${srcdir}"
+ mkdir build
+ cd build
+ cmake ../kruler-${pkgver} \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr
+ make
+}
+
+package() {
+ cd "${srcdir}"/build
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/kde-unstable/kdegraphics-kruler/kdegraphics-kruler.install b/kde-unstable/kdegraphics-kruler/kdegraphics-kruler.install
new file mode 100644
index 000000000..81ce5c4b0
--- /dev/null
+++ b/kde-unstable/kdegraphics-kruler/kdegraphics-kruler.install
@@ -0,0 +1,12 @@
+post_install() {
+ xdg-icon-resource forceupdate --theme hicolor &> /dev/null
+ update-desktop-database -q
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
diff --git a/kde-unstable/kdegraphics-ksaneplugin/PKGBUILD b/kde-unstable/kdegraphics-ksaneplugin/PKGBUILD
new file mode 100644
index 000000000..4dde21e03
--- /dev/null
+++ b/kde-unstable/kdegraphics-ksaneplugin/PKGBUILD
@@ -0,0 +1,30 @@
+# $Id: PKGBUILD 124799 2011-05-24 13:21:06Z andrea $
+# Maintainer: Andrea Scarpino <andrea@archlinux.org>
+
+pkgname=kdegraphics-ksaneplugin
+pkgver=4.6.80
+pkgrel=1
+pkgdesc="A scan plugin that implements the scanning"
+url="http://kde.org/"
+arch=('i686' 'x86_64')
+license=('GPL' 'LGPL' 'FDL')
+depends=('libksane')
+makedepends=('cmake' 'automoc4')
+conflicts=('kdegraphics-libs')
+source=("http://download.kde.org/unstable/${pkgver}/src/ksaneplugin-${pkgver}.tar.bz2")
+sha1sums=('3caa70899ed3797c9739409d311779f39fa9eda7')
+
+build() {
+ cd "${srcdir}"
+ mkdir build
+ cd build
+ cmake ../ksaneplugin-${pkgver} \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr
+ make
+}
+
+package() {
+ cd "${srcdir}"/build
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/kde-unstable/kdegraphics-ksnapshot/PKGBUILD b/kde-unstable/kdegraphics-ksnapshot/PKGBUILD
new file mode 100644
index 000000000..de10d1e5e
--- /dev/null
+++ b/kde-unstable/kdegraphics-ksnapshot/PKGBUILD
@@ -0,0 +1,32 @@
+# $Id: PKGBUILD 124674 2011-05-23 20:43:19Z andrea $
+# Maintainer: Andrea Scarpino <andrea@archlinux.org>
+
+pkgname=kdegraphics-ksnapshot
+pkgver=4.6.80
+pkgrel=1
+pkgdesc="Screen Capture Program"
+url="http://kde.org/applications/graphics/ksnapshot/"
+arch=('i686' 'x86_64')
+license=('GPL' 'LGPL' 'FDL')
+groups=('kde' 'kdegraphics')
+depends=('kdelibs' 'libkipi')
+makedepends=('cmake' 'automoc4')
+optdepends=('kipi-plugins')
+install=${pkgname}.install
+source=("http://download.kde.org/unstable/${pkgver}/src/ksnapshot-${pkgver}.tar.bz2")
+sha1sums=('684be8b03920e4a92625337ff18a5b368482dd08')
+
+build() {
+ cd "${srcdir}"
+ mkdir build
+ cd build
+ cmake ../ksnapshot-${pkgver} \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr
+ make
+}
+
+package() {
+ cd "${srcdir}"/build
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/kde-unstable/kdegraphics-ksnapshot/kdegraphics-ksnapshot.install b/kde-unstable/kdegraphics-ksnapshot/kdegraphics-ksnapshot.install
new file mode 100644
index 000000000..81ce5c4b0
--- /dev/null
+++ b/kde-unstable/kdegraphics-ksnapshot/kdegraphics-ksnapshot.install
@@ -0,0 +1,12 @@
+post_install() {
+ xdg-icon-resource forceupdate --theme hicolor &> /dev/null
+ update-desktop-database -q
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
diff --git a/kde-unstable/kdegraphics-strigi-analyzer/PKGBUILD b/kde-unstable/kdegraphics-strigi-analyzer/PKGBUILD
new file mode 100644
index 000000000..4c027b673
--- /dev/null
+++ b/kde-unstable/kdegraphics-strigi-analyzer/PKGBUILD
@@ -0,0 +1,30 @@
+# $Id: PKGBUILD 124799 2011-05-24 13:21:06Z andrea $
+# Maintainer: Andrea Scarpino <andrea@archlinux.org>
+
+pkgname=kdegraphics-strigi-analyzer
+pkgver=4.6.80
+pkgrel=1
+pkgdesc="Strigi analyzers for various graphics file formats"
+url="http://kde.org/"
+arch=('i686' 'x86_64')
+license=('GPL' 'LGPL' 'FDL')
+depends=('kdelibs')
+makedepends=('cmake' 'automoc4')
+conflicts=('kdegraphics-libs')
+source=("http://download.kde.org/unstable/${pkgver}/src/${pkgname}-${pkgver}.tar.bz2")
+sha1sums=('bc4c901bc4bc7080c91ed739d2480294d2fc5033')
+
+build() {
+ cd "${srcdir}"
+ mkdir build
+ cd build
+ cmake ../${pkgname}-${pkgver} \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr
+ make
+}
+
+package() {
+ cd "${srcdir}"/build
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/kde-unstable/kdegraphics-svgpart/PKGBUILD b/kde-unstable/kdegraphics-svgpart/PKGBUILD
new file mode 100644
index 000000000..ce748bb92
--- /dev/null
+++ b/kde-unstable/kdegraphics-svgpart/PKGBUILD
@@ -0,0 +1,30 @@
+# $Id: PKGBUILD 124799 2011-05-24 13:21:06Z andrea $
+# Maintainer: Andrea Scarpino <andrea@archlinux.org>
+
+pkgname=kdegraphics-svgpart
+pkgver=4.6.80
+pkgrel=1
+pkgdesc="A KPart for viewving SVGs"
+url="http://kde.org/"
+arch=('i686' 'x86_64')
+license=('GPL' 'LGPL' 'FDL')
+depends=('kdelibs')
+makedepends=('cmake' 'automoc4')
+conflicts=('kdegraphics-libs')
+source=("http://download.kde.org/unstable/${pkgver}/src/svgpart-${pkgver}.tar.bz2")
+sha1sums=('300fc6a062ea34e6131097ae9a59e8279f3c1193')
+
+build() {
+ cd "${srcdir}"
+ mkdir build
+ cd build
+ cmake ../svgpart-${pkgver} \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr
+ make
+}
+
+package() {
+ cd "${srcdir}"/build
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/kde-unstable/kdegraphics-thumbnailers/PKGBUILD b/kde-unstable/kdegraphics-thumbnailers/PKGBUILD
new file mode 100644
index 000000000..7a3e5b1a1
--- /dev/null
+++ b/kde-unstable/kdegraphics-thumbnailers/PKGBUILD
@@ -0,0 +1,30 @@
+# $Id: PKGBUILD 124799 2011-05-24 13:21:06Z andrea $
+# Maintainer: Andrea Scarpino <andrea@archlinux.org>
+
+pkgname=kdegraphics-thumbnailers
+pkgver=4.6.80
+pkgrel=1
+pkgdesc="Thumbnailers for various graphics file formats"
+url="http://kde.org/"
+arch=('i686' 'x86_64')
+license=('GPL' 'LGPL' 'FDL')
+depends=('libkexiv2' 'libkdcraw')
+makedepends=('cmake' 'automoc4')
+conflicts=('kdegraphics-libs')
+source=("http://download.kde.org/unstable/${pkgver}/src/${pkgname}-${pkgver}.tar.bz2")
+sha1sums=('d350cb85ad8520be00f6ee1f05a393d777e0f021')
+
+build() {
+ cd "${srcdir}"
+ mkdir build
+ cd build
+ cmake ../${pkgname}-${pkgver} \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr
+ make
+}
+
+package() {
+ cd "${srcdir}"/build
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/kde-unstable/kdegraphics/PKGBUILD b/kde-unstable/kdegraphics/PKGBUILD
new file mode 100644
index 000000000..9aaa3cacf
--- /dev/null
+++ b/kde-unstable/kdegraphics/PKGBUILD
@@ -0,0 +1,39 @@
+# $Id: PKGBUILD 124827 2011-05-24 16:19:00Z andrea $
+# Maintainer: Andrea Scarpino <andrea@archlinux.org>
+# Contributor: Pierre Schmitz <pierre@archlinux.de>
+
+pkgbase=kdegraphics
+pkgname=('kdegraphics-okular')
+pkgver=4.6.80
+pkgrel=1
+arch=('i686' 'x86_64')
+url='http://www.kde.org'
+license=('GPL' 'LGPL' 'FDL')
+groups=('kde' 'kdegraphics')
+makedepends=('kdelibs' 'pkgconfig' 'cmake' 'automoc4' 'qimageblitz' 'ebook-tools'
+ 'poppler-qt' 'libspectre' 'chmlib' 'djvulibre')
+source=("http://download.kde.org/stable/${pkgver}/src/${pkgbase}-${pkgver}.tar.bz2")
+sha1sums=('69f191663db147cf481edd9f528fcae50c1dc2c3')
+
+build() {
+ cd ${srcdir}
+ mkdir build
+ cd build
+ cmake ../${pkgbase}-${pkgver} \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_SKIP_RPATH=ON \
+ -DCMAKE_INSTALL_PREFIX=/usr
+ make
+}
+
+package_kdegraphics-okular() {
+ pkgdesc='Document Viewer'
+ depends=('kdebase-runtime' 'qimageblitz' 'poppler-qt' 'chmlib' 'djvulibre'
+ 'ebook-tools' 'libspectre')
+ url="http://kde.org/applications/graphics/okular/"
+ install='kdegraphics-okular.install'
+ cd $srcdir/build/okular
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/okular
+ make DESTDIR=$pkgdir install
+}
diff --git a/kde-unstable/kdegraphics/kdegraphics-okular.install b/kde-unstable/kdegraphics/kdegraphics-okular.install
new file mode 100644
index 000000000..81ce5c4b0
--- /dev/null
+++ b/kde-unstable/kdegraphics/kdegraphics-okular.install
@@ -0,0 +1,12 @@
+post_install() {
+ xdg-icon-resource forceupdate --theme hicolor &> /dev/null
+ update-desktop-database -q
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
diff --git a/kde-unstable/kdelibs/PKGBUILD b/kde-unstable/kdelibs/PKGBUILD
new file mode 100644
index 000000000..8bfff6584
--- /dev/null
+++ b/kde-unstable/kdelibs/PKGBUILD
@@ -0,0 +1,63 @@
+# $Id: PKGBUILD 124924 2011-05-25 08:50:46Z andrea $
+# Maintainer: Andrea Scarpino <andrea@archlinux.org
+# Contributor: Pierre Schmitz <pierre@archlinux.de>
+
+pkgname=kdelibs
+pkgver=4.6.80
+pkgrel=1
+pkgdesc="KDE Core Libraries"
+arch=('i686' 'x86_64')
+url='http://www.kde.org'
+license=('GPL' 'LGPL' 'FDL')
+depends=('strigi' 'attica' 'libxss' 'xz' 'openssl' 'soprano' 'krb5'
+ 'shared-desktop-ontologies' 'qca' 'libdbusmenu-qt' 'polkit-qt' 'grantlee'
+ 'shared-mime-info' 'enchant' 'giflib' 'jasper' 'openexr' 'xdg-utils'
+ 'phonon' 'hicolor-icon-theme' 'upower' 'udisks' 'libxcursor'
+ 'docbook-xsl')
+makedepends=('pkgconfig' 'cmake' 'automoc4' 'intltool' 'avahi' 'libgl'
+ 'hspell')
+replaces=('kdelibs-experimental')
+install='kdelibs.install'
+source=("http://download.kde.org/unstable/${pkgver}/src/${pkgname}-${pkgver}.tar.bz2"
+ 'kde-applications-menu.patch' 'archlinux-menu.patch'
+ 'kcalendarsystem-fixed.patch')
+sha1sums=('313e051b08762ec68d7d7aaceb5471ede2bf66ac'
+ '86ee8c8660f19de8141ac99cd6943964d97a1ed7'
+ '63a850ab4196b9d06934f2b4a13acd9f7739bc67'
+ '13cbb58347dc7103684bb002b8f636fc0fa9e738')
+
+build() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+
+ # avoid file conflict with gnome-menu
+ patch -p1 -i $srcdir/kde-applications-menu.patch
+ # add Archlinux menu entry
+ patch -p1 -i $srcdir/archlinux-menu.patch
+
+ # Already fixed upstream
+ patch -p1 -i "${srcdir}"/kcalendarsystem-fixed.patch
+
+ cd ${srcdir}
+ mkdir build
+ cd build
+ cmake ../${pkgname}-${pkgver} \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_SKIP_RPATH=ON \
+ -DKDE_DISTRIBUTION_TEXT='Arch Linux' \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DSYSCONF_INSTALL_DIR=/etc \
+ -DHTML_INSTALL_DIR=/usr/share/doc/kde/html \
+ -DKDE_DEFAULT_HOME='.kde4' \
+ -DWITH_FAM=OFF
+ make
+}
+
+package() {
+ cd $srcdir/build
+ make DESTDIR=$pkgdir install
+
+ # cert bundle seems to be hardcoded
+ # link it to the one from ca-certificates
+ rm -f $pkgdir/usr/share/apps/kssl/ca-bundle.crt
+ ln -sf /etc/ssl/certs/ca-certificates.crt $pkgdir/usr/share/apps/kssl/ca-bundle.crt
+}
diff --git a/kde-unstable/kdelibs/archlinux-menu.patch b/kde-unstable/kdelibs/archlinux-menu.patch
new file mode 100644
index 000000000..546784fa2
--- /dev/null
+++ b/kde-unstable/kdelibs/archlinux-menu.patch
@@ -0,0 +1,22 @@
+--- kdelibs-4.3.98/kded/applications.menu 2010-01-31 19:28:11.000000000 +0000
++++ kdelibs-4.3.98/kded/applications.menu 2010-01-31 22:25:53.556043077 +0000
+@@ -16,11 +16,19 @@
+ </DefaultLayout>
+ <Layout>
+ <Merge type="menus"/>
++ <Menuname>Arch Linux</Menuname>
+ <Menuname>Applications</Menuname>
+ <Merge type="files"/>
+ </Layout>
+
+ <Menu>
++ <Name>Arch Linux</Name>
++ <Directory>Archlinux.directory</Directory>
++ <Include>
++ <Category>Archlinux</Category>
++ </Include>
++ </Menu>
++ <Menu>
+ <Name>Applications</Name>
+ <Directory>kde-unknown.directory</Directory>
+ <OnlyUnallocated/>
diff --git a/kde-unstable/kdelibs/kcalendarsystem-fixed.patch b/kde-unstable/kdelibs/kcalendarsystem-fixed.patch
new file mode 100644
index 000000000..d97a9b904
--- /dev/null
+++ b/kde-unstable/kdelibs/kcalendarsystem-fixed.patch
@@ -0,0 +1,18073 @@
+diff --git a/kdecore/date/kcalendarera.cpp b/kdecore/date/kcalendarera.cpp
+index d56c265..0a21e37 100644
+--- a/kdecore/date/kcalendarera.cpp
++++ b/kdecore/date/kcalendarera.cpp
+@@ -71,21 +71,21 @@ int KCalendarEra::direction() const
+ return m_direction;
+ }
+
+-bool KCalendarEra::isInEra( const QDate &date ) const
++bool KCalendarEra::isInEra(const QDate &date) const
+ {
+- if ( m_endDate < m_startDate ) {
+- return ( date >= m_endDate && date <= m_startDate );
++ if (m_endDate < m_startDate) {
++ return (date >= m_endDate && date <= m_startDate);
+ } else {
+- return ( date >= m_startDate && date <= m_endDate );
++ return (date >= m_startDate && date <= m_endDate);
+ }
+ }
+
+-int KCalendarEra::yearInEra( int year ) const
++int KCalendarEra::yearInEra(int year) const
+ {
+- return ( ( year - m_startYear ) * m_direction ) + m_offset;
++ return ((year - m_startYear) * m_direction) + m_offset;
+ }
+
+-int KCalendarEra::year( int yearInEra ) const
++int KCalendarEra::year(int yearInEra) const
+ {
+- return ( ( yearInEra - m_offset ) / m_direction ) + m_startYear;
++ return ((yearInEra - m_offset) / m_direction) + m_startYear;
+ }
+diff --git a/kdecore/date/kcalendarera_p.h b/kdecore/date/kcalendarera_p.h
+index f1f05f7..d1564ea 100644
+--- a/kdecore/date/kcalendarera_p.h
++++ b/kdecore/date/kcalendarera_p.h
+@@ -56,9 +56,9 @@ public:
+ int direction() const;
+ int offset() const;
+
+- bool isInEra( const QDate &date ) const;
+- int yearInEra( int year ) const;
+- int year( int yearInEra ) const;
++ bool isInEra(const QDate &date) const;
++ int yearInEra(int year) const;
++ int year(int yearInEra) const;
+
+ private:
+ friend class KCalendarSystemPrivate;
+diff --git a/kdecore/date/kcalendarsystem.cpp b/kdecore/date/kcalendarsystem.cpp
+index ccc02cd..77ef0e9 100644
+--- a/kdecore/date/kcalendarsystem.cpp
++++ b/kdecore/date/kcalendarsystem.cpp
+@@ -34,91 +34,92 @@
+ #include "kcalendarsystemcoptic_p.h"
+ #include "kcalendarsystemethiopian_p.h"
+ #include "kcalendarsystemgregorian_p.h"
+-#include "kcalendarsystemgregorianproleptic_p.h"
+ #include "kcalendarsystemhebrew_p.h"
+-#include "kcalendarsystemhijri_p.h"
+ #include "kcalendarsystemindiannational_p.h"
++#include "kcalendarsystemislamiccivil_p.h"
+ #include "kcalendarsystemjalali_p.h"
+ #include "kcalendarsystemjapanese_p.h"
+ #include "kcalendarsystemjulian_p.h"
+ #include "kcalendarsystemminguo_p.h"
++#include "kcalendarsystemqdate_p.h"
+ #include "kcalendarsystemthai_p.h"
+
+-KCalendarSystem *KCalendarSystem::create( const QString &calendarType, const KLocale *locale )
++KCalendarSystem *KCalendarSystem::create(const QString &calendarType, const KLocale *locale)
+ {
+- return create( calendarSystemForCalendarType( calendarType ), locale );
++ return create(calendarSystem(calendarType), locale);
+ }
+
+-KCalendarSystem *KCalendarSystem::create( const QString &calendarType, KSharedConfig::Ptr config,
+- const KLocale *locale )
++KCalendarSystem *KCalendarSystem::create(const QString &calendarType, KSharedConfig::Ptr config,
++ const KLocale *locale)
+ {
+- return create( calendarSystemForCalendarType( calendarType ), config, locale );
++ return create(calendarSystem(calendarType), config, locale);
+ }
+
+ QStringList KCalendarSystem::calendarSystems()
+ {
+ QStringList lst;
+
+- lst.append( QLatin1String("coptic") );
+- lst.append( QLatin1String("ethiopian") );
+- lst.append( QLatin1String("gregorian") );
+- lst.append( QLatin1String("gregorian-proleptic") );
+- lst.append( QLatin1String("hebrew") );
+- lst.append( QLatin1String("hijri") );
+- lst.append( QLatin1String("indian-national") );
+- lst.append( QLatin1String("jalali") );
+- lst.append( QLatin1String("japanese") );
+- lst.append( QLatin1String("julian") );
+- lst.append( QLatin1String("minguo") );
+- lst.append( QLatin1String("thai") );
++ lst.append(QLatin1String("coptic"));
++ lst.append(QLatin1String("ethiopian"));
++ lst.append(QLatin1String("gregorian"));
++ lst.append(QLatin1String("gregorian-proleptic"));
++ lst.append(QLatin1String("hebrew"));
++ lst.append(QLatin1String("hijri"));
++ lst.append(QLatin1String("indian-national"));
++ lst.append(QLatin1String("jalali"));
++ lst.append(QLatin1String("japanese"));
++ lst.append(QLatin1String("julian"));
++ lst.append(QLatin1String("minguo"));
++ lst.append(QLatin1String("thai"));
+
+ return lst;
+ }
+
+-QString KCalendarSystem::calendarLabel( const QString &calendarType )
++QString KCalendarSystem::calendarLabel(const QString &calendarType)
+ {
+- if ( calendarSystems().contains( calendarType ) ) {
+- return KCalendarSystem::calendarLabel( KCalendarSystem::calendarSystemForCalendarType( calendarType ) );
++ if (calendarSystemsList().contains(calendarSystem(calendarType))) {
++ return KCalendarSystem::calendarLabel(KCalendarSystem::calendarSystem(calendarType));
+ } else {
+- return ki18nc( "@item Calendar system", "Invalid Calendar Type" ).toString( KGlobal::locale() );
++ return ki18nc("@item Calendar system", "Invalid Calendar Type").toString(KGlobal::locale());
+ }
+ }
+
+-KCalendarSystem *KCalendarSystem::create( KLocale::CalendarSystem calendarSystem, const KLocale *locale )
++KCalendarSystem *KCalendarSystem::create(KLocale::CalendarSystem calendarSystem, const KLocale *locale)
+ {
+- return create( calendarSystem, KSharedConfig::Ptr(), locale );
++ return create(calendarSystem, KSharedConfig::Ptr(), locale);
+ }
+
+-KCalendarSystem *KCalendarSystem::create( KLocale::CalendarSystem calendarSystem, KSharedConfig::Ptr config,
+- const KLocale *locale )
++KCalendarSystem *KCalendarSystem::create(KLocale::CalendarSystem calendarSystem,
++ KSharedConfig::Ptr config,
++ const KLocale *locale)
+ {
+- switch ( calendarSystem ) {
++ switch (calendarSystem) {
+ case KLocale::QDateCalendar:
+- return new KCalendarSystemGregorian( config, locale );
++ return new KCalendarSystemQDate(config, locale);
+ case KLocale::CopticCalendar:
+- return new KCalendarSystemCoptic( config, locale );
++ return new KCalendarSystemCoptic(config, locale);
+ case KLocale::EthiopianCalendar:
+- return new KCalendarSystemEthiopian( config, locale );
++ return new KCalendarSystemEthiopian(config, locale);
+ case KLocale::GregorianCalendar:
+- return new KCalendarSystemGregorianProleptic( config, locale );
++ return new KCalendarSystemGregorian(config, locale);
+ case KLocale::HebrewCalendar:
+- return new KCalendarSystemHebrew( config, locale );
+- case KLocale::IslamicCivilCalendar:
+- return new KCalendarSystemHijri( config, locale );
++ return new KCalendarSystemHebrew(config, locale);
+ case KLocale::IndianNationalCalendar:
+- return new KCalendarSystemIndianNational( config, locale );
++ return new KCalendarSystemIndianNational(config, locale);
++ case KLocale::IslamicCivilCalendar:
++ return new KCalendarSystemIslamicCivil(config, locale);
+ case KLocale::JalaliCalendar:
+- return new KCalendarSystemJalali( config, locale );
++ return new KCalendarSystemJalali(config, locale);
+ case KLocale::JapaneseCalendar:
+- return new KCalendarSystemJapanese( config, locale );
++ return new KCalendarSystemJapanese(config, locale);
+ case KLocale::JulianCalendar:
+- return new KCalendarSystemJulian( config, locale );
++ return new KCalendarSystemJulian(config, locale);
+ case KLocale::MinguoCalendar:
+- return new KCalendarSystemMinguo( config, locale );
++ return new KCalendarSystemMinguo(config, locale);
+ case KLocale::ThaiCalendar:
+- return new KCalendarSystemThai( config, locale );
++ return new KCalendarSystemThai(config, locale);
+ default:
+- return new KCalendarSystemGregorian( config, locale );
++ return new KCalendarSystemQDate(config, locale);
+ }
+ }
+
+@@ -126,90 +127,127 @@ QList<KLocale::CalendarSystem> KCalendarSystem::calendarSystemsList()
+ {
+ QList<KLocale::CalendarSystem> list;
+
+- list.append( KLocale::QDateCalendar );
+- list.append( KLocale::CopticCalendar );
+- list.append( KLocale::EthiopianCalendar );
+- list.append( KLocale::GregorianCalendar );
+- list.append( KLocale::HebrewCalendar );
+- list.append( KLocale::IslamicCivilCalendar );
+- list.append( KLocale::IndianNationalCalendar );
+- list.append( KLocale::JalaliCalendar );
+- list.append( KLocale::JapaneseCalendar );
+- list.append( KLocale::JulianCalendar );
+- list.append( KLocale::MinguoCalendar );
+- list.append( KLocale::ThaiCalendar );
++ list.append(KLocale::QDateCalendar);
++ list.append(KLocale::CopticCalendar);
++ list.append(KLocale::EthiopianCalendar);
++ list.append(KLocale::GregorianCalendar);
++ list.append(KLocale::HebrewCalendar);
++ list.append(KLocale::IslamicCivilCalendar);
++ list.append(KLocale::IndianNationalCalendar);
++ list.append(KLocale::JalaliCalendar);
++ list.append(KLocale::JapaneseCalendar);
++ list.append(KLocale::JulianCalendar);
++ list.append(KLocale::MinguoCalendar);
++ list.append(KLocale::ThaiCalendar);
+
+ return list;
+ }
+
+-QString KCalendarSystem::calendarLabel( KLocale::CalendarSystem calendarSystem, const KLocale *locale )
++QString KCalendarSystem::calendarLabel(KLocale::CalendarSystem calendarSystem, const KLocale *locale)
+ {
+- switch ( calendarSystem ) {
++ switch (calendarSystem) {
+ case KLocale::QDateCalendar:
+- return ki18nc( "@item Calendar system", "Gregorian" ).toString( locale );
++ return ki18nc("@item Calendar system", "Gregorian").toString(locale);
+ case KLocale::CopticCalendar:
+- return ki18nc( "@item Calendar system", "Coptic" ).toString( locale );
++ return ki18nc("@item Calendar system", "Coptic").toString(locale);
+ case KLocale::EthiopianCalendar:
+- return ki18nc( "@item Calendar system", "Ethiopian" ).toString( locale );
++ return ki18nc("@item Calendar system", "Ethiopian").toString(locale);
+ case KLocale::GregorianCalendar:
+- return ki18nc( "@item Calendar system", "Gregorian (Proleptic)" ).toString( locale );
++ return ki18nc("@item Calendar system", "Gregorian (Proleptic)").toString(locale);
+ case KLocale::HebrewCalendar:
+- return ki18nc( "@item Calendar system", "Hebrew" ).toString( locale );
++ return ki18nc("@item Calendar system", "Hebrew").toString(locale);
+ case KLocale::IslamicCivilCalendar:
+- return ki18nc( "@item Calendar system", "Islamic / Hijri (Civil)" ).toString( locale );
++ return ki18nc("@item Calendar system", "Islamic / Hijri (Civil)").toString(locale);
+ case KLocale::IndianNationalCalendar:
+- return ki18nc( "@item Calendar system", "Indian National" ).toString( locale );
++ return ki18nc("@item Calendar system", "Indian National").toString(locale);
+ case KLocale::JalaliCalendar:
+- return ki18nc( "@item Calendar system", "Jalali" ).toString( locale );
++ return ki18nc("@item Calendar system", "Jalali").toString(locale);
+ case KLocale::JapaneseCalendar:
+- return ki18nc( "@item Calendar system", "Japanese" ).toString( locale );
++ return ki18nc("@item Calendar system", "Japanese").toString(locale);
+ case KLocale::JulianCalendar:
+- return ki18nc( "@item Calendar system", "Julian" ).toString( locale );
++ return ki18nc("@item Calendar system", "Julian").toString(locale);
+ case KLocale::MinguoCalendar:
+- return ki18nc( "@item Calendar system", "Taiwanese" ).toString( locale );
++ return ki18nc("@item Calendar system", "Taiwanese").toString(locale);
+ case KLocale::ThaiCalendar:
+- return ki18nc( "@item Calendar system", "Thai" ).toString( locale );
++ return ki18nc("@item Calendar system", "Thai").toString(locale);
+ }
+
+- return ki18nc( "@item Calendar system", "Invalid Calendar Type" ).toString( locale );
++ return ki18nc("@item Calendar system", "Invalid Calendar Type").toString(locale);
+ }
+
+-KLocale::CalendarSystem KCalendarSystem::calendarSystemForCalendarType( const QString &calendarType )
++KLocale::CalendarSystem KCalendarSystem::calendarSystemForCalendarType(const QString &calendarType )
+ {
+- if ( calendarType == QLatin1String( "coptic" ) ) {
++ return calendarSystem( calendarType );
++}
++
++KLocale::CalendarSystem KCalendarSystem::calendarSystem(const QString &calendarType )
++{
++ if (calendarType == QLatin1String("coptic")) {
+ return KLocale::CopticCalendar;
+- } else if ( calendarType == QLatin1String( "ethiopian" ) ) {
++ } else if (calendarType == QLatin1String("ethiopian")) {
+ return KLocale::EthiopianCalendar;
+- } else if ( calendarType == QLatin1String( "gregorian" ) ) {
++ } else if (calendarType == QLatin1String("gregorian")) {
+ return KLocale::QDateCalendar;
+- } else if ( calendarType == QLatin1String( "gregorian-proleptic" ) ) {
++ } else if (calendarType == QLatin1String("gregorian-proleptic")) {
+ return KLocale::GregorianCalendar;
+- } else if ( calendarType == QLatin1String( "hebrew" ) ) {
++ } else if (calendarType == QLatin1String("hebrew")) {
+ return KLocale::HebrewCalendar;
+- } else if ( calendarType == QLatin1String( "hijri" ) ) {
++ } else if (calendarType == QLatin1String("hijri")) {
+ return KLocale::IslamicCivilCalendar;
+- } else if ( calendarType == QLatin1String( "indian-national" ) ) {
++ } else if (calendarType == QLatin1String("indian-national")) {
+ return KLocale::IndianNationalCalendar;
+- } else if ( calendarType == QLatin1String( "jalali" ) ) {
++ } else if (calendarType == QLatin1String("jalali")) {
+ return KLocale::JalaliCalendar;
+- } else if ( calendarType == QLatin1String( "japanese" ) ) {
++ } else if (calendarType == QLatin1String("japanese")) {
+ return KLocale::JapaneseCalendar;
+- } else if ( calendarType == QLatin1String( "julian" ) ) {
++ } else if (calendarType == QLatin1String("julian")) {
+ return KLocale::JulianCalendar;
+- } else if ( calendarType == QLatin1String( "minguo" ) ) {
++ } else if (calendarType == QLatin1String("minguo")) {
+ return KLocale::MinguoCalendar;
+- } else if ( calendarType == QLatin1String( "thai" ) ) {
++ } else if (calendarType == QLatin1String("thai")) {
+ return KLocale::ThaiCalendar;
+ } else {
+ return KLocale::QDateCalendar;
+ }
+ }
+
++QString KCalendarSystem::calendarType(KLocale::CalendarSystem calendarSystem)
++{
++ if (calendarSystem == KLocale::QDateCalendar) {
++ return QLatin1String("gregorian");
++ } else if (calendarSystem == KLocale::CopticCalendar) {
++ return QLatin1String("coptic");
++ } else if (calendarSystem == KLocale::EthiopianCalendar) {
++ return QLatin1String("ethiopian");
++ } else if (calendarSystem == KLocale::GregorianCalendar) {
++ return QLatin1String("gregorian-proleptic");
++ } else if (calendarSystem == KLocale::HebrewCalendar) {
++ return QLatin1String("hebrew");
++ } else if (calendarSystem == KLocale::IndianNationalCalendar) {
++ return QLatin1String("indian-national");
++ } else if (calendarSystem == KLocale::IslamicCivilCalendar) {
++ return QLatin1String("hijri");
++ } else if (calendarSystem == KLocale::JalaliCalendar) {
++ return QLatin1String("jalali");
++ } else if (calendarSystem == KLocale::JapaneseCalendar) {
++ return QLatin1String("japanese");
++ } else if (calendarSystem == KLocale::JulianCalendar) {
++ return QLatin1String("julian");
++ } else if (calendarSystem == KLocale::MinguoCalendar) {
++ return QLatin1String("minguo");
++ } else if (calendarSystem == KLocale::ThaiCalendar) {
++ return QLatin1String("thai");
++ } else {
++ return QLatin1String("gregorian");
++ }
++}
++
+ // Shared d pointer base class definitions
+
+-KCalendarSystemPrivate::KCalendarSystemPrivate( KCalendarSystem *q_ptr ): q( q_ptr ),
+- m_eraList( 0 ),
+- m_shortYearWindowStartYear( 2000 )
++KCalendarSystemPrivate::KCalendarSystemPrivate(KCalendarSystem *q_ptr)
++ : q(q_ptr),
++ m_eraList(0),
++ m_shortYearWindowStartYear(2000)
+ {
+ }
+
+@@ -230,31 +268,31 @@ KLocale::CalendarSystem KCalendarSystemPrivate::calendarSystem() const
+ // This method MUST be re-implemented in any new Calendar System
+ void KCalendarSystemPrivate::loadDefaultEraList()
+ {
+- addEra( '-', 1, q->epoch().addDays( -1 ), -1, q->earliestValidDate(), QLatin1String("Before KDE"), QLatin1String("BK"), QLatin1String("%Ey %EC") );
+- addEra( '+', 1, q->epoch(), 1, q->latestValidDate(), QLatin1String("Anno KDE"), QLatin1String("AK"), QLatin1String("%Ey %EC") );
++ addEra('-', 1, q->epoch().addDays(-1), -1, q->earliestValidDate(), QLatin1String("Before KDE"), QLatin1String("BK"), QLatin1String("%Ey %EC"));
++ addEra('+', 1, q->epoch(), 1, q->latestValidDate(), QLatin1String("Anno KDE"), QLatin1String("AK"), QLatin1String("%Ey %EC"));
+ }
+
+ // Dummy version using Gregorian as an example
+ // This method MUST be re-implemented in any new Calendar System
+-int KCalendarSystemPrivate::monthsInYear( int year ) const
++int KCalendarSystemPrivate::monthsInYear(int year) const
+ {
+- Q_UNUSED( year )
++ Q_UNUSED(year)
+ return 12;
+ }
+
+ // Dummy version using Gregorian as an example
+ // This method MUST be re-implemented in any new Calendar System
+-int KCalendarSystemPrivate::daysInMonth( int year, int month ) const
++int KCalendarSystemPrivate::daysInMonth(int year, int month) const
+ {
+- if ( month == 2 ) {
+- if ( isLeapYear( year ) ) {
++ if (month == 2) {
++ if (isLeapYear(year)) {
+ return 29;
+ } else {
+ return 28;
+ }
+ }
+
+- if ( month == 4 || month == 6 || month == 9 || month == 11 ) {
++ if (month == 4 || month == 6 || month == 9 || month == 11) {
+ return 30;
+ }
+
+@@ -263,9 +301,9 @@ int KCalendarSystemPrivate::daysInMonth( int year, int month ) const
+
+ // Dummy version using Gregorian as an example
+ // This method MUST be re-implemented in any new Calendar System
+-int KCalendarSystemPrivate::daysInYear( int year ) const
++int KCalendarSystemPrivate::daysInYear(int year) const
+ {
+- if ( isLeapYear( year ) ) {
++ if (isLeapYear(year)) {
+ return 366;
+ } else {
+ return 365;
+@@ -281,16 +319,16 @@ int KCalendarSystemPrivate::daysInWeek() const
+
+ // Dummy version using Gregorian as an example
+ // This method MUST be re-implemented in any new Calendar System
+-bool KCalendarSystemPrivate::isLeapYear( int year ) const
++bool KCalendarSystemPrivate::isLeapYear(int year) const
+ {
+- if ( year < 1 ) {
++ if (year < 1) {
+ year = year + 1;
+ }
+
+- if ( year % 4 == 0 ) {
+- if ( year % 100 != 0 ) {
++ if (year % 4 == 0) {
++ if (year % 100 != 0) {
+ return true;
+- } else if ( year % 400 == 0 ) {
++ } else if (year % 400 == 0) {
+ return true;
+ }
+ }
+@@ -346,120 +384,120 @@ int KCalendarSystemPrivate::latestValidYear() const
+
+ // Dummy version
+ // This method MUST be re-implemented in any new Calendar System
+-QString KCalendarSystemPrivate::monthName( int month, int year, KLocale::DateTimeComponentFormat format, bool possessive ) const
++QString KCalendarSystemPrivate::monthName(int month, int year, KLocale::DateTimeComponentFormat format, bool possessive) const
+ {
+- Q_UNUSED( month );
+- Q_UNUSED( year );
+- Q_UNUSED( format );
+- Q_UNUSED( possessive );
++ Q_UNUSED(month);
++ Q_UNUSED(year);
++ Q_UNUSED(format);
++ Q_UNUSED(possessive);
+ return QString();
+ }
+
+ // Dummy version
+ // This method MUST be re-implemented in any new Calendar System
+-QString KCalendarSystemPrivate::weekDayName( int weekDay, KLocale::DateTimeComponentFormat format ) const
++QString KCalendarSystemPrivate::weekDayName(int weekDay, KLocale::DateTimeComponentFormat format) const
+ {
+- Q_UNUSED( weekDay );
+- Q_UNUSED( format );
++ Q_UNUSED(weekDay);
++ Q_UNUSED(format);
+ return QString();
+ }
+
+ // Reimplement if special maths handling required, e.g. Hebrew.
+-int KCalendarSystemPrivate::week( const QDate &date, KLocale::WeekNumberSystem weekNumberSystem, int *yearNum ) const
++int KCalendarSystemPrivate::week(const QDate &date, KLocale::WeekNumberSystem weekNumberSystem, int *yearNum) const
+ {
+ int y, m, d;
+- q->julianDayToDate( date.toJulianDay(), y, m, d );
++ q->julianDayToDate(date.toJulianDay(), y, m, d);
+
+- switch ( weekNumberSystem ) {
++ switch (weekNumberSystem) {
+ case KLocale::IsoWeekNumber:
+- return isoWeekNumber( date, yearNum );
++ return isoWeekNumber(date, yearNum);
+ case KLocale::FirstFullWeek:
+- return regularWeekNumber( date, locale()->weekStartDay(), 0, yearNum );
++ return regularWeekNumber(date, locale()->weekStartDay(), 0, yearNum);
+ case KLocale::FirstPartialWeek:
+- return regularWeekNumber( date, locale()->weekStartDay(), 1, yearNum );
++ return regularWeekNumber(date, locale()->weekStartDay(), 1, yearNum);
+ case KLocale::SimpleWeek:
+- return simpleWeekNumber( date, yearNum );
++ return simpleWeekNumber(date, yearNum);
+ case KLocale::DefaultWeekNumber:
+ default:
+- return week( date, locale()->weekNumberSystem(), yearNum );
++ return week(date, locale()->weekNumberSystem(), yearNum);
+ }
+ }
+
+ // Reimplement if special maths handling required, e.g. Hebrew.
+-int KCalendarSystemPrivate::isoWeekNumber( const QDate &date, int *yearNum ) const
++int KCalendarSystemPrivate::isoWeekNumber(const QDate &date, int *yearNum) const
+ {
+ int y, m, d;
+- q->julianDayToDate( date.toJulianDay(), y, m, d );
++ q->julianDayToDate(date.toJulianDay(), y, m, d);
+
+ QDate firstDayWeek1, lastDay;
+ int week;
+ int weekDay1, dayOfWeek1InYear;
+
+ // let's guess 1st day of 1st week
+- firstDayWeek1 = firstDayOfYear( y );
+- weekDay1 = dayOfWeek( firstDayWeek1 );
++ firstDayWeek1 = firstDayOfYear(y);
++ weekDay1 = dayOfWeek(firstDayWeek1);
+
+ // iso 8601: week 1 is the first containing thursday and week starts on monday
+- if ( weekDay1 > 4 /*Thursday*/ ) {
+- firstDayWeek1 = q->addDays( firstDayWeek1 , daysInWeek() - weekDay1 + 1 ); // next monday
++ if (weekDay1 > 4 /*Thursday*/) {
++ firstDayWeek1 = q->addDays(firstDayWeek1 , daysInWeek() - weekDay1 + 1); // next monday
+ }
+
+- dayOfWeek1InYear = dayOfYear( firstDayWeek1 );
++ dayOfWeek1InYear = dayOfYear(firstDayWeek1);
+
+ // our date in prev year's week
+- if ( dayOfYear( date ) < dayOfWeek1InYear ) {
+- if ( yearNum ) {
+- *yearNum = addYears( y, - 1 );
++ if (dayOfYear(date) < dayOfWeek1InYear) {
++ if (yearNum) {
++ *yearNum = addYears(y, - 1);
+ }
+- return isoWeeksInYear( addYears( y, - 1 ) );
++ return isoWeeksInYear(addYears(y, - 1));
+ }
+
+ // let's check if its last week belongs to next year
+- lastDay = lastDayOfYear( y );
++ lastDay = lastDayOfYear(y);
+
+ // if our date is in last week && 1st week in next year has thursday
+- if ( ( dayOfYear( date ) >= daysInYear( y ) - dayOfWeek( lastDay ) + 1 )
+- && dayOfWeek( lastDay ) < 4 ) {
+- if ( yearNum ) {
+- * yearNum = addYears( y, 1 );
++ if ((dayOfYear(date) >= daysInYear(y) - dayOfWeek(lastDay) + 1)
++ && dayOfWeek(lastDay) < 4) {
++ if (yearNum) {
++ * yearNum = addYears(y, 1);
+ }
+ week = 1;
+ } else {
+ // To calculate properly the number of weeks from day a to x let's make a day 1 of week
+- if( weekDay1 < 5 ) {
+- firstDayWeek1 = q->addDays( firstDayWeek1, -( weekDay1 - 1 ) );
++ if (weekDay1 < 5) {
++ firstDayWeek1 = q->addDays(firstDayWeek1, -(weekDay1 - 1));
+ }
+
+- if ( yearNum ) {
++ if (yearNum) {
+ * yearNum = y;
+ }
+
+- week = firstDayWeek1.daysTo( date ) / daysInWeek() + 1;
++ week = firstDayWeek1.daysTo(date) / daysInWeek() + 1;
+ }
+
+ return week;
+ }
+
+ // Reimplement if special maths handling required, e.g. Hebrew.
+-int KCalendarSystemPrivate::regularWeekNumber( const QDate &date, int weekStartDay, int firstWeekNumber, int *weekYear ) const
++int KCalendarSystemPrivate::regularWeekNumber(const QDate &date, int weekStartDay, int firstWeekNumber, int *weekYear) const
+ {
+ int y, m, d;
+- q->julianDayToDate( date.toJulianDay(), y, m, d );
++ q->julianDayToDate(date.toJulianDay(), y, m, d);
+
+- int firstWeekDayOffset = ( dayOfWeek( date ) - weekStartDay + daysInWeek() ) % daysInWeek();
+- int dayInYear = date.toJulianDay() - firstDayOfYear( y ).toJulianDay(); // 0 indexed
+- int week = ( ( dayInYear - firstWeekDayOffset + daysInWeek() ) / daysInWeek() );
++ int firstWeekDayOffset = (dayOfWeek(date) - weekStartDay + daysInWeek()) % daysInWeek();
++ int dayInYear = date.toJulianDay() - firstDayOfYear(y).toJulianDay(); // 0 indexed
++ int week = ((dayInYear - firstWeekDayOffset + daysInWeek()) / daysInWeek());
+
+- if ( dayOfWeek( firstDayOfYear( y ) ) != weekStartDay ) {
++ if (dayOfWeek(firstDayOfYear(y)) != weekStartDay) {
+ week = week + firstWeekNumber;
+ }
+
+- if ( week < 1 ) {
++ if (week < 1) {
+ y = y - 1;
+- week = regularWeeksInYear( y, weekStartDay, firstWeekNumber );
++ week = regularWeeksInYear(y, weekStartDay, firstWeekNumber);
+ }
+
+- if ( weekYear ) {
++ if (weekYear) {
+ *weekYear = y;
+ }
+
+@@ -467,67 +505,67 @@ int KCalendarSystemPrivate::regularWeekNumber( const QDate &date, int weekStartD
+ }
+
+ // Reimplement if special maths handling required, e.g. Hebrew.
+-int KCalendarSystemPrivate::simpleWeekNumber( const QDate &date, int *yearNum ) const
++int KCalendarSystemPrivate::simpleWeekNumber(const QDate &date, int *yearNum) const
+ {
+ int y, m, d;
+- q->julianDayToDate( date.toJulianDay(), y, m, d );
+- if ( yearNum ) {
++ q->julianDayToDate(date.toJulianDay(), y, m, d);
++ if (yearNum) {
+ *yearNum = y;
+ }
+- return ( ( date.toJulianDay() - firstDayOfYear( y ).toJulianDay() ) / daysInWeek() ) + 1;
++ return ((date.toJulianDay() - firstDayOfYear(y).toJulianDay()) / daysInWeek()) + 1;
+ }
+
+ // Reimplement if special maths handling required, e.g. Hebrew.
+-int KCalendarSystemPrivate::weeksInYear( int year, KLocale::WeekNumberSystem weekNumberSystem ) const
++int KCalendarSystemPrivate::weeksInYear(int year, KLocale::WeekNumberSystem weekNumberSystem) const
+ {
+- switch ( weekNumberSystem ) {
++ switch (weekNumberSystem) {
+ case KLocale::IsoWeekNumber:
+- return isoWeeksInYear( year );
++ return isoWeeksInYear(year);
+ case KLocale::FirstFullWeek:
+- return regularWeeksInYear( year, locale()->weekStartDay(), 0 );
++ return regularWeeksInYear(year, locale()->weekStartDay(), 0);
+ case KLocale::FirstPartialWeek:
+- return regularWeeksInYear( year, locale()->weekStartDay(), 1 );
++ return regularWeeksInYear(year, locale()->weekStartDay(), 1);
+ case KLocale::SimpleWeek:
+- return simpleWeeksInYear( year );
++ return simpleWeeksInYear(year);
+ case KLocale::DefaultWeekNumber:
+ default:
+- return weeksInYear( year, locale()->weekNumberSystem() );
++ return weeksInYear(year, locale()->weekNumberSystem());
+ }
+ }
+
+ // Reimplement if special maths handling required, e.g. Hebrew.
+-int KCalendarSystemPrivate::isoWeeksInYear( int year ) const
++int KCalendarSystemPrivate::isoWeeksInYear(int year) const
+ {
+- QDate lastDayOfThisYear = lastDayOfYear( year );
++ QDate lastDayOfThisYear = lastDayOfYear(year);
+
+ int weekYear = year;
+- int lastWeekInThisYear = isoWeekNumber( lastDayOfThisYear, &weekYear );
++ int lastWeekInThisYear = isoWeekNumber(lastDayOfThisYear, &weekYear);
+
+ // If error, or the last day of the year is in the first week of next year use the week before
+- if ( lastWeekInThisYear < 1 || weekYear != year ) {
+- lastWeekInThisYear = isoWeekNumber( q->addDays( lastDayOfThisYear, -7 ), &weekYear );
++ if (lastWeekInThisYear < 1 || weekYear != year) {
++ lastWeekInThisYear = isoWeekNumber(q->addDays(lastDayOfThisYear, -7), &weekYear);
+ }
+
+ return lastWeekInThisYear;
+ }
+
+ // Reimplement if special maths handling required, e.g. Hebrew.
+-int KCalendarSystemPrivate::regularWeeksInYear( int year, int weekStartDay, int firstWeekNumber ) const
++int KCalendarSystemPrivate::regularWeeksInYear(int year, int weekStartDay, int firstWeekNumber) const
+ {
+- return regularWeekNumber( lastDayOfYear( year ), weekStartDay, firstWeekNumber, 0 );
++ return regularWeekNumber(lastDayOfYear(year), weekStartDay, firstWeekNumber, 0);
+ }
+
+ // Reimplement if special maths handling required, e.g. Hebrew.
+-int KCalendarSystemPrivate::simpleWeeksInYear( int year ) const
++int KCalendarSystemPrivate::simpleWeeksInYear(int year) const
+ {
+- return simpleWeekNumber( lastDayOfYear( year ), 0 );
++ return simpleWeekNumber(lastDayOfYear(year), 0);
+ }
+
+ // Reimplement if special maths handling required, e.g. Hebrew.
+ // Works for calendars with constant number of months, or where leap month is last month of year
+ // Will not work for Hebrew or others where leap month is inserted in middle of year
+-void KCalendarSystemPrivate::dateDifference( const QDate &fromDate, const QDate &toDate,
+- int *yearsDiff, int *monthsDiff, int *daysDiff, int *direction ) const
++void KCalendarSystemPrivate::dateDifference(const QDate &fromDate, const QDate &toDate,
++ int *yearsDiff, int *monthsDiff, int *daysDiff, int *direction) const
+ {
+ // This could be optimised a little but is left in full as it's easier to understand
+ int dy = 0;
+@@ -535,171 +573,171 @@ void KCalendarSystemPrivate::dateDifference( const QDate &fromDate, const QDate
+ int dd = 0;
+ int dir = 1;
+
+- if ( toDate < fromDate ) {
+- dateDifference( toDate, fromDate, &dy, &dm, &dd, 0 );
++ if (toDate < fromDate) {
++ dateDifference(toDate, fromDate, &dy, &dm, &dd, 0);
+ dir = -1;
+- } else if ( toDate > fromDate ) {
++ } else if (toDate > fromDate) {
+
+- int fromYear = q->year( fromDate );
+- int toYear = q->year( toDate );
+- int fromMonth = q->month( fromDate );
+- int toMonth = q->month( toDate );
+- int fromDay = q->day( fromDate );
+- int toDay = q->day( toDate );
++ int fromYear = q->year(fromDate);
++ int toYear = q->year(toDate);
++ int fromMonth = q->month(fromDate);
++ int toMonth = q->month(toDate);
++ int fromDay = q->day(fromDate);
++ int toDay = q->day(toDate);
+
+- int monthsInPrevYear = monthsInYear( addYears( toYear, -1 ) );
+- int daysInPrevMonth = q->daysInMonth( q->addMonths( toDate, -1 ) );
+- int daysInFromMonth = daysInMonth( fromYear, fromMonth );
+- int daysInToMonth = daysInMonth( toYear, toMonth );
++ int monthsInPrevYear = monthsInYear(addYears(toYear, -1));
++ int daysInPrevMonth = q->daysInMonth(q->addMonths(toDate, -1));
++ int daysInFromMonth = daysInMonth(fromYear, fromMonth);
++ int daysInToMonth = daysInMonth(toYear, toMonth);
+
+ // Calculate years difference
+- if ( toYear == fromYear ) {
++ if (toYear == fromYear) {
+ dy = 0;
+- } else if ( toMonth > fromMonth ) {
+- dy = differenceYearNumbers( fromYear, toYear );
+- } else if ( toMonth < fromMonth ) {
+- dy = differenceYearNumbers( fromYear, toYear ) - 1;
++ } else if (toMonth > fromMonth) {
++ dy = differenceYearNumbers(fromYear, toYear);
++ } else if (toMonth < fromMonth) {
++ dy = differenceYearNumbers(fromYear, toYear) - 1;
+ } else { // toMonth == fromMonth
+ // Allow for last day of month to last day of month and leap days
+ // e.g. 2000-02-29 to 2001-02-28 is 1 year not 0 years
+- if ( ( toDay >= fromDay ) || ( fromDay == daysInFromMonth && toDay == daysInToMonth ) ) {
+- dy = differenceYearNumbers( fromYear, toYear );
++ if ((toDay >= fromDay) || (fromDay == daysInFromMonth && toDay == daysInToMonth)) {
++ dy = differenceYearNumbers(fromYear, toYear);
+ } else {
+- dy = differenceYearNumbers( fromYear, toYear ) - 1;
++ dy = differenceYearNumbers(fromYear, toYear) - 1;
+ }
+ }
+
+ // Calculate months and days difference
+- if ( toDay >= fromDay ) {
+- dm = ( monthsInPrevYear + toMonth - fromMonth ) % monthsInPrevYear;
++ if (toDay >= fromDay) {
++ dm = (monthsInPrevYear + toMonth - fromMonth) % monthsInPrevYear;
+ dd = toDay - fromDay;
+ } else { // toDay < fromDay
+ // Allow for last day of month to last day of month and leap days
+ // e.g. 2010-03-31 to 2010-04-30 is 1 month
+ // 2000-02-29 to 2001-02-28 is 1 year
+ // 2000-02-29 to 2001-03-01 is 1 year 1 day
+- int prevMonth = q->month( q->addMonths( toDate, -1 ) );
+- if ( fromDay == daysInFromMonth && toDay == daysInToMonth ) {
+- dm = ( monthsInPrevYear + toMonth - fromMonth ) % monthsInPrevYear;
++ int prevMonth = q->month(q->addMonths(toDate, -1));
++ if (fromDay == daysInFromMonth && toDay == daysInToMonth) {
++ dm = (monthsInPrevYear + toMonth - fromMonth) % monthsInPrevYear;
+ dd = 0;
+- } else if ( prevMonth == fromMonth && daysInPrevMonth < daysInFromMonth ) {
++ } else if (prevMonth == fromMonth && daysInPrevMonth < daysInFromMonth) {
+ // Special case where fromDate = leap day and toDate in month following but non-leap year
+ // e.g. 2000-02-29 to 2001-03-01 needs to use 29 to calculate day number not 28
+- dm = ( monthsInPrevYear + toMonth - fromMonth - 1 ) % monthsInPrevYear;
+- dd = ( daysInFromMonth + toDay - fromDay ) % daysInFromMonth;
++ dm = (monthsInPrevYear + toMonth - fromMonth - 1) % monthsInPrevYear;
++ dd = (daysInFromMonth + toDay - fromDay) % daysInFromMonth;
+ } else {
+- dm = ( monthsInPrevYear + toMonth - fromMonth - 1 ) % monthsInPrevYear;
+- dd = ( daysInPrevMonth + toDay - fromDay ) % daysInPrevMonth;
++ dm = (monthsInPrevYear + toMonth - fromMonth - 1) % monthsInPrevYear;
++ dd = (daysInPrevMonth + toDay - fromDay) % daysInPrevMonth;
+ }
+ }
+
+ }
+
+ // Only return values if we have a valid pointer
+- if ( yearsDiff ) {
++ if (yearsDiff) {
+ *yearsDiff = dy;
+ }
+- if ( monthsDiff ) {
++ if (monthsDiff) {
+ *monthsDiff = dm;
+ }
+- if ( daysDiff ) {
++ if (daysDiff) {
+ *daysDiff = dd;
+ }
+- if ( direction ) {
++ if (direction) {
+ *direction = dir;
+ }
+ }
+
+ // Reimplement if special maths handling required, e.g. Hebrew
+ // Allows for calendars with leap months at end of year but not during year
+-int KCalendarSystemPrivate::yearsDifference( const QDate &fromDate, const QDate &toDate ) const
++int KCalendarSystemPrivate::yearsDifference(const QDate &fromDate, const QDate &toDate) const
+ {
+ // This could be optimised a little but is left in full as it's easier to understand
+ // Alternatively could just call dateDifference(), but this is slightly more efficient
+
+- if ( toDate < fromDate ) {
+- return 0 - yearsDifference( toDate, fromDate );
++ if (toDate < fromDate) {
++ return 0 - yearsDifference(toDate, fromDate);
+ }
+
+- if ( toDate == fromDate ) {
++ if (toDate == fromDate) {
+ return 0;
+ }
+
+- int fromYear = q->year( fromDate );
+- int toYear = q->year( toDate );
++ int fromYear = q->year(fromDate);
++ int toYear = q->year(toDate);
+
+- if ( toYear == fromYear ) {
++ if (toYear == fromYear) {
+ return 0;
+ }
+
+- int fromMonth = q->month( fromDate );
+- int toMonth = q->month( toDate );
++ int fromMonth = q->month(fromDate);
++ int toMonth = q->month(toDate);
+
+- if ( toMonth > fromMonth ) {
+- return differenceYearNumbers( fromYear, toYear );
++ if (toMonth > fromMonth) {
++ return differenceYearNumbers(fromYear, toYear);
+ }
+
+- if ( toMonth < fromMonth ) {
+- return differenceYearNumbers( fromYear, toYear ) - 1;
++ if (toMonth < fromMonth) {
++ return differenceYearNumbers(fromYear, toYear) - 1;
+ }
+
+ // toMonth == fromMonth
+- int fromDay = q->day( fromDate );
+- int toDay = q->day( toDate );
++ int fromDay = q->day(fromDate);
++ int toDay = q->day(toDate);
+
+ // Adjust for month numbers in from and to year
+ // Allow for last day of month to last day of month and leap days
+ // e.g. 2000-02-29 to 2001-02-28 is 1 year not 0 years
+- if ( ( toDay >= fromDay ) ||
+- ( fromDay == daysInMonth( fromYear, fromMonth ) &&
+- toDay == daysInMonth( toYear, toMonth ) ) ) {
+- return differenceYearNumbers( fromYear, toYear );
++ if ((toDay >= fromDay) ||
++ (fromDay == daysInMonth(fromYear, fromMonth) &&
++ toDay == daysInMonth(toYear, toMonth))) {
++ return differenceYearNumbers(fromYear, toYear);
+ } else {
+- return differenceYearNumbers( fromYear, toYear ) - 1;
++ return differenceYearNumbers(fromYear, toYear) - 1;
+ }
+
+ }
+
+ // Reimplement if special maths handling required, e.g. maybe Hebrew?
+ // Allows for calendars with leap months
+-int KCalendarSystemPrivate::monthsDifference( const QDate &fromDate, const QDate &toDate ) const
++int KCalendarSystemPrivate::monthsDifference(const QDate &fromDate, const QDate &toDate) const
+ {
+- if ( toDate < fromDate ) {
+- return 0 - monthsDifference( toDate, fromDate );
++ if (toDate < fromDate) {
++ return 0 - monthsDifference(toDate, fromDate);
+ }
+
+- if ( toDate == fromDate ) {
++ if (toDate == fromDate) {
+ return 0;
+ }
+
+- int fromYear = q->year( fromDate );
+- int toYear = q->year( toDate );
+- int fromMonth = q->month( fromDate );
+- int toMonth = q->month( toDate );
+- int fromDay = q->day( fromDate );
+- int toDay = q->day( toDate );
++ int fromYear = q->year(fromDate);
++ int toYear = q->year(toDate);
++ int fromMonth = q->month(fromDate);
++ int toMonth = q->month(toDate);
++ int fromDay = q->day(fromDate);
++ int toDay = q->day(toDate);
+
+ int monthsInPreceedingYears;
+
+ // Calculate number of months in full years preceding toYear
+- if ( toYear == fromYear ) {
++ if (toYear == fromYear) {
+ monthsInPreceedingYears = 0;
+- } else if ( hasLeapMonths() ) {
++ } else if (hasLeapMonths()) {
+ monthsInPreceedingYears = 0;
+- for ( int y = fromYear; y < toYear; y = addYears( y, 1 ) ) {
+- monthsInPreceedingYears = monthsInPreceedingYears + monthsInYear( y );
++ for (int y = fromYear; y < toYear; y = addYears(y, 1)) {
++ monthsInPreceedingYears = monthsInPreceedingYears + monthsInYear(y);
+ }
+ } else {
+- monthsInPreceedingYears = differenceYearNumbers( fromYear, toYear ) * monthsInYear( toYear );
++ monthsInPreceedingYears = differenceYearNumbers(fromYear, toYear) * monthsInYear(toYear);
+ }
+
+ // Adjust for months in from and to year
+ // Allow for last day of month to last day of month and leap days
+ // e.g. 2010-03-31 to 2010-04-30 is 1 month not 0 months
+ // also 2000-02-29 to 2001-02-28 is 12 months not 11 months
+- if ( ( toDay >= fromDay ) ||
+- ( fromDay == daysInMonth( fromYear, fromMonth ) &&
+- toDay == daysInMonth( toYear, toMonth ) ) ) {
++ if ((toDay >= fromDay) ||
++ (fromDay == daysInMonth(fromYear, fromMonth) &&
++ toDay == daysInMonth(toYear, toMonth))) {
+ return monthsInPreceedingYears + toMonth - fromMonth;
+ } else {
+ return monthsInPreceedingYears + toMonth - fromMonth - 1;
+@@ -709,26 +747,26 @@ int KCalendarSystemPrivate::monthsDifference( const QDate &fromDate, const QDate
+ // Reimplement if special string to integer handling required, e.g. Hebrew.
+ // Peel a number off the front of a string which may have other trailing chars after the number
+ // Stop either at either maxLength, eos, or first non-digit char
+-int KCalendarSystemPrivate::integerFromString( const QString &string, int maxLength, int &readLength ) const
++int KCalendarSystemPrivate::integerFromString(const QString &string, int maxLength, int &readLength) const
+ {
+ int value = -1;
+ int position = 0;
+ readLength = 0;
+ bool ok = false;
+
+- if ( maxLength < 0 ) {
++ if (maxLength < 0) {
+ maxLength = string.length();
+ }
+
+- while ( position < string.length() &&
++ while (position < string.length() &&
+ position < maxLength &&
+- string.at( position ).isDigit() ) {
++ string.at(position).isDigit()) {
+ position++;
+ }
+
+- if ( position > 0 ) {
+- value = string.left( position ).toInt( &ok );
+- if ( ok ) {
++ if (position > 0) {
++ value = string.left(position).toInt(&ok);
++ if (ok) {
+ readLength = position;
+ } else {
+ value = -1;
+@@ -740,41 +778,41 @@ int KCalendarSystemPrivate::integerFromString( const QString &string, int maxLen
+
+ // Reimplement if special integer to string handling required, e.g. Hebrew.
+ // Utility to convert an integer into the correct display string form
+-QString KCalendarSystemPrivate::stringFromInteger( int number, int padWidth, QChar padChar ) const
++QString KCalendarSystemPrivate::stringFromInteger(int number, int padWidth, QChar padChar) const
+ {
+- return stringFromInteger( number, padWidth, padChar, q->locale()->dateTimeDigitSet() );
++ return stringFromInteger(number, padWidth, padChar, q->locale()->dateTimeDigitSet());
+ }
+
+ // Reimplement if special integer to string handling required, e.g. Hebrew.
+ // Utility to convert an integer into the correct display string form
+-QString KCalendarSystemPrivate::stringFromInteger( int number, int padWidth, QChar padChar, KLocale::DigitSet digitSet ) const
++QString KCalendarSystemPrivate::stringFromInteger(int number, int padWidth, QChar padChar, KLocale::DigitSet digitSet) const
+ {
+- if ( padChar == QLatin1Char('\0') || padWidth == 0 ) {
+- return q->locale()->convertDigits( QString::number( number ), digitSet );
++ if (padChar == QLatin1Char('\0') || padWidth == 0) {
++ return q->locale()->convertDigits(QString::number(number), digitSet);
+ } else {
+- return q->locale()->convertDigits( QString::number( number ).rightJustified( padWidth, padChar ), digitSet );
++ return q->locale()->convertDigits(QString::number(number).rightJustified(padWidth, padChar), digitSet);
+ }
+ }
+
+ // Allows us to set dates outside publically valid range, USE WITH CARE!!!!
+-bool KCalendarSystemPrivate::setAnyDate( QDate &date, int year, int month, int day ) const
++bool KCalendarSystemPrivate::setAnyDate(QDate &date, int year, int month, int day) const
+ {
+ int jd;
+- q->dateToJulianDay( year, month, day, jd );
+- date = QDate::fromJulianDay( jd );
++ q->dateToJulianDay(year, month, day, jd);
++ date = QDate::fromJulianDay(jd);
+ return true;
+ }
+
+ // Utility to correctly add years to a year number because some systems such as
+ // Julian and Gregorian calendars don't have a year 0
+-int KCalendarSystemPrivate::addYears( int originalYear, int addYears ) const
++int KCalendarSystemPrivate::addYears(int originalYear, int addYears) const
+ {
+ int newYear = originalYear + addYears;
+
+- if ( !hasYearZero() ) {
+- if ( originalYear > 0 && newYear <= 0 ) {
++ if (!hasYearZero()) {
++ if (originalYear > 0 && newYear <= 0) {
+ newYear = newYear - 1;
+- } else if ( originalYear < 0 && newYear >= 0 ) {
++ } else if (originalYear < 0 && newYear >= 0) {
+ newYear = newYear + 1;
+ }
+ }
+@@ -784,14 +822,14 @@ int KCalendarSystemPrivate::addYears( int originalYear, int addYears ) const
+
+ // Utility to correctly return number of years between two year numbers because some systems such as
+ // Julian and Gregorian calendars don't have a year 0
+-int KCalendarSystemPrivate::differenceYearNumbers( int fromYear, int toYear ) const
++int KCalendarSystemPrivate::differenceYearNumbers(int fromYear, int toYear) const
+ {
+ int dy = toYear - fromYear;
+
+- if ( !hasYearZero() ) {
+- if ( toYear > 0 && fromYear < 0 ) {
++ if (!hasYearZero()) {
++ if (toYear > 0 && fromYear < 0) {
+ dy = dy - 1;
+- } else if ( toYear < 0 && fromYear > 0 ) {
++ } else if (toYear < 0 && fromYear > 0) {
+ dy = dy + 1;
+ }
+ }
+@@ -805,71 +843,71 @@ QDate KCalendarSystemPrivate::invalidDate() const
+ return QDate();
+ }
+
+-QString KCalendarSystemPrivate::simpleDateString( const QString &str ) const
++QString KCalendarSystemPrivate::simpleDateString(const QString &str) const
+ {
+ QString newStr;
+- for ( int i = 0; i < str.length(); i++ ) {
+- if ( str.at(i).isLetterOrNumber() ) {
+- newStr.append( str.at(i) );
++ for (int i = 0; i < str.length(); i++) {
++ if (str.at(i).isLetterOrNumber()) {
++ newStr.append(str.at(i));
+ } else {
+- newStr.append( QLatin1Char(' ') );
++ newStr.append(QLatin1Char(' '));
+ }
+ }
+ newStr.simplified();
+ return newStr;
+ }
+
+-int KCalendarSystemPrivate::dayOfYear( const QDate &date ) const
++int KCalendarSystemPrivate::dayOfYear(const QDate &date) const
+ {
+ int y, m, d, jdFirstDayOfYear;
+- q->julianDayToDate( date.toJulianDay(), y, m, d );
+- q->dateToJulianDay( y, 1, 1, jdFirstDayOfYear );
++ q->julianDayToDate(date.toJulianDay(), y, m, d);
++ q->dateToJulianDay(y, 1, 1, jdFirstDayOfYear);
+ //Take the jd of the given date, and subtract the jd of the first day of that year
+- return ( date.toJulianDay() - jdFirstDayOfYear + 1 );
++ return (date.toJulianDay() - jdFirstDayOfYear + 1);
+ }
+
+-int KCalendarSystemPrivate::dayOfWeek( const QDate &date ) const
++int KCalendarSystemPrivate::dayOfWeek(const QDate &date) const
+ {
+ // Makes assumption that Julian Day 0 was day 1 of week
+ // This is true for Julian/Gregorian calendar with jd 0 being Monday
+ // We add 1 for ISO compliant numbering for 7 day week
+ // Assumes we've never skipped weekdays
+- return ( ( date.toJulianDay() % daysInWeek() ) + 1 );
++ return ((date.toJulianDay() % daysInWeek()) + 1);
+ }
+
+-QDate KCalendarSystemPrivate::firstDayOfYear( int year ) const
++QDate KCalendarSystemPrivate::firstDayOfYear(int year) const
+ {
+ int jd;
+- q->dateToJulianDay( year, 1, 1, jd );
+- return QDate::fromJulianDay( jd );
++ q->dateToJulianDay(year, 1, 1, jd);
++ return QDate::fromJulianDay(jd);
+ }
+
+-QDate KCalendarSystemPrivate::lastDayOfYear( int year ) const
++QDate KCalendarSystemPrivate::lastDayOfYear(int year) const
+ {
+ int jd;
+- q->dateToJulianDay( year, 1, 1, jd );
+- jd = jd + daysInYear( year ) - 1;
+- return QDate::fromJulianDay( jd );
++ q->dateToJulianDay(year, 1, 1, jd);
++ jd = jd + daysInYear(year) - 1;
++ return QDate::fromJulianDay(jd);
+ }
+
+-QDate KCalendarSystemPrivate::firstDayOfMonth( int year, int month ) const
++QDate KCalendarSystemPrivate::firstDayOfMonth(int year, int month) const
+ {
+ int jd;
+- q->dateToJulianDay( year, month, 1, jd );
+- return QDate::fromJulianDay( jd );
++ q->dateToJulianDay(year, month, 1, jd);
++ return QDate::fromJulianDay(jd);
+ }
+
+-QDate KCalendarSystemPrivate::lastDayOfMonth( int year, int month ) const
++QDate KCalendarSystemPrivate::lastDayOfMonth(int year, int month) const
+ {
+ int jd;
+- q->dateToJulianDay( year, month, 1, jd );
+- jd = jd + daysInMonth( year, month ) - 1;
+- return QDate::fromJulianDay( jd );
++ q->dateToJulianDay(year, month, 1, jd);
++ jd = jd + daysInMonth(year, month) - 1;
++ return QDate::fromJulianDay(jd);
+ }
+
+ const KLocale * KCalendarSystemPrivate::locale() const
+ {
+- if ( m_locale ) {
++ if (m_locale) {
+ return m_locale;
+ } else {
+ return KGlobal::locale();
+@@ -881,93 +919,93 @@ QList<KCalendarEra> *KCalendarSystemPrivate::eraList() const
+ return m_eraList;
+ }
+
+-KCalendarEra KCalendarSystemPrivate::era( const QDate &eraDate ) const
++KCalendarEra KCalendarSystemPrivate::era(const QDate &eraDate) const
+ {
+- for ( int i = m_eraList->count() -1; i >= 0; --i ) {
+- if ( m_eraList->at( i ).isInEra( eraDate ) ) {
+- return m_eraList->at( i );
++ for (int i = m_eraList->count() - 1; i >= 0; --i) {
++ if (m_eraList->at(i).isInEra(eraDate)) {
++ return m_eraList->at(i);
+ }
+ }
+ return KCalendarEra();
+ }
+
+-KCalendarEra KCalendarSystemPrivate::era( const QString &eraName, int yearInEra ) const
++KCalendarEra KCalendarSystemPrivate::era(const QString &eraName, int yearInEra) const
+ {
+- Q_UNUSED( yearInEra )
++ Q_UNUSED(yearInEra)
+
+- for ( int i = m_eraList->count() - 1; i >= 0; --i ) {
+- KCalendarEra era = m_eraList->at( i );
+- if ( era.name(KLocale::LongName).toLower() == eraName.toLower() ||
+- era.name(KLocale::ShortName).toLower() == eraName.toLower() ) {
++ for (int i = m_eraList->count() - 1; i >= 0; --i) {
++ KCalendarEra era = m_eraList->at(i);
++ if (era.name(KLocale::LongName).toLower() == eraName.toLower() ||
++ era.name(KLocale::ShortName).toLower() == eraName.toLower()) {
+ return era;
+ }
+ }
+ return KCalendarEra();
+ }
+
+-void KCalendarSystemPrivate::loadEraList( const KConfigGroup & cg )
++void KCalendarSystemPrivate::loadEraList(const KConfigGroup & cg)
+ {
+ delete m_eraList;
+ m_eraList = new QList<KCalendarEra>;
+ QString eraKey = QString::fromLatin1("Era1");
+ int i = 1;
+- while ( cg.hasKey( eraKey ) ) {
+- QString eraEntry = cg.readEntry( eraKey, QString() );
+- if ( !eraEntry.isEmpty() ) {
++ while (cg.hasKey(eraKey)) {
++ QString eraEntry = cg.readEntry(eraKey, QString());
++ if (!eraEntry.isEmpty()) {
+ // Based on LC_TIME, but different!
+ // Includes long and short names, uses ISO fomat dates
+ // e.g. +:1:0001-01-01:9999-12-31:Anno Domini:AD:%EC %Ey
+- QChar direction = eraEntry.section( QLatin1Char(':'), 0, 0 ).at( 0 );
++ QChar direction = eraEntry.section(QLatin1Char(':'), 0, 0).at(0);
+ QDate startDate, endDate;
+ int startYear;
+- QString buffer = eraEntry.section( QLatin1Char(':'), 2, 2 );
+- if ( buffer.isEmpty() ) {
+- if ( direction == QLatin1Char('-') ) {
++ QString buffer = eraEntry.section(QLatin1Char(':'), 2, 2);
++ if (buffer.isEmpty()) {
++ if (direction == QLatin1Char('-')) {
+ startDate = q->latestValidDate();
+ } else {
+ startDate = q->earliestValidDate();
+ }
+ } else {
+- startDate = q->readDate( buffer, KLocale::IsoFormat );
++ startDate = q->readDate(buffer, KLocale::IsoFormat);
+ }
+- if ( q->isValid( startDate ) ) {
+- startYear = q->year( startDate );
++ if (q->isValid(startDate)) {
++ startYear = q->year(startDate);
+ } else {
+- startYear = eraEntry.section( QLatin1Char(':'), 1, 1 ).toInt(); //Use offset
++ startYear = eraEntry.section(QLatin1Char(':'), 1, 1).toInt(); //Use offset
+ }
+
+- buffer = eraEntry.section( QLatin1Char(':'), 3, 3 );
+- if ( buffer.isEmpty() ) {
+- if ( direction == QLatin1Char('-') ) {
++ buffer = eraEntry.section(QLatin1Char(':'), 3, 3);
++ if (buffer.isEmpty()) {
++ if (direction == QLatin1Char('-')) {
+ endDate = q->earliestValidDate();
+ } else {
+ endDate = q->latestValidDate();
+ }
+ } else {
+- endDate = q->readDate( buffer, KLocale::IsoFormat );
++ endDate = q->readDate(buffer, KLocale::IsoFormat);
+ }
+- addEra( direction.toLatin1(), eraEntry.section( QLatin1Char(':'), 1, 1 ).toInt(),
+- startDate, startYear, endDate, eraEntry.section( QLatin1Char(':'), 4, 4 ),
+- eraEntry.section( QLatin1Char(':'), 5, 5 ), eraEntry.section( QLatin1Char(':'), 6 ) );
++ addEra(direction.toLatin1(), eraEntry.section(QLatin1Char(':'), 1, 1).toInt(),
++ startDate, startYear, endDate, eraEntry.section(QLatin1Char(':'), 4, 4),
++ eraEntry.section(QLatin1Char(':'), 5, 5), eraEntry.section(QLatin1Char(':'), 6));
+ }
+ ++i;
+ eraKey = QString::fromLatin1("Era%1").arg(i);
+ }
+
+- if ( m_eraList->isEmpty() ) {
++ if (m_eraList->isEmpty()) {
+ loadDefaultEraList();
+ }
+ }
+
+-void KCalendarSystemPrivate::addEra( char direction, int offset,
+- const QDate &startDate, int startYear, const QDate &endDate,
+- const QString &name, const QString &shortName,
+- const QString &format )
++void KCalendarSystemPrivate::addEra(char direction, int offset,
++ const QDate &startDate, int startYear, const QDate &endDate,
++ const QString &name, const QString &shortName,
++ const QString &format)
+ {
+ KCalendarEra newEra;
+
+ newEra.m_sequence = m_eraList->count() + 1;
+- if ( direction == '-' ) {
++ if (direction == '-') {
+ newEra.m_direction = -1;
+ } else {
+ newEra.m_direction = 1;
+@@ -980,7 +1018,7 @@ void KCalendarSystemPrivate::addEra( char direction, int offset,
+ newEra.m_shortName = shortName;
+ newEra.m_format = format;
+
+- m_eraList->append( newEra );
++ m_eraList->append(newEra);
+ }
+
+ int KCalendarSystemPrivate::shortYearWindowStartYear() const
+@@ -988,12 +1026,12 @@ int KCalendarSystemPrivate::shortYearWindowStartYear() const
+ return m_shortYearWindowStartYear;
+ }
+
+-int KCalendarSystemPrivate::applyShortYearWindow( int inputYear ) const
++int KCalendarSystemPrivate::applyShortYearWindow(int inputYear) const
+ {
+- if ( inputYear >= 0 && inputYear <= 99 ) {
++ if (inputYear >= 0 && inputYear <= 99) {
+ int shortStartYear = m_shortYearWindowStartYear % 100;
+ int yearOffset = m_shortYearWindowStartYear - shortStartYear;
+- if ( inputYear >= shortStartYear ) {
++ if (inputYear >= shortStartYear) {
+ return inputYear + yearOffset;
+ } else {
+ return inputYear + yearOffset + 100;
+@@ -1003,51 +1041,51 @@ int KCalendarSystemPrivate::applyShortYearWindow( int inputYear ) const
+ }
+ }
+
+-void KCalendarSystemPrivate::loadShortYearWindowStartYear( const KConfigGroup & cg )
++void KCalendarSystemPrivate::loadShortYearWindowStartYear(const KConfigGroup & cg)
+ {
+- // Default to 2000 for backwards compatability
++ // Default to 2000 for backwards compatibility
+ // as that's the old readDate() default value
+ int startYear = 2000;
+- if ( cg.exists() ) {
+- startYear = cg.readEntry( "ShortYearWindowStartYear", 2000 );
++ if (cg.exists()) {
++ startYear = cg.readEntry("ShortYearWindowStartYear", 2000);
+ }
+ m_shortYearWindowStartYear = startYear;
+ }
+
+ KSharedConfig::Ptr KCalendarSystemPrivate::config()
+ {
+- if ( m_config == KSharedConfig::Ptr() ) {
++ if (m_config == KSharedConfig::Ptr()) {
+ return KGlobal::config();
+ } else {
+ return m_config;
+ }
+ }
+
+-void KCalendarSystemPrivate::loadConfig( const QString & calendarType )
++void KCalendarSystemPrivate::loadConfig(const QString & calendarType)
+ {
+- KConfigGroup localeGroup( config(), QString::fromLatin1( "Locale" ) );
+- KConfigGroup calendarGroup = localeGroup.group( QString::fromLatin1( "KCalendarSystem %1" ).arg( calendarType ) );
+- loadEraList( calendarGroup );
+- loadShortYearWindowStartYear( calendarGroup );
++ KConfigGroup localeGroup(config(), QString::fromLatin1("Locale"));
++ KConfigGroup calendarGroup = localeGroup.group(QString::fromLatin1("KCalendarSystem %1").arg(calendarType));
++ loadEraList(calendarGroup);
++ loadShortYearWindowStartYear(calendarGroup);
+ }
+
+
+-KCalendarSystem::KCalendarSystem( const KLocale *locale )
+- : d_ptr( new KCalendarSystemPrivate( this ) )
++KCalendarSystem::KCalendarSystem(const KLocale *locale)
++ : d_ptr(new KCalendarSystemPrivate(this))
+ {
+ d_ptr->m_config = KSharedConfig::Ptr();
+ d_ptr->m_locale = locale;
+ }
+
+-KCalendarSystem::KCalendarSystem( const KSharedConfig::Ptr config, const KLocale *locale )
+- : d_ptr( new KCalendarSystemPrivate( this ) )
++KCalendarSystem::KCalendarSystem(const KSharedConfig::Ptr config, const KLocale *locale)
++ : d_ptr(new KCalendarSystemPrivate(this))
+ {
+ d_ptr->m_config = config;
+ d_ptr->m_locale = locale;
+ }
+
+-KCalendarSystem::KCalendarSystem( KCalendarSystemPrivate &dd, const KSharedConfig::Ptr config, const KLocale *locale )
+- : d_ptr( &dd )
++KCalendarSystem::KCalendarSystem(KCalendarSystemPrivate &dd, const KSharedConfig::Ptr config, const KLocale *locale)
++ : d_ptr(&dd)
+ {
+ d_ptr->m_config = config;
+ d_ptr->m_locale = locale;
+@@ -1061,7 +1099,7 @@ KCalendarSystem::~KCalendarSystem()
+ // NOT VIRTUAL - If override needed use shared-d
+ KLocale::CalendarSystem KCalendarSystem::calendarSystem() const
+ {
+- Q_D( const KCalendarSystem );
++ Q_D(const KCalendarSystem);
+
+ return d->calendarSystem();
+ }
+@@ -1069,14 +1107,14 @@ KLocale::CalendarSystem KCalendarSystem::calendarSystem() const
+ // NOT VIRTUAL - If override needed use shared-d
+ QString KCalendarSystem::calendarLabel() const
+ {
+- return KCalendarSystem::calendarLabel( calendarSystem() );
++ return KCalendarSystem::calendarLabel(calendarSystem());
+ }
+
+ // Dummy version using Gregorian as an example
+ // This method MUST be re-implemented in any new Calendar System
+ QDate KCalendarSystem::epoch() const
+ {
+- return QDate::fromJulianDay( 38 );
++ return QDate::fromJulianDay(38);
+ }
+
+ QDate KCalendarSystem::earliestValidDate() const
+@@ -1089,23 +1127,23 @@ QDate KCalendarSystem::earliestValidDate() const
+ QDate KCalendarSystem::latestValidDate() const
+ {
+ // Default to Gregorian 9999-12-31
+- return QDate::fromJulianDay( 5373484 );
++ return QDate::fromJulianDay(5373484);
+ }
+
+-bool KCalendarSystem::isValid( int year, int month, int day ) const
++bool KCalendarSystem::isValid(int year, int month, int day) const
+ {
+- Q_D( const KCalendarSystem );
++ Q_D(const KCalendarSystem);
+
+- if ( year < d->earliestValidYear() || year > d->latestValidYear() ||
+- ( !d->hasYearZero() && year == 0 ) ) {
++ if (year < d->earliestValidYear() || year > d->latestValidYear() ||
++ (!d->hasYearZero() && year == 0)) {
+ return false;
+ }
+
+- if ( month < 1 || month > d->monthsInYear( year ) ) {
++ if (month < 1 || month > d->monthsInYear(year)) {
+ return false;
+ }
+
+- if ( day < 1 || day > d->daysInMonth( year, month ) ) {
++ if (day < 1 || day > d->daysInMonth(year, month)) {
+ return false;
+ }
+
+@@ -1113,59 +1151,59 @@ bool KCalendarSystem::isValid( int year, int month, int day ) const
+ }
+
+ // NOT VIRTUAL - If override needed use shared-d
+-bool KCalendarSystem::isValid( int year, int dayOfYear ) const
++bool KCalendarSystem::isValid(int year, int dayOfYear) const
+ {
+- Q_D( const KCalendarSystem );
++ Q_D(const KCalendarSystem);
+
+- return ( isValid( year, 1, 1 ) && dayOfYear > 0 && dayOfYear <= d->daysInYear( year ) );
++ return (isValid(year, 1, 1) && dayOfYear > 0 && dayOfYear <= d->daysInYear(year));
+ }
+
+ // NOT VIRTUAL - If override needed use shared-d
+-bool KCalendarSystem::isValid( const QString &eraName, int yearInEra, int month, int day ) const
++bool KCalendarSystem::isValid(const QString &eraName, int yearInEra, int month, int day) const
+ {
+- Q_D( const KCalendarSystem );
++ Q_D(const KCalendarSystem);
+
+- KCalendarEra era = d->era( eraName, yearInEra );
+- return ( era.isValid() && isValid( era.year( yearInEra ), month, day ) );
++ KCalendarEra era = d->era(eraName, yearInEra);
++ return (era.isValid() && isValid(era.year(yearInEra), month, day));
+ }
+
+ // NOT VIRTUAL - If override needed use shared-d
+-bool KCalendarSystem::isValidIsoWeekDate( int year, int isoWeekNumber, int dayOfIsoWeek ) const
++bool KCalendarSystem::isValidIsoWeekDate(int year, int isoWeekNumber, int dayOfIsoWeek) const
+ {
+- Q_D( const KCalendarSystem );
++ Q_D(const KCalendarSystem);
+
+ //Tests Year value in standard YMD isValid()
+- if ( !isValid( year, 1, 1 ) ) {
++ if (!isValid(year, 1, 1)) {
+ return false;
+ }
+
+ //Test Week Number falls in valid range for this year
+- int weeksInThisYear = weeksInYear( year );
+- if ( isoWeekNumber < 1 || isoWeekNumber > weeksInThisYear ) {
++ int weeksInThisYear = weeksInYear(year);
++ if (isoWeekNumber < 1 || isoWeekNumber > weeksInThisYear) {
+ return false;
+ }
+
+ //Test Day of Week Number falls in valid range
+- if ( dayOfIsoWeek < 1 || dayOfIsoWeek > d->daysInWeek() ) {
++ if (dayOfIsoWeek < 1 || dayOfIsoWeek > d->daysInWeek()) {
+ return false;
+ }
+
+ //If not in earliest or latest years then all OK
+ //Otherwise need to check don't fall into previous or next year that would be invalid
+- if ( year == d->earliestValidYear() && isoWeekNumber == 1 ) {
++ if (year == d->earliestValidYear() && isoWeekNumber == 1) {
+ //If firstDayOfYear falls on or before Thursday then firstDayOfYear falls in week 1 this
+ //year and if wanted dayOfIsoWeek falls before firstDayOfYear then falls in previous year
+ //and so in invalid year
+- int dowFirstDay = dayOfWeek( d->firstDayOfYear( year ) );
+- if ( dowFirstDay <= 4 && dayOfIsoWeek < dowFirstDay ) {
++ int dowFirstDay = dayOfWeek(d->firstDayOfYear(year));
++ if (dowFirstDay <= 4 && dayOfIsoWeek < dowFirstDay) {
+ return false;
+ }
+- } else if ( year == d->latestValidYear() && isoWeekNumber == weeksInThisYear ) {
++ } else if (year == d->latestValidYear() && isoWeekNumber == weeksInThisYear) {
+ //If lastDayOfYear falls on or after Thursday then lastDayOfYear falls in last week this
+ //year and if wanted dayOfIsoWeek falls after lastDayOfYear then falls in next year
+ //and so in invalid year
+- int dowLastDay = dayOfWeek( d->lastDayOfYear( year ) );
+- if ( dowLastDay >= 4 && dayOfIsoWeek > dowLastDay ) {
++ int dowLastDay = dayOfWeek(d->lastDayOfYear(year));
++ if (dowLastDay >= 4 && dayOfIsoWeek > dowLastDay) {
+ return false;
+ }
+ }
+@@ -1173,26 +1211,26 @@ bool KCalendarSystem::isValidIsoWeekDate( int year, int isoWeekNumber, int dayOf
+ return true;
+ }
+
+-bool KCalendarSystem::isValid( const QDate &date ) const
++bool KCalendarSystem::isValid(const QDate &date) const
+ {
+- if ( date.isNull() || date < earliestValidDate() || date > latestValidDate() ) {
++ if (date.isNull() || date < earliestValidDate() || date > latestValidDate()) {
+ return false;
+ }
+ return true;
+ }
+
+-bool KCalendarSystem::setDate( QDate &date, int year, int month, int day ) const
++bool KCalendarSystem::setDate(QDate &date, int year, int month, int day) const
+ {
+- Q_D( const KCalendarSystem );
++ Q_D(const KCalendarSystem);
+
+ date = d->invalidDate();
+
+- if ( isValid( year, month, day ) ) {
++ if (isValid(year, month, day)) {
+ int jd;
+- dateToJulianDay( year, month, day, jd );
+- QDate calcDate = QDate::fromJulianDay( jd );
++ dateToJulianDay(year, month, day, jd);
++ QDate calcDate = QDate::fromJulianDay(jd);
+
+- if ( isValid( calcDate ) ) {
++ if (isValid(calcDate)) {
+ date = calcDate;
+ return true;
+ }
+@@ -1202,17 +1240,17 @@ bool KCalendarSystem::setDate( QDate &date, int year, int month, int day ) const
+ }
+
+ // NOT VIRTUAL - If override needed use shared-d
+-bool KCalendarSystem::setDate( QDate &date, int year, int dayOfYear ) const
++bool KCalendarSystem::setDate(QDate &date, int year, int dayOfYear) const
+ {
+- Q_D( const KCalendarSystem );
++ Q_D(const KCalendarSystem);
+
+ date = d->invalidDate();
+
+- if ( isValid( year, dayOfYear ) ) {
++ if (isValid(year, dayOfYear)) {
+ int jd;
+- dateToJulianDay( year, 1, 1, jd );
+- QDate calcDate = QDate::fromJulianDay( jd + dayOfYear - 1 );
+- if ( isValid( calcDate ) ) {
++ dateToJulianDay(year, 1, 1, jd);
++ QDate calcDate = QDate::fromJulianDay(jd + dayOfYear - 1);
++ if (isValid(calcDate)) {
+ date = calcDate;
+ return true;
+ }
+@@ -1222,35 +1260,35 @@ bool KCalendarSystem::setDate( QDate &date, int year, int dayOfYear ) const
+ }
+
+ // NOT VIRTUAL - If override needed use shared-d
+-bool KCalendarSystem::setDate( QDate &date, QString eraName, int yearInEra, int month, int day ) const
++bool KCalendarSystem::setDate(QDate &date, QString eraName, int yearInEra, int month, int day) const
+ {
+- Q_D( const KCalendarSystem );
++ Q_D(const KCalendarSystem);
+
+- KCalendarEra era = d->era( eraName, yearInEra );
+- return ( era.isValid() && setDate( date, era.year( yearInEra ), month, day ) );
++ KCalendarEra era = d->era(eraName, yearInEra);
++ return (era.isValid() && setDate(date, era.year(yearInEra), month, day));
+ }
+
+ // NOT VIRTUAL - If override needed use shared-d
+-bool KCalendarSystem::setDateIsoWeek( QDate &date, int year, int isoWeekNumber, int dayOfIsoWeek ) const
++bool KCalendarSystem::setDateIsoWeek(QDate &date, int year, int isoWeekNumber, int dayOfIsoWeek) const
+ {
+- Q_D( const KCalendarSystem );
++ Q_D(const KCalendarSystem);
+
+ date = d->invalidDate();
+
+- if ( isValidIsoWeekDate( year, isoWeekNumber, dayOfIsoWeek ) ) {
++ if (isValidIsoWeekDate(year, isoWeekNumber, dayOfIsoWeek)) {
+
+- QDate calcDate = d->firstDayOfYear( year );
+- int dowFirstDayOfYear = dayOfWeek( calcDate );
++ QDate calcDate = d->firstDayOfYear(year);
++ int dowFirstDayOfYear = dayOfWeek(calcDate);
+
+- int daysToAdd = ( d->daysInWeek() * ( isoWeekNumber - 1 ) ) + dayOfIsoWeek;
++ int daysToAdd = (d->daysInWeek() * (isoWeekNumber - 1)) + dayOfIsoWeek;
+
+- if ( dowFirstDayOfYear <= 4 ) {
+- calcDate = calcDate.addDays( daysToAdd - dowFirstDayOfYear );
++ if (dowFirstDayOfYear <= 4) {
++ calcDate = calcDate.addDays(daysToAdd - dowFirstDayOfYear);
+ } else {
+- calcDate = calcDate.addDays( daysInWeek( calcDate ) + daysToAdd - dowFirstDayOfYear );
++ calcDate = calcDate.addDays(daysInWeek(calcDate) + daysToAdd - dowFirstDayOfYear);
+ }
+
+- if ( isValid( calcDate ) ) {
++ if (isValid(calcDate)) {
+ date = calcDate;
+ return true;
+ }
+@@ -1260,42 +1298,42 @@ bool KCalendarSystem::setDateIsoWeek( QDate &date, int year, int isoWeekNumber,
+ }
+
+ // Deprecated
+-bool KCalendarSystem::setYMD( QDate &date, int year, int month, int day ) const
++bool KCalendarSystem::setYMD(QDate &date, int year, int month, int day) const
+ {
+- return setDate( date, year, month, day );
++ return setDate(date, year, month, day);
+ }
+
+ // NOT VIRTUAL - If override needed use shared-d
+-void KCalendarSystem::getDate( const QDate date, int *year, int *month, int *day ) const
++void KCalendarSystem::getDate(const QDate date, int *year, int *month, int *day) const
+ {
+ int y, m, d;
+
+- if ( isValid( date ) ) {
+- julianDayToDate( date.toJulianDay(), y, m, d );
++ if (isValid(date)) {
++ julianDayToDate(date.toJulianDay(), y, m, d);
+ } else {
+ y = 0; // How do you denote invalid year when we support -ve years?
+ m = 0;
+ d = 0;
+ }
+
+- if ( year ) {
++ if (year) {
+ *year = y;
+ }
+- if ( month ) {
++ if (month) {
+ *month = m;
+ }
+- if ( day ) {
++ if (day) {
+ *day = d;
+ }
+
+ }
+
+-int KCalendarSystem::year( const QDate &date ) const
++int KCalendarSystem::year(const QDate &date) const
+ {
+- if ( isValid( date ) ) {
++ if (isValid(date)) {
+ int year, month, day;
+
+- julianDayToDate( date.toJulianDay(), year, month, day );
++ julianDayToDate(date.toJulianDay(), year, month, day);
+
+ return year;
+ }
+@@ -1303,12 +1341,12 @@ int KCalendarSystem::year( const QDate &date ) const
+ return 0; // How do you denote invalid year when we support -ve years?
+ }
+
+-int KCalendarSystem::month( const QDate &date ) const
++int KCalendarSystem::month(const QDate &date) const
+ {
+- if ( isValid( date ) ) {
++ if (isValid(date)) {
+ int year, month, day;
+
+- julianDayToDate( date.toJulianDay(), year, month, day );
++ julianDayToDate(date.toJulianDay(), year, month, day);
+
+ return month;
+ }
+@@ -1316,12 +1354,12 @@ int KCalendarSystem::month( const QDate &date ) const
+ return 0;
+ }
+
+-int KCalendarSystem::day( const QDate &date ) const
++int KCalendarSystem::day(const QDate &date) const
+ {
+- if ( isValid( date ) ) {
++ if (isValid(date)) {
+ int year, month, day;
+
+- julianDayToDate( date.toJulianDay(), year, month, day );
++ julianDayToDate(date.toJulianDay(), year, month, day);
+
+ return day;
+ }
+@@ -1330,15 +1368,15 @@ int KCalendarSystem::day( const QDate &date ) const
+ }
+
+ // NOT VIRTUAL - If override needed use shared-d
+-QString KCalendarSystem::eraName( const QDate &date, StringFormat format ) const
++QString KCalendarSystem::eraName(const QDate &date, StringFormat format) const
+ {
+- Q_D( const KCalendarSystem );
++ Q_D(const KCalendarSystem);
+
+- if ( isValid( date ) ) {
+- if ( format == LongFormat ) {
+- return d->era( date ).name( KLocale::LongName );
++ if (isValid(date)) {
++ if (format == LongFormat) {
++ return d->era(date).name(KLocale::LongName);
+ } else {
+- return d->era( date ).name( KLocale::ShortName );
++ return d->era(date).name(KLocale::ShortName);
+ }
+ }
+
+@@ -1346,25 +1384,25 @@ QString KCalendarSystem::eraName( const QDate &date, StringFormat format ) const
+ }
+
+ // NOT VIRTUAL - If override needed use shared-d
+-QString KCalendarSystem::eraYear( const QDate &date, StringFormat format ) const
++QString KCalendarSystem::eraYear(const QDate &date, StringFormat format) const
+ {
+- Q_UNUSED( format )
+- Q_D( const KCalendarSystem );
++ Q_UNUSED(format)
++ Q_D(const KCalendarSystem);
+
+- if ( isValid( date ) ) {
+- return formatDate( date, d->era( date ).format() );
++ if (isValid(date)) {
++ return formatDate(date, d->era(date).format());
+ }
+
+ return QString();
+ }
+
+ // NOT VIRTUAL - If override needed use shared-d
+-int KCalendarSystem::yearInEra( const QDate &date ) const
++int KCalendarSystem::yearInEra(const QDate &date) const
+ {
+- Q_D( const KCalendarSystem );
++ Q_D(const KCalendarSystem);
+
+- if ( isValid( date ) ) {
+- return d->era( date ).yearInEra( year( date ) );
++ if (isValid(date)) {
++ return d->era(date).yearInEra(year(date));
+ }
+
+ return -1;
+@@ -1373,48 +1411,48 @@ int KCalendarSystem::yearInEra( const QDate &date ) const
+ // NOT VIRTUAL - If override needed use shared-d
+ QList<KCalendarEra> *KCalendarSystem::eraList() const
+ {
+- Q_D( const KCalendarSystem );
++ Q_D(const KCalendarSystem);
+
+ return d->eraList();
+ }
+
+ // NOT VIRTUAL - If override needed use shared-d
+-KCalendarEra KCalendarSystem::era( const QDate &eraDate ) const
++KCalendarEra KCalendarSystem::era(const QDate &eraDate) const
+ {
+- Q_D( const KCalendarSystem );
++ Q_D(const KCalendarSystem);
+
+- return d->era( eraDate );
++ return d->era(eraDate);
+ }
+
+ // NOT VIRTUAL - If override needed use shared-d
+-KCalendarEra KCalendarSystem::era( const QString &eraName, int yearInEra ) const
++KCalendarEra KCalendarSystem::era(const QString &eraName, int yearInEra) const
+ {
+- Q_D( const KCalendarSystem );
++ Q_D(const KCalendarSystem);
+
+- return d->era( eraName, yearInEra );
++ return d->era(eraName, yearInEra);
+ }
+
+-QDate KCalendarSystem::addYears( const QDate &date, int numYears ) const
++QDate KCalendarSystem::addYears(const QDate &date, int numYears) const
+ {
+- Q_D( const KCalendarSystem );
++ Q_D(const KCalendarSystem);
+
+- if ( isValid( date ) ) {
++ if (isValid(date)) {
+
+ int originalYear, originalMonth, originalDay;
+- julianDayToDate( date.toJulianDay(), originalYear, originalMonth, originalDay );
++ julianDayToDate(date.toJulianDay(), originalYear, originalMonth, originalDay);
+
+- int newYear = d->addYears( originalYear, numYears );
++ int newYear = d->addYears(originalYear, numYears);
+ int newMonth = originalMonth;
+ int newDay = originalDay;
+
+ //Adjust day number if new month has fewer days than old month
+- int daysInNewMonth = d->daysInMonth( newYear, newMonth );
+- if ( daysInNewMonth < originalDay ) {
++ int daysInNewMonth = d->daysInMonth(newYear, newMonth);
++ if (daysInNewMonth < originalDay) {
+ newDay = daysInNewMonth;
+ }
+
+ QDate newDate;
+- setDate( newDate, newYear, newMonth, newDay );
++ setDate(newDate, newYear, newMonth, newDay);
+ return newDate;
+
+ }
+@@ -1422,38 +1460,38 @@ QDate KCalendarSystem::addYears( const QDate &date, int numYears ) const
+ return d->invalidDate();
+ }
+
+-QDate KCalendarSystem::addMonths( const QDate &date, int numMonths ) const
++QDate KCalendarSystem::addMonths(const QDate &date, int numMonths) const
+ {
+- Q_D( const KCalendarSystem );
++ Q_D(const KCalendarSystem);
+
+- if ( isValid( date ) ) {
++ if (isValid(date)) {
+
+ int originalYear, originalMonth, originalDay;
+- julianDayToDate( date.toJulianDay(), originalYear, originalMonth, originalDay );
++ julianDayToDate(date.toJulianDay(), originalYear, originalMonth, originalDay);
+
+- int monthsInOriginalYear = d->monthsInYear( originalYear );
++ int monthsInOriginalYear = d->monthsInYear(originalYear);
+
+- int newYear = d->addYears( originalYear, ( originalMonth + numMonths ) / monthsInOriginalYear );
+- int newMonth = ( originalMonth + numMonths ) % monthsInOriginalYear;
++ int newYear = d->addYears(originalYear, (originalMonth + numMonths) / monthsInOriginalYear);
++ int newMonth = (originalMonth + numMonths) % monthsInOriginalYear;
+ int newDay = originalDay;
+
+- if ( newMonth == 0 ) {
+- newYear = d->addYears( newYear, - 1 );
++ if (newMonth == 0) {
++ newYear = d->addYears(newYear, - 1);
+ newMonth = monthsInOriginalYear;
+ }
+- if ( newMonth < 0 ) {
+- newYear = d->addYears( newYear, - 1 );
++ if (newMonth < 0) {
++ newYear = d->addYears(newYear, - 1);
+ newMonth = newMonth + monthsInOriginalYear;
+ }
+
+ //Adjust day number if new month has fewer days than old month
+- int daysInNewMonth = d->daysInMonth( newYear, newMonth );
+- if ( daysInNewMonth < originalDay ) {
++ int daysInNewMonth = d->daysInMonth(newYear, newMonth);
++ if (daysInNewMonth < originalDay) {
+ newDay = daysInNewMonth;
+ }
+
+ QDate newDate;
+- setDate( newDate, newYear, newMonth, newDay );
++ setDate(newDate, newYear, newMonth, newDay);
+ return newDate;
+
+ }
+@@ -1461,15 +1499,15 @@ QDate KCalendarSystem::addMonths( const QDate &date, int numMonths ) const
+ return d->invalidDate();
+ }
+
+-QDate KCalendarSystem::addDays( const QDate &date, int numDays ) const
++QDate KCalendarSystem::addDays(const QDate &date, int numDays) const
+ {
+- Q_D( const KCalendarSystem );
++ Q_D(const KCalendarSystem);
+
+ // QDate only holds a uint and has no boundary checking in addDays(), so we need to check
+- if ( isValid( date ) && (long) date.toJulianDay() + (long) numDays > 0 ) {
++ if (isValid(date) && (long) date.toJulianDay() + (long) numDays > 0) {
+ // QDate adds straight to jd
+- QDate temp = date.addDays( numDays );
+- if ( isValid( temp ) ) {
++ QDate temp = date.addDays(numDays);
++ if (isValid(temp)) {
+ return temp;
+ }
+ }
+@@ -1478,519 +1516,517 @@ QDate KCalendarSystem::addDays( const QDate &date, int numDays ) const
+ }
+
+ // NOT VIRTUAL - Uses shared-d instead
+-void KCalendarSystem::dateDifference( const QDate &fromDate, const QDate &toDate,
+- int *yearsDiff, int *monthsDiff, int *daysDiff, int *direction ) const
++void KCalendarSystem::dateDifference(const QDate &fromDate, const QDate &toDate,
++ int *yearsDiff, int *monthsDiff, int *daysDiff, int *direction) const
+ {
+- Q_D( const KCalendarSystem );
++ Q_D(const KCalendarSystem);
+
+- if ( isValid( fromDate ) && isValid( toDate ) ) {
+- d->dateDifference( fromDate, toDate, yearsDiff, monthsDiff, daysDiff, direction );
++ if (isValid(fromDate) && isValid(toDate)) {
++ d->dateDifference(fromDate, toDate, yearsDiff, monthsDiff, daysDiff, direction);
+ }
+ }
+
+ // NOT VIRTUAL - Uses shared-d instead
+-int KCalendarSystem::yearsDifference( const QDate &fromDate, const QDate &toDate ) const
++int KCalendarSystem::yearsDifference(const QDate &fromDate, const QDate &toDate) const
+ {
+- Q_D( const KCalendarSystem );
++ Q_D(const KCalendarSystem);
+
+- if ( isValid( fromDate ) && isValid( toDate ) ) {
+- return d->yearsDifference( fromDate, toDate );
++ if (isValid(fromDate) && isValid(toDate)) {
++ return d->yearsDifference(fromDate, toDate);
+ }
+
+ return 0;
+ }
+
+ // NOT VIRTUAL - Uses shared-d instead
+-int KCalendarSystem::monthsDifference( const QDate &fromDate, const QDate &toDate ) const
++int KCalendarSystem::monthsDifference(const QDate &fromDate, const QDate &toDate) const
+ {
+- Q_D( const KCalendarSystem );
++ Q_D(const KCalendarSystem);
+
+- if ( isValid( fromDate ) && isValid( toDate ) ) {
+- return d->monthsDifference( fromDate, toDate );
++ if (isValid(fromDate) && isValid(toDate)) {
++ return d->monthsDifference(fromDate, toDate);
+ }
+
+ return 0;
+ }
+
+ // NOT VIRTUAL - Uses shared-d instead
+-int KCalendarSystem::daysDifference( const QDate &fromDate, const QDate &toDate ) const
++int KCalendarSystem::daysDifference(const QDate &fromDate, const QDate &toDate) const
+ {
+- if ( isValid( fromDate ) && isValid( toDate ) ) {
++ if (isValid(fromDate) && isValid(toDate)) {
+ return toDate.toJulianDay() - fromDate.toJulianDay();
+ }
+
+ return 0;
+ }
+
+-int KCalendarSystem::monthsInYear( const QDate &date ) const
++int KCalendarSystem::monthsInYear(const QDate &date) const
+ {
+- Q_D( const KCalendarSystem );
++ Q_D(const KCalendarSystem);
+
+- if ( isValid( date ) ) {
+- return d->monthsInYear( year( date ) );
++ if (isValid(date)) {
++ return d->monthsInYear(year(date));
+ }
+
+ return -1;
+ }
+
+ // NOT VIRTUAL - Uses shared-d instead
+-int KCalendarSystem::monthsInYear( int year ) const
++int KCalendarSystem::monthsInYear(int year) const
+ {
+- Q_D( const KCalendarSystem );
++ Q_D(const KCalendarSystem);
+
+- if ( isValid( year, 1, 1 ) ) {
+- return d->monthsInYear( year );
++ if (isValid(year, 1, 1)) {
++ return d->monthsInYear(year);
+ }
+
+ return -1;
+ }
+
+-int KCalendarSystem::weeksInYear( const QDate &date ) const
++int KCalendarSystem::weeksInYear(const QDate &date) const
+ {
+- if ( isValid( date ) ) {
+- return weeksInYear( year( date ) );
+- }
++ return weeksInYear(date, KLocale::DefaultWeekNumber);
++}
+
+- return -1;
++int KCalendarSystem::weeksInYear(int year) const
++{
++ return weeksInYear(year, KLocale::DefaultWeekNumber);
+ }
+
+-int KCalendarSystem::weeksInYear( int year ) const
++// NOT VIRTUAL - Uses shared-d instead
++int KCalendarSystem::weeksInYear(const QDate &date, KLocale::WeekNumberSystem weekNumberSystem) const
+ {
+- return weeksInYear( year, KLocale::DefaultWeekNumber );
++ Q_D(const KCalendarSystem);
++
++ if (isValid(date)) {
++ return d->weeksInYear(year(date), weekNumberSystem);
++ }
++
++ return -1;
+ }
+
+ // NOT VIRTUAL - Uses shared-d instead
+-int KCalendarSystem::weeksInYear( int year, KLocale::WeekNumberSystem weekNumberSystem ) const
++int KCalendarSystem::weeksInYear(int year, KLocale::WeekNumberSystem weekNumberSystem) const
+ {
+- Q_D( const KCalendarSystem );
++ Q_D(const KCalendarSystem);
+
+- if ( isValid( year, 1, 1 ) ) {
+- return d->weeksInYear( year, weekNumberSystem );
++ if (isValid(year, 1, 1)) {
++ return d->weeksInYear(year, weekNumberSystem);
+ }
+
+ return -1;
+ }
+
+-int KCalendarSystem::daysInYear( const QDate &date ) const
++int KCalendarSystem::daysInYear(const QDate &date) const
+ {
+- Q_D( const KCalendarSystem );
++ Q_D(const KCalendarSystem);
+
+- if ( isValid( date ) ) {
+- return d->daysInYear( year( date ) );
++ if (isValid(date)) {
++ return d->daysInYear(year(date));
+ }
+
+ return -1;
+ }
+
+ // NOT VIRTUAL - Uses shared-d instead
+-int KCalendarSystem::daysInYear( int year ) const
++int KCalendarSystem::daysInYear(int year) const
+ {
+- Q_D( const KCalendarSystem );
++ Q_D(const KCalendarSystem);
+
+- if ( isValid( year, 1, 1 ) ) {
+- return d->daysInYear( year );
++ if (isValid(year, 1, 1)) {
++ return d->daysInYear(year);
+ }
+
+ return -1;
+ }
+
+-int KCalendarSystem::daysInMonth( const QDate &date ) const
++int KCalendarSystem::daysInMonth(const QDate &date) const
+ {
+- Q_D( const KCalendarSystem );
++ Q_D(const KCalendarSystem);
+
+- if ( isValid( date ) ) {
++ if (isValid(date)) {
+ int year, month;
+- getDate( date, &year, &month, 0 );
+- return d->daysInMonth( year, month );
++ getDate(date, &year, &month, 0);
++ return d->daysInMonth(year, month);
+ }
+
+ return -1;
+ }
+
+ // NOT VIRTUAL - Uses shared-d instead
+-int KCalendarSystem::daysInMonth( int year, int month ) const
++int KCalendarSystem::daysInMonth(int year, int month) const
+ {
+- Q_D( const KCalendarSystem );
++ Q_D(const KCalendarSystem);
+
+- if ( isValid( year, 1, 1 ) ) {
+- return d->daysInMonth( year, month );
++ if (isValid(year, 1, 1)) {
++ return d->daysInMonth(year, month);
+ }
+
+ return -1;
+ }
+
+-int KCalendarSystem::daysInWeek( const QDate &date ) const
++int KCalendarSystem::daysInWeek(const QDate &date) const
+ {
+- Q_UNUSED( date )
+- Q_D( const KCalendarSystem );
++ Q_UNUSED(date)
++ Q_D(const KCalendarSystem);
+ return d->daysInWeek();
+ }
+
+-int KCalendarSystem::dayOfYear( const QDate &date ) const
++int KCalendarSystem::dayOfYear(const QDate &date) const
+ {
+- Q_D( const KCalendarSystem );
++ Q_D(const KCalendarSystem);
+
+- if ( isValid( date ) ) {
+- return d->dayOfYear( date );
++ if (isValid(date)) {
++ return d->dayOfYear(date);
+ }
+
+ return -1;
+ }
+
+-int KCalendarSystem::dayOfWeek( const QDate &date ) const
++int KCalendarSystem::dayOfWeek(const QDate &date) const
+ {
+- Q_D( const KCalendarSystem );
++ Q_D(const KCalendarSystem);
+
+- if ( isValid( date ) ) {
+- return d->dayOfWeek( date );
++ if (isValid(date)) {
++ return d->dayOfWeek(date);
+ }
+
+ return -1;
+ }
+
+-int KCalendarSystem::weekNumber( const QDate &date, int *yearNum ) const
++int KCalendarSystem::weekNumber(const QDate &date, int *yearNum) const
+ {
+- return week( date, KLocale::IsoWeekNumber, yearNum );
++ return week(date, KLocale::IsoWeekNumber, yearNum);
+ }
+
+ // NOT VIRTUAL - Uses shared-d instead
+-int KCalendarSystem::week( const QDate &date, int *yearNum ) const
++int KCalendarSystem::week(const QDate &date, int *yearNum) const
+ {
+- return week( date, KLocale::DefaultWeekNumber, yearNum );
++ return week(date, KLocale::DefaultWeekNumber, yearNum);
+ }
+
+ // NOT VIRTUAL - Uses shared-d instead
+-int KCalendarSystem::week( const QDate &date, KLocale::WeekNumberSystem weekNumberSystem, int *yearNum ) const
++int KCalendarSystem::week(const QDate &date, KLocale::WeekNumberSystem weekNumberSystem, int *yearNum) const
+ {
+- Q_D( const KCalendarSystem );
++ Q_D(const KCalendarSystem);
+
+- if ( isValid( date ) ) {
+- return d->week( date, weekNumberSystem, yearNum );
++ if (isValid(date)) {
++ return d->week(date, weekNumberSystem, yearNum);
+ }
+
+ return -1;
+ }
+
+-bool KCalendarSystem::isLeapYear( int year ) const
++bool KCalendarSystem::isLeapYear(int year) const
+ {
+- Q_D( const KCalendarSystem );
++ Q_D(const KCalendarSystem);
+
+- if ( isValid( year, 1, 1 ) ) {
+- return d->isLeapYear( year );
++ if (isValid(year, 1, 1)) {
++ return d->isLeapYear(year);
+ }
+
+ return false;
+ }
+
+-bool KCalendarSystem::isLeapYear( const QDate &date ) const
++bool KCalendarSystem::isLeapYear(const QDate &date) const
+ {
+- Q_D( const KCalendarSystem );
++ Q_D(const KCalendarSystem);
+
+- if ( isValid( date ) ) {
+- return d->isLeapYear( year( date ) );
++ if (isValid(date)) {
++ return d->isLeapYear(year(date));
+ }
+
+ return false;
+ }
+
+ // NOT VIRTUAL - If override needed use shared-d
+-QDate KCalendarSystem::firstDayOfYear( int year ) const
++QDate KCalendarSystem::firstDayOfYear(int year) const
+ {
+- Q_D( const KCalendarSystem );
++ Q_D(const KCalendarSystem);
+
+- if ( isValid( year, 1, 1 ) ) {
+- return d->firstDayOfYear( year );
++ if (isValid(year, 1, 1)) {
++ return d->firstDayOfYear(year);
+ }
+
+ return QDate();
+ }
+
+ // NOT VIRTUAL - If override needed use shared-d
+-QDate KCalendarSystem::lastDayOfYear( int year ) const
++QDate KCalendarSystem::lastDayOfYear(int year) const
+ {
+- Q_D( const KCalendarSystem );
++ Q_D(const KCalendarSystem);
+
+- if ( isValid( year, 1, 1 ) ) {
+- return d->lastDayOfYear( year );
++ if (isValid(year, 1, 1)) {
++ return d->lastDayOfYear(year);
+ }
+
+ return QDate();
+ }
+
+ // NOT VIRTUAL - If override needed use shared-d
+-QDate KCalendarSystem::firstDayOfYear( const QDate &date ) const
++QDate KCalendarSystem::firstDayOfYear(const QDate &date) const
+ {
+- Q_D( const KCalendarSystem );
++ Q_D(const KCalendarSystem);
+
+- if ( isValid( date ) ) {
+- return d->firstDayOfYear( year( date ) );
++ if (isValid(date)) {
++ return d->firstDayOfYear(year(date));
+ }
+
+ return QDate();
+ }
+
+ // NOT VIRTUAL - If override needed use shared-d
+-QDate KCalendarSystem::lastDayOfYear( const QDate &date ) const
++QDate KCalendarSystem::lastDayOfYear(const QDate &date) const
+ {
+- Q_D( const KCalendarSystem );
++ Q_D(const KCalendarSystem);
+
+- if ( isValid( date ) ) {
+- return d->lastDayOfYear( year( date ) );
++ if (isValid(date)) {
++ return d->lastDayOfYear(year(date));
+ }
+
+ return QDate();
+ }
+
+ // NOT VIRTUAL - If override needed use shared-d
+-QDate KCalendarSystem::firstDayOfMonth( int year, int month ) const
++QDate KCalendarSystem::firstDayOfMonth(int year, int month) const
+ {
+- Q_D( const KCalendarSystem );
++ Q_D(const KCalendarSystem);
+
+- if ( isValid( year, month, 1 ) ) {
+- return d->firstDayOfMonth( year, month );
++ if (isValid(year, month, 1)) {
++ return d->firstDayOfMonth(year, month);
+ }
+
+ return QDate();
+ }
+
+ // NOT VIRTUAL - If override needed use shared-d
+-QDate KCalendarSystem::lastDayOfMonth( int year, int month ) const
++QDate KCalendarSystem::lastDayOfMonth(int year, int month) const
+ {
+- Q_D( const KCalendarSystem );
++ Q_D(const KCalendarSystem);
+
+- if ( isValid( year, month, 1 ) ) {
+- return d->lastDayOfMonth( year, month );
++ if (isValid(year, month, 1)) {
++ return d->lastDayOfMonth(year, month);
+ }
+
+ return QDate();
+ }
+
+ // NOT VIRTUAL - If override needed use shared-d
+-QDate KCalendarSystem::firstDayOfMonth( const QDate &date ) const
++QDate KCalendarSystem::firstDayOfMonth(const QDate &date) const
+ {
+- Q_D( const KCalendarSystem );
++ Q_D(const KCalendarSystem);
+
+- if ( isValid( date ) ) {
++ if (isValid(date)) {
+ int year, month;
+- getDate( date, &year, &month, 0 );
+- return d->firstDayOfMonth( year, month );
++ getDate(date, &year, &month, 0);
++ return d->firstDayOfMonth(year, month);
+ }
+
+ return QDate();
+ }
+
+ // NOT VIRTUAL - If override needed use shared-d
+-QDate KCalendarSystem::lastDayOfMonth( const QDate &date ) const
++QDate KCalendarSystem::lastDayOfMonth(const QDate &date) const
+ {
+- Q_D( const KCalendarSystem );
++ Q_D(const KCalendarSystem);
+
+- if ( isValid( date ) ) {
++ if (isValid(date)) {
+ int year, month;
+- getDate( date, &year, &month, 0 );
+- return d->lastDayOfMonth( year, month );
++ getDate(date, &year, &month, 0);
++ return d->lastDayOfMonth(year, month);
+ }
+
+ return QDate();
+ }
+
+-QString KCalendarSystem::monthName( int month, int year, KCalendarSystem::MonthNameFormat format ) const
++QString KCalendarSystem::monthName(int month, int year, KCalendarSystem::MonthNameFormat format) const
+ {
+- Q_D( const KCalendarSystem );
++ Q_D(const KCalendarSystem);
+
+- if ( !isValid( year, month, 1 ) ) {
++ if (!isValid(year, month, 1)) {
+ return QString();
+ }
+
+- if ( format == KCalendarSystem::NarrowName ) {
+- return d->monthName( month, year, KLocale::NarrowName, false );
++ if (format == KCalendarSystem::NarrowName) {
++ return d->monthName(month, year, KLocale::NarrowName, false);
+ }
+
+- if ( format == KCalendarSystem::ShortNamePossessive ) {
+- return d->monthName( month, year, KLocale::ShortName, true );
++ if (format == KCalendarSystem::ShortNamePossessive) {
++ return d->monthName(month, year, KLocale::ShortName, true);
+ }
+
+- if ( format == KCalendarSystem::ShortName ) {
+- return d->monthName( month, year, KLocale::ShortName, false );
++ if (format == KCalendarSystem::ShortName) {
++ return d->monthName(month, year, KLocale::ShortName, false);
+ }
+
+- if ( format == KCalendarSystem::LongNamePossessive ) {
+- return d->monthName( month, year, KLocale::LongName, true );
++ if (format == KCalendarSystem::LongNamePossessive) {
++ return d->monthName(month, year, KLocale::LongName, true);
+ }
+
+ // KCalendarSystem::LongName or any other
+- return d->monthName( month, year, KLocale::LongName, false );
++ return d->monthName(month, year, KLocale::LongName, false);
+ }
+
+-QString KCalendarSystem::monthName( const QDate &date, MonthNameFormat format ) const
++QString KCalendarSystem::monthName(const QDate &date, MonthNameFormat format) const
+ {
+- if ( isValid( date ) ) {
++ if (isValid(date)) {
+ int year, month;
+- getDate( date, &year, &month, 0 );
+- return monthName( month, year, format );
++ getDate(date, &year, &month, 0);
++ return monthName(month, year, format);
+ }
+
+ return QString();
+ }
+
+-QString KCalendarSystem::weekDayName( int weekDay, KCalendarSystem::WeekDayNameFormat format ) const
++QString KCalendarSystem::weekDayName(int weekDay, KCalendarSystem::WeekDayNameFormat format) const
+ {
+- Q_D( const KCalendarSystem );
++ Q_D(const KCalendarSystem);
+
+- if ( weekDay < 1 || weekDay > d->daysInWeek() ) {
++ if (weekDay < 1 || weekDay > d->daysInWeek()) {
+ return QString();
+ }
+
+- if ( format == KCalendarSystem::NarrowDayName ) {
+- return d->weekDayName( weekDay, KLocale::NarrowName );
++ if (format == KCalendarSystem::NarrowDayName) {
++ return d->weekDayName(weekDay, KLocale::NarrowName);
+ }
+
+- if ( format == KCalendarSystem::ShortDayName ) {
+- return d->weekDayName( weekDay, KLocale::ShortName );
++ if (format == KCalendarSystem::ShortDayName) {
++ return d->weekDayName(weekDay, KLocale::ShortName);
+ }
+
+- if ( format == KCalendarSystem::ShortDayName ) {
+- return d->weekDayName( weekDay, KLocale::ShortName );
++ if (format == KCalendarSystem::ShortDayName) {
++ return d->weekDayName(weekDay, KLocale::ShortName);
+ }
+
+- return d->weekDayName( weekDay, KLocale::LongName );
++ return d->weekDayName(weekDay, KLocale::LongName);
+ }
+
+-QString KCalendarSystem::weekDayName( const QDate &date, WeekDayNameFormat format ) const
++QString KCalendarSystem::weekDayName(const QDate &date, WeekDayNameFormat format) const
+ {
+- if ( isValid( date ) ) {
+- return weekDayName( dayOfWeek( date ), format );
++ if (isValid(date)) {
++ return weekDayName(dayOfWeek(date), format);
+ }
+
+ return QString();
+ }
+
+-QString KCalendarSystem::yearString( const QDate &date, StringFormat format ) const
++QString KCalendarSystem::yearString(const QDate &date, StringFormat format) const
+ {
+- if ( format == ShortFormat ) {
+- return formatDate( date, QLatin1String("%y") );
++ if (format == ShortFormat) {
++ return formatDate(date, KLocale::Year, KLocale::ShortNumber);
+ } else {
+- return formatDate( date, QLatin1String("%Y") );
++ return formatDate(date, KLocale::Year, KLocale::LongNumber);
+ }
+ }
+
+-QString KCalendarSystem::monthString( const QDate &date, StringFormat format ) const
++QString KCalendarSystem::monthString(const QDate &date, StringFormat format) const
+ {
+- if ( format == ShortFormat ) {
+- return formatDate( date, QLatin1String("%n") );
++ if (format == ShortFormat) {
++ return formatDate(date, KLocale::Month, KLocale::ShortNumber);
+ } else {
+- return formatDate( date, QLatin1String("%m") );
++ return formatDate(date, KLocale::Month, KLocale::LongNumber);
+ }
+ }
+
+-QString KCalendarSystem::dayString( const QDate &date, StringFormat format ) const
++QString KCalendarSystem::dayString(const QDate &date, StringFormat format) const
+ {
+- if ( format == ShortFormat ) {
+- return formatDate( date, QLatin1String("%e") );
++ if (format == ShortFormat) {
++ return formatDate(date, KLocale::Day, KLocale::ShortNumber);
+ } else {
+- return formatDate( date, QLatin1String("%d") );
++ return formatDate(date, KLocale::Day, KLocale::LongNumber);
+ }
+ }
+
+ // NOT VIRTUAL - If override needed use shared-d
+-QString KCalendarSystem::yearInEraString( const QDate &date, StringFormat format ) const
++QString KCalendarSystem::yearInEraString(const QDate &date, StringFormat format) const
+ {
+- if ( format == ShortFormat ) {
+- return formatDate( date, QLatin1String("%Ey") );
++ if (format == ShortFormat) {
++ return formatDate(date, KLocale::YearInEra, KLocale::ShortNumber);
+ } else {
+- return formatDate( date, QLatin1String("%4Ey") );
++ return formatDate(date, KLocale::YearInEra, KLocale::LongNumber);
+ }
+ }
+
+ // NOT VIRTUAL - If override needed use shared-d
+-QString KCalendarSystem::dayOfYearString( const QDate &date, StringFormat format ) const
++QString KCalendarSystem::dayOfYearString(const QDate &date, StringFormat format) const
+ {
+- if ( format == ShortFormat ) {
+- return formatDate( date, QLatin1String("%-j") );
++ if (format == ShortFormat) {
++ return formatDate(date, KLocale::DayOfYear, KLocale::ShortNumber);
+ } else {
+- return formatDate( date, QLatin1String("%j") );
++ return formatDate(date, KLocale::DayOfYear, KLocale::LongNumber);
+ }
+ }
+
+ // NOT VIRTUAL - If override needed use shared-d
+-QString KCalendarSystem::dayOfWeekString( const QDate &date ) const
++QString KCalendarSystem::dayOfWeekString(const QDate &date) const
+ {
+- return formatDate( date, QLatin1String("%-u") );
++ return formatDate(date, KLocale::DayOfWeek, KLocale::ShortNumber);
+ }
+
+ // NOT VIRTUAL - If override needed use shared-d
+-QString KCalendarSystem::weekNumberString( const QDate &date, StringFormat format ) const
++QString KCalendarSystem::weekNumberString(const QDate &date, StringFormat format) const
+ {
+- if ( format == ShortFormat ) {
+- return formatDate( date, QLatin1String("%-V") );
++ if (format == ShortFormat) {
++ return formatDate(date, KLocale::Week, KLocale::ShortNumber);
+ } else {
+- return formatDate( date, QLatin1String("%V") );
++ return formatDate(date, KLocale::Week, KLocale::LongNumber);
+ }
+ }
+
+ // NOT VIRTUAL - If override needed use shared-d
+-QString KCalendarSystem::monthsInYearString( const QDate &date, StringFormat format ) const
++QString KCalendarSystem::monthsInYearString(const QDate &date, StringFormat format) const
+ {
+- Q_D( const KCalendarSystem );
+-
+- if ( format == ShortFormat ) {
+- return d->stringFromInteger( monthsInYear( date ), 0, QLatin1Char('0') );
++ if (format == ShortFormat) {
++ return formatDate(date, KLocale::MonthsInYear, KLocale::ShortNumber);
+ } else {
+- return d->stringFromInteger( monthsInYear( date ), 2, QLatin1Char('0') );
++ return formatDate(date, KLocale::MonthsInYear, KLocale::LongNumber);
+ }
+ }
+
+ // NOT VIRTUAL - If override needed use shared-d
+-QString KCalendarSystem::weeksInYearString( const QDate &date, StringFormat format ) const
++QString KCalendarSystem::weeksInYearString(const QDate &date, StringFormat format) const
+ {
+- Q_D( const KCalendarSystem );
+-
+- if ( format == ShortFormat ) {
+- return d->stringFromInteger( weeksInYear( date ), 0, QLatin1Char('0') );
++ if (format == ShortFormat) {
++ return formatDate(date, KLocale::WeeksInYear, KLocale::ShortNumber);
+ } else {
+- return d->stringFromInteger( weeksInYear( date ), 2, QLatin1Char('0') );
++ return formatDate(date, KLocale::WeeksInYear, KLocale::LongNumber);
+ }
+ }
+
+ // NOT VIRTUAL - If override needed use shared-d
+-QString KCalendarSystem::daysInYearString( const QDate &date, StringFormat format ) const
++QString KCalendarSystem::daysInYearString(const QDate &date, StringFormat format) const
+ {
+- Q_D( const KCalendarSystem );
+-
+- if ( format == ShortFormat ) {
+- return d->stringFromInteger( daysInYear( date ), 0, QLatin1Char('0') );
++ if (format == ShortFormat) {
++ return formatDate(date, KLocale::DaysInYear, KLocale::ShortNumber);
+ } else {
+- return d->stringFromInteger( daysInYear( date ), 3, QLatin1Char('0') );
++ return formatDate(date, KLocale::DaysInYear, KLocale::LongNumber);
+ }
+ }
+
+ // NOT VIRTUAL - If override needed use shared-d
+-QString KCalendarSystem::daysInMonthString( const QDate &date, StringFormat format ) const
++QString KCalendarSystem::daysInMonthString(const QDate &date, StringFormat format) const
+ {
+- Q_D( const KCalendarSystem );
+-
+- if ( format == ShortFormat ) {
+- return d->stringFromInteger( daysInMonth( date ), 0, QLatin1Char('0') );
++ if (format == ShortFormat) {
++ return formatDate(date, KLocale::DaysInMonth, KLocale::ShortNumber);
+ } else {
+- return d->stringFromInteger( daysInMonth( date ), 2, QLatin1Char('0') );
++ return formatDate(date, KLocale::DaysInMonth, KLocale::LongNumber);
+ }
+ }
+
+ // NOT VIRTUAL - If override needed use shared-d
+-QString KCalendarSystem::daysInWeekString( const QDate &date) const
++QString KCalendarSystem::daysInWeekString(const QDate &date) const
+ {
+- Q_D( const KCalendarSystem );
+- Q_UNUSED( date );
+- return d->stringFromInteger( d->daysInWeek(), 0 );
++ return formatDate(date, KLocale::DaysInWeek, KLocale::ShortNumber);
+ }
+
+-int KCalendarSystem::yearStringToInteger( const QString &yearString, int &readLength ) const
++int KCalendarSystem::yearStringToInteger(const QString &yearString, int &readLength) const
+ {
+- Q_D( const KCalendarSystem );
++ Q_D(const KCalendarSystem);
+
+- QString minus = i18nc( "Negative symbol as used for year numbers, e.g. -5 = 5 BC", "-" );
+- if ( yearString.startsWith( minus ) ) {
+- int value = d->integerFromString( yearString.mid( minus.length() ), 4, readLength );
+- if ( readLength > 0 && value >= 0 ) {
++ QString minus = i18nc("Negative symbol as used for year numbers, e.g. -5 = 5 BC", "-");
++ if (yearString.startsWith(minus)) {
++ int value = d->integerFromString(yearString.mid(minus.length()), 4, readLength);
++ if (readLength > 0 && value >= 0) {
+ readLength = readLength + minus.length();
+ return value * -1;
+ } else {
+@@ -1998,31 +2034,31 @@ int KCalendarSystem::yearStringToInteger( const QString &yearString, int &readLe
+ }
+ }
+
+- return d->integerFromString( yearString, 4, readLength );
++ return d->integerFromString(yearString, 4, readLength);
+ }
+
+-int KCalendarSystem::monthStringToInteger( const QString &monthString, int &readLength ) const
++int KCalendarSystem::monthStringToInteger(const QString &monthString, int &readLength) const
+ {
+- Q_D( const KCalendarSystem );
+- return d->integerFromString( monthString, 2, readLength );
++ Q_D(const KCalendarSystem);
++ return d->integerFromString(monthString, 2, readLength);
+ }
+
+-int KCalendarSystem::dayStringToInteger( const QString &dayString, int &readLength ) const
++int KCalendarSystem::dayStringToInteger(const QString &dayString, int &readLength) const
+ {
+- Q_D( const KCalendarSystem );
+- return d->integerFromString( dayString, 2, readLength );
++ Q_D(const KCalendarSystem);
++ return d->integerFromString(dayString, 2, readLength);
+ }
+
+-QString KCalendarSystem::formatDate( const QDate &fromDate, KLocale::DateFormat toFormat ) const
++QString KCalendarSystem::formatDate(const QDate &fromDate, KLocale::DateFormat toFormat) const
+ {
+- if ( !fromDate.isValid() ) {
++ if (!fromDate.isValid()) {
+ return QString();
+ }
+
+- if ( toFormat == KLocale::FancyShortDate || toFormat == KLocale::FancyLongDate ) {
++ if (toFormat == KLocale::FancyShortDate || toFormat == KLocale::FancyLongDate) {
+ QDate now = KDateTime::currentLocalDate();
+- int daysToNow = fromDate.daysTo( now );
+- switch ( daysToNow ) {
++ int daysToNow = fromDate.daysTo(now);
++ switch (daysToNow) {
+ case 0:
+ return i18n("Today");
+ case 1:
+@@ -2032,47 +2068,47 @@ QString KCalendarSystem::formatDate( const QDate &fromDate, KLocale::DateFormat
+ case 4:
+ case 5:
+ case 6:
+- return weekDayName( fromDate );
++ return weekDayName(fromDate);
+ default:
+ break;
+ }
+ }
+
+- switch ( toFormat ) {
++ switch (toFormat) {
+ case KLocale::LongDate:
+ case KLocale::FancyLongDate:
+- return formatDate( fromDate, locale()->dateFormat() );
++ return formatDate(fromDate, locale()->dateFormat());
+ case KLocale::IsoDate:
+- return formatDate( fromDate, QLatin1String("%Y-%m-%d") );
++ return formatDate(fromDate, QLatin1String("%Y-%m-%d"));
+ case KLocale::IsoWeekDate:
+- return formatDate( fromDate, QLatin1String("%Y-W%V-%u") );
++ return formatDate(fromDate, QLatin1String("%Y-W%V-%u"));
+ case KLocale::IsoOrdinalDate:
+- return formatDate( fromDate, QLatin1String("%Y-%j") );
++ return formatDate(fromDate, QLatin1String("%Y-%j"));
+ case KLocale::ShortDate:
+ case KLocale::FancyShortDate:
+ default:
+- return formatDate( fromDate, locale()->dateFormatShort() );
++ return formatDate(fromDate, locale()->dateFormatShort());
+ }
+
+ }
+
+ // NOT VIRTUAL - If override needed use shared-d
+-QString KCalendarSystem::formatDate( const QDate &fromDate, const QString &toFormat,
+- KLocale::DateTimeFormatStandard standard ) const
++QString KCalendarSystem::formatDate(const QDate &fromDate, const QString &toFormat,
++ KLocale::DateTimeFormatStandard standard) const
+ {
+- return formatDate( fromDate, toFormat, locale()->dateTimeDigitSet(), standard );
++ return formatDate(fromDate, toFormat, locale()->dateTimeDigitSet(), standard);
+ }
+
+ // NOT VIRTUAL - If override needed use shared-d
+-QString KCalendarSystem::formatDate( const QDate &fromDate, const QString &toFormat, KLocale::DigitSet digitSet,
+- KLocale::DateTimeFormatStandard formatStandard ) const
++QString KCalendarSystem::formatDate(const QDate &fromDate, const QString &toFormat, KLocale::DigitSet digitSet,
++ KLocale::DateTimeFormatStandard formatStandard) const
+ {
+- if ( !isValid( fromDate ) || toFormat.isEmpty() ) {
++ if (!isValid(fromDate) || toFormat.isEmpty()) {
+ return QString();
+ }
+
+ KDateTimeFormatter formatter;
+- return formatter.formatDate( fromDate, toFormat, this, locale(), digitSet, formatStandard );
++ return formatter.formatDate(fromDate, toFormat, this, locale(), digitSet, formatStandard);
+ }
+
+ // NOT VIRTUAL - If override needed use shared-d
+@@ -2080,25 +2116,24 @@ QString KCalendarSystem::formatDate(const QDate &date, KLocale::DateTimeComponen
+ KLocale::DateTimeComponentFormat format,
+ KLocale::WeekNumberSystem weekNumberSystem) const
+ {
+- Q_D( const KCalendarSystem );
+- Q_UNUSED( weekNumberSystem );
++ Q_D(const KCalendarSystem);
+
+- switch ( component ) {
++ switch (component) {
+ case KLocale::Year:
+ case KLocale::YearName:
+- switch ( format ) {
++ switch (format) {
+ case KLocale::ShortName:
+ case KLocale::NarrowName:
+ case KLocale::ShortNumber:
+- return yearString(date, KCalendarSystem::ShortFormat);
++ return formatDate(date, QLatin1String("%y"));
+ case KLocale::LongNumber:
+ case KLocale::LongName:
+ case KLocale::DefaultComponentFormat:
+ default:
+- return yearString(date, KCalendarSystem::LongFormat);
++ return formatDate(date, QLatin1String("%Y"));
+ }
+ case KLocale::Month:
+- switch ( format ) {
++ switch (format) {
+ case KLocale::LongName:
+ return monthName(date, KCalendarSystem::LongName);
+ case KLocale::ShortName:
+@@ -2106,14 +2141,14 @@ QString KCalendarSystem::formatDate(const QDate &date, KLocale::DateTimeComponen
+ case KLocale::NarrowName:
+ return monthName(date, KCalendarSystem::NarrowName);
+ case KLocale::LongNumber:
+- return monthString(date, KCalendarSystem::LongFormat);
++ return formatDate(date, QLatin1String("%m"));
+ case KLocale::ShortNumber:
+ case KLocale::DefaultComponentFormat:
+ default:
+- return monthString(date, KCalendarSystem::ShortFormat);
++ return formatDate(date, QLatin1String("%n"));
+ }
+ case KLocale::MonthName:
+- switch ( format ) {
++ switch (format) {
+ case KLocale::NarrowName:
+ return monthName(date, KCalendarSystem::NarrowName);
+ case KLocale::ShortName:
+@@ -2130,16 +2165,16 @@ QString KCalendarSystem::formatDate(const QDate &date, KLocale::DateTimeComponen
+ switch (format) {
+ case KLocale::LongNumber:
+ case KLocale::LongName:
+- return dayString(date, KCalendarSystem::LongFormat);
++ return formatDate(date, QLatin1String("%d"));
+ case KLocale::ShortName:
+ case KLocale::NarrowName:
+ case KLocale::ShortNumber:
+ case KLocale::DefaultComponentFormat:
+ default:
+- return dayString(date, KCalendarSystem::ShortFormat);
++ return formatDate(date, QLatin1String("%e"));
+ }
+ case KLocale::JulianDay:
+- return d->stringFromInteger( date.toJulianDay(), 0 );
++ return d->stringFromInteger(date.toJulianDay(), 0);
+ case KLocale::EraName:
+ switch (format) {
+ case KLocale::LongNumber:
+@@ -2168,26 +2203,26 @@ QString KCalendarSystem::formatDate(const QDate &date, KLocale::DateTimeComponen
+ switch (format) {
+ case KLocale::LongNumber:
+ case KLocale::LongName:
+- return yearInEraString(date, KCalendarSystem::LongFormat);
++ return formatDate(date, QLatin1String("%4Ey"));
+ case KLocale::ShortName:
+ case KLocale::NarrowName:
+ case KLocale::ShortNumber:
+ case KLocale::DefaultComponentFormat:
+ default:
+- return yearInEraString(date, KCalendarSystem::ShortFormat);
++ return formatDate(date, QLatin1String("%Ey"));
+ }
+ case KLocale::DayOfYear:
+ case KLocale::DayOfYearName:
+ switch (format) {
+ case KLocale::LongNumber:
+ case KLocale::LongName:
+- return dayOfYearString(date, KCalendarSystem::LongFormat);
++ return formatDate(date, QLatin1String("%j"));
+ case KLocale::ShortName:
+ case KLocale::NarrowName:
+ case KLocale::ShortNumber:
+ case KLocale::DefaultComponentFormat:
+ default:
+- return dayOfYearString(date, KCalendarSystem::ShortFormat);
++ return formatDate(date, QLatin1String("%-j"));
+ }
+ case KLocale::DayOfWeek:
+ switch (format) {
+@@ -2201,10 +2236,10 @@ QString KCalendarSystem::formatDate(const QDate &date, KLocale::DateTimeComponen
+ case KLocale::ShortNumber:
+ case KLocale::DefaultComponentFormat:
+ default:
+- return dayOfWeekString(date);
++ return formatDate(date, QLatin1String("%-u"));
+ }
+ case KLocale::DayOfWeekName:
+- switch ( format ) {
++ switch (format) {
+ case KLocale::NarrowName:
+ return weekDayName(date, KCalendarSystem::NarrowDayName);
+ case KLocale::ShortName:
+@@ -2220,69 +2255,68 @@ QString KCalendarSystem::formatDate(const QDate &date, KLocale::DateTimeComponen
+ switch (format) {
+ case KLocale::LongNumber:
+ case KLocale::LongName:
+- return weekNumberString(date, KCalendarSystem::LongFormat);
++ return d->stringFromInteger(week(date, weekNumberSystem, 0), 2, QLatin1Char('0'));
+ case KLocale::ShortName:
+ case KLocale::NarrowName:
+ case KLocale::ShortNumber:
+ case KLocale::DefaultComponentFormat:
+ default:
+- return weekNumberString(date, KCalendarSystem::ShortFormat);
++ return d->stringFromInteger(week(date, weekNumberSystem, 0), 0, QLatin1Char('0'));
+ }
+- case KLocale::WeekYear:
+- {
++ case KLocale::WeekYear: {
+ int weekYear;
+ QDate yearDate;
+- weekNumber( date, &weekYear );
+- setDate( yearDate, weekYear, 1, 1 );
+- return formatDate( yearDate, KLocale::Year, format );
++ week(date, weekNumberSystem, &weekYear);
++ setDate(yearDate, weekYear, 1, 1);
++ return formatDate(yearDate, KLocale::Year, format);
+ }
+ case KLocale::MonthsInYear:
+ switch (format) {
+ case KLocale::LongNumber:
+ case KLocale::LongName:
+- return monthsInYearString(date, KCalendarSystem::LongFormat);
++ return d->stringFromInteger(monthsInYear(date), 2, QLatin1Char('0'));
+ case KLocale::ShortName:
+ case KLocale::NarrowName:
+ case KLocale::ShortNumber:
+ case KLocale::DefaultComponentFormat:
+ default:
+- return monthsInYearString(date, KCalendarSystem::ShortFormat);
++ return d->stringFromInteger(monthsInYear(date), 0, QLatin1Char('0'));
+ }
+ case KLocale::WeeksInYear:
+ switch (format) {
+ case KLocale::LongNumber:
+ case KLocale::LongName:
+- return weeksInYearString(date, KCalendarSystem::LongFormat);
++ return d->stringFromInteger(weeksInYear(date), 2, QLatin1Char('0'));
+ case KLocale::ShortName:
+ case KLocale::NarrowName:
+ case KLocale::ShortNumber:
+ case KLocale::DefaultComponentFormat:
+ default:
+- return weeksInYearString(date, KCalendarSystem::ShortFormat);
++ return d->stringFromInteger(weeksInYear(date), 0, QLatin1Char('0'));
+ }
+ case KLocale::DaysInYear:
+ switch (format) {
+ case KLocale::LongNumber:
+ case KLocale::LongName:
+- return daysInYearString(date, KCalendarSystem::LongFormat);
++ return d->stringFromInteger(daysInYear(date), 3, QLatin1Char('0'));
+ case KLocale::ShortName:
+ case KLocale::NarrowName:
+ case KLocale::ShortNumber:
+ case KLocale::DefaultComponentFormat:
+ default:
+- return daysInYearString(date, KCalendarSystem::ShortFormat);
++ return d->stringFromInteger(daysInYear(date), 0, QLatin1Char('0'));
+ }
+ case KLocale::DaysInMonth:
+ switch (format) {
+ case KLocale::LongNumber:
+ case KLocale::LongName:
+- return daysInMonthString(date, KCalendarSystem::LongFormat);
++ return d->stringFromInteger(daysInMonth(date), 2, QLatin1Char('0'));
+ case KLocale::ShortName:
+ case KLocale::NarrowName:
+ case KLocale::ShortNumber:
+ case KLocale::DefaultComponentFormat:
+ default:
+- return daysInMonthString(date, KCalendarSystem::ShortFormat);
++ return d->stringFromInteger(daysInMonth(date), 0, QLatin1Char('0'));
+ }
+ case KLocale::DaysInWeek:
+ switch (format) {
+@@ -2293,26 +2327,26 @@ QString KCalendarSystem::formatDate(const QDate &date, KLocale::DateTimeComponen
+ case KLocale::ShortNumber:
+ case KLocale::DefaultComponentFormat:
+ default:
+- return daysInWeekString(date);
++ return d->stringFromInteger(d->daysInWeek(), 0);
+ }
+ default:
+ return QString();
+ }
+ }
+
+-QDate KCalendarSystem::readDate( const QString &str, bool *ok ) const
++QDate KCalendarSystem::readDate(const QString &str, bool *ok) const
+ {
+ //Try each standard format in turn, start with the locale ones,
+ //then the well defined standards
+- QDate date = readDate( str, KLocale::ShortFormat, ok);
+- if ( !isValid( date ) ) {
+- date = readDate( str, KLocale::NormalFormat, ok);
+- if ( !isValid( date )) {
+- date = readDate( str, KLocale::IsoFormat, ok);
+- if ( !isValid( date ) ) {
+- date = readDate( str, KLocale::IsoWeekFormat, ok);
+- if ( !isValid( date ) ) {
+- date = readDate( str, KLocale::IsoOrdinalFormat, ok);
++ QDate date = readDate(str, KLocale::ShortFormat, ok);
++ if (!isValid(date)) {
++ date = readDate(str, KLocale::NormalFormat, ok);
++ if (!isValid(date)) {
++ date = readDate(str, KLocale::IsoFormat, ok);
++ if (!isValid(date)) {
++ date = readDate(str, KLocale::IsoWeekFormat, ok);
++ if (!isValid(date)) {
++ date = readDate(str, KLocale::IsoOrdinalFormat, ok);
+ }
+ }
+ }
+@@ -2321,35 +2355,35 @@ QDate KCalendarSystem::readDate( const QString &str, bool *ok ) const
+ return date;
+ }
+
+-QDate KCalendarSystem::readDate( const QString &str, KLocale::ReadDateFlags flags, bool *ok ) const
++QDate KCalendarSystem::readDate(const QString &str, KLocale::ReadDateFlags flags, bool *ok) const
+ {
+- Q_D( const KCalendarSystem );
++ Q_D(const KCalendarSystem);
+
+- if ( flags & KLocale::ShortFormat ) {
+- return readDate( str, locale()->dateFormatShort(), ok );
+- } else if ( flags & KLocale::NormalFormat ) {
+- return readDate( str, locale()->dateFormat(), ok );
+- } else if ( flags & KLocale::IsoFormat ) {
+- return readDate( str, QLatin1String("%Y-%m-%d"), ok );
+- } else if ( flags & KLocale::IsoWeekFormat ) {
+- return readDate( str, QLatin1String("%Y-W%V-%u"), ok );
+- } else if ( flags & KLocale::IsoOrdinalFormat ) {
+- return readDate( str, QLatin1String("%Y-%j"), ok );
++ if (flags & KLocale::ShortFormat) {
++ return readDate(str, locale()->dateFormatShort(), ok);
++ } else if (flags & KLocale::NormalFormat) {
++ return readDate(str, locale()->dateFormat(), ok);
++ } else if (flags & KLocale::IsoFormat) {
++ return readDate(str, QLatin1String("%Y-%m-%d"), ok);
++ } else if (flags & KLocale::IsoWeekFormat) {
++ return readDate(str, QLatin1String("%Y-W%V-%u"), ok);
++ } else if (flags & KLocale::IsoOrdinalFormat) {
++ return readDate(str, QLatin1String("%Y-%j"), ok);
+ }
+ return d->invalidDate();
+ }
+
+-QDate KCalendarSystem::readDate( const QString &inputString, const QString &formatString, bool *ok ) const
++QDate KCalendarSystem::readDate(const QString &inputString, const QString &formatString, bool *ok) const
+ {
+- return readDate( inputString, formatString, ok, KLocale::KdeFormat );
++ return readDate(inputString, formatString, ok, KLocale::KdeFormat);
+ }
+
+ // NOT VIRTUAL - If override needed use shared-d
+-QDate KCalendarSystem::readDate( const QString &inputString, const QString &formatString, bool *ok,
+- KLocale::DateTimeFormatStandard formatStandard ) const
++QDate KCalendarSystem::readDate(const QString &inputString, const QString &formatString, bool *ok,
++ KLocale::DateTimeFormatStandard formatStandard) const
+ {
+ KDateTimeParser parser;
+- QDate resultDate = parser.parseDate( inputString, formatString, this, locale(), locale()->dateTimeDigitSet(), formatStandard );
++ QDate resultDate = parser.parseDate(inputString, formatString, this, locale(), locale()->dateTimeDigitSet(), formatStandard);
+ if (ok) {
+ *ok = resultDate.isValid();
+ }
+@@ -2359,17 +2393,17 @@ QDate KCalendarSystem::readDate( const QString &inputString, const QString &form
+ // NOT VIRTUAL - If override needed use shared-d
+ int KCalendarSystem::shortYearWindowStartYear() const
+ {
+- Q_D( const KCalendarSystem );
++ Q_D(const KCalendarSystem);
+
+ return d->shortYearWindowStartYear();
+ }
+
+ // NOT VIRTUAL - If override needed use shared-d
+-int KCalendarSystem::applyShortYearWindow( int inputYear ) const
++int KCalendarSystem::applyShortYearWindow(int inputYear) const
+ {
+- Q_D( const KCalendarSystem );
++ Q_D(const KCalendarSystem);
+
+- return d->applyShortYearWindow( inputYear );
++ return d->applyShortYearWindow(inputYear);
+ }
+
+ int KCalendarSystem::weekStartDay() const
+@@ -2383,7 +2417,7 @@ int KCalendarSystem::weekStartDay() const
+ // instead be wrapped in validity checks, as sometimes we want this to work outside the public valid
+ // range, i.e. to allow us to internally set dates of 1/1/10000 which are not publically valid but
+ // are required for internal maths
+-bool KCalendarSystem::julianDayToDate( int jd, int &year, int &month, int &day ) const
++bool KCalendarSystem::julianDayToDate(int jd, int &year, int &month, int &day) const
+ {
+ // Formula from The Calendar FAQ by Claus Tondering
+ // http://www.tondering.dk/claus/cal/node3.html#SECTION003161000000000000000
+@@ -2391,18 +2425,18 @@ bool KCalendarSystem::julianDayToDate( int jd, int &year, int &month, int &day )
+ // the Boost licensed source code
+
+ int a = jd + 32044;
+- int b = ( ( 4 * a ) + 3 ) / 146097;
+- int c = a - ( ( 146097 * b ) / 4 );
+- int d = ( ( 4 * c ) + 3 ) / 1461;
+- int e = c - ( ( 1461 * d ) / 4 );
+- int m = ( ( 5 * e ) + 2 ) / 153;
+- day = e - ( ( (153 * m ) + 2 ) / 5 ) + 1;
+- month = m + 3 - ( 12 * ( m / 10 ) );
+- year = ( 100 * b ) + d - 4800 + ( m / 10 );
++ int b = ((4 * a) + 3) / 146097;
++ int c = a - ((146097 * b) / 4);
++ int d = ((4 * c) + 3) / 1461;
++ int e = c - ((1461 * d) / 4);
++ int m = ((5 * e) + 2) / 153;
++ day = e - (((153 * m) + 2) / 5) + 1;
++ month = m + 3 - (12 * (m / 10));
++ year = (100 * b) + d - 4800 + (m / 10);
+
+ // If year is -ve then is BC. In Gregorian there is no year 0, but the maths
+ // is easier if we pretend there is, so internally year of 0 = 1BC = -1 outside
+- if ( year < 1 ) {
++ if (year < 1) {
+ year = year - 1;
+ }
+
+@@ -2415,7 +2449,7 @@ bool KCalendarSystem::julianDayToDate( int jd, int &year, int &month, int &day )
+ // instead be wrapped in validity checks, as sometimes we want this to work outside the public valid
+ // range, i.e. to allow us to internally set dates of 1/1/10000 which are not publically valid but
+ // are required for internal maths
+-bool KCalendarSystem::dateToJulianDay( int year, int month, int day, int &jd ) const
++bool KCalendarSystem::dateToJulianDay(int year, int month, int day, int &jd) const
+ {
+ // Formula from The Calendar FAQ by Claus Tondering
+ // http://www.tondering.dk/claus/cal/node3.html#SECTION003161000000000000000
+@@ -2425,22 +2459,22 @@ bool KCalendarSystem::dateToJulianDay( int year, int month, int day, int &jd ) c
+ // If year is -ve then is BC. In Gregorian there is no year 0, but the maths
+ // is easier if we pretend there is, so internally year of -1 = 1BC = 0 internally
+ int y;
+- if ( year < 1 ) {
++ if (year < 1) {
+ y = year + 1;
+ } else {
+ y = year;
+ }
+
+- int a = ( 14 - month ) / 12;
++ int a = (14 - month) / 12;
+ y = y + 4800 - a;
+- int m = month + ( 12 * a ) - 3;
++ int m = month + (12 * a) - 3;
+
+ jd = day
+- + ( ( ( 153 * m ) + 2 ) / 5 )
+- + ( 365 * y )
+- + ( y / 4 )
+- - ( y / 100 )
+- + ( y / 400 )
++ + (((153 * m) + 2) / 5)
++ + (365 * y)
++ + (y / 4)
++ - (y / 100)
++ + (y / 400)
+ - 32045;
+
+ return true;
+@@ -2448,25 +2482,25 @@ bool KCalendarSystem::dateToJulianDay( int year, int month, int day, int &jd ) c
+
+ const KLocale * KCalendarSystem::locale() const
+ {
+- Q_D( const KCalendarSystem );
++ Q_D(const KCalendarSystem);
+
+ return d->locale();
+ }
+
+ // Deprecated
+-void KCalendarSystem::setMaxMonthsInYear( int maxMonths )
++void KCalendarSystem::setMaxMonthsInYear(int maxMonths)
+ {
+- Q_UNUSED( maxMonths )
++ Q_UNUSED(maxMonths)
+ }
+
+ // Deprecated
+-void KCalendarSystem::setMaxDaysInWeek( int maxDays )
++void KCalendarSystem::setMaxDaysInWeek(int maxDays)
+ {
+- Q_UNUSED( maxDays )
++ Q_UNUSED(maxDays)
+ }
+
+ // Deprecated
+-void KCalendarSystem::setHasYear0( bool hasYear0 )
++void KCalendarSystem::setHasYear0(bool hasYear0)
+ {
+- Q_UNUSED( hasYear0 )
++ Q_UNUSED(hasYear0)
+ }
+diff --git a/kdecore/date/kcalendarsystem.h b/kdecore/date/kcalendarsystem.h
+index 318e2d3..4dfda62 100644
+--- a/kdecore/date/kcalendarsystem.h
++++ b/kdecore/date/kcalendarsystem.h
+@@ -45,28 +45,28 @@ public:
+ * Format for returned year number / month number / day number as string.
+ */
+ enum StringFormat {
+- ShortFormat, /**< Short string format, e.g. 2000 = "00" or 6 = "6" */
+- LongFormat /**< Long string format, e.g. 2000 = "2000" or 6 = "06" */
++ ShortFormat, /**< Short string format, e.g. 2000 = "00" or 6 = "6" */
++ LongFormat /**< Long string format, e.g. 2000 = "2000" or 6 = "06" */
+ };
+
+ /**
+ * Format for returned month / day name.
+ */
+ enum MonthNameFormat {
+- ShortName, /**< Short name format, e.g. "Dec" */
+- LongName, /**< Long name format, e.g. "December" */
+- ShortNamePossessive, /**< Short name possessive format, e.g. "of Dec" */
+- LongNamePossessive, /**< Long name possessive format, e.g. "of December" */
+- NarrowName /**< Narrow name format, e.g. "D". @since 4.7 */
++ ShortName, /**< Short name format, e.g. "Dec" */
++ LongName, /**< Long name format, e.g. "December" */
++ ShortNamePossessive, /**< Short name possessive format, e.g. "of Dec" */
++ LongNamePossessive, /**< Long name possessive format, e.g. "of December" */
++ NarrowName /**< Narrow name format, e.g. "D". @since 4.7 */
+ };
+
+ /**
+ * Format for returned month / day name.
+ */
+ enum WeekDayNameFormat {
+- ShortDayName, /**< Short name format, e.g. "Fri" */
+- LongDayName, /**< Long name format, e.g. "Friday" */
+- NarrowDayName /**< Narrow name format, e.g. "F". @since 4.7 */
++ ShortDayName, /**< Short name format, e.g. "Fri" */
++ LongDayName, /**< Long name format, e.g. "Friday" */
++ NarrowDayName /**< Narrow name format, e.g. "F". @since 4.7 */
+ };
+
+ //KDE5 remove
+@@ -80,8 +80,8 @@ public:
+ * @param locale locale to use for translations. The global locale is used if null.
+ * @return a KCalendarSystem object
+ */
+- static KCalendarSystem *create( const QString & calType = QLatin1String( "gregorian" ),
+- const KLocale * locale = 0 );
++ KDE_DEPRECATED static KCalendarSystem *create(const QString & calType = QLatin1String("gregorian"),
++ const KLocale * locale = 0);
+
+ //KDE5 remove
+ /**
+@@ -98,8 +98,8 @@ public:
+ * @param locale locale to use for translations. The global locale is used if null.
+ * @return a KCalendarSystem object
+ */
+- static KCalendarSystem *create( const QString & calType, KSharedConfig::Ptr config,
+- const KLocale * locale = 0 );
++ KDE_DEPRECATED static KCalendarSystem *create(const QString & calType, KSharedConfig::Ptr config,
++ const KLocale * locale = 0);
+
+ //KDE5 add default value to calendarSystem
+ /**
+@@ -111,8 +111,8 @@ public:
+ * @param locale locale to use for translations. The global locale is used if null.
+ * @return a KCalendarSystem object
+ */
+- static KCalendarSystem *create( KLocale::CalendarSystem calendarSystem,
+- const KLocale *locale = 0 );
++ static KCalendarSystem *create(KLocale::CalendarSystem calendarSystem,
++ const KLocale *locale = 0);
+
+ /**
+ * @since 4.6
+@@ -126,8 +126,8 @@ public:
+ * @param locale locale to use for translations. The global locale is used if null.
+ * @return a KCalendarSystem object
+ */
+- static KCalendarSystem *create( KLocale::CalendarSystem calendarSystem, KSharedConfig::Ptr config,
+- const KLocale *locale = 0 );
++ static KCalendarSystem *create(KLocale::CalendarSystem calendarSystem, KSharedConfig::Ptr config,
++ const KLocale *locale = 0);
+
+ //KDE5 remove
+ /**
+@@ -137,7 +137,7 @@ public:
+ *
+ * @return list of names
+ */
+- static QStringList calendarSystems();
++ KDE_DEPRECATED static QStringList calendarSystems();
+
+ /**
+ * @since 4.6
+@@ -160,23 +160,25 @@ public:
+ *
+ * @return label for calendar
+ */
+- static QString calendarLabel( const QString &calendarType );
++ KDE_DEPRECATED static QString calendarLabel(const QString &calendarType);
+
+ /**
+ * @since 4.6
+ *
+ * Returns a localized label to display for the required Calendar System type.
+ *
+- * Use with calendarSystemsList() to populate selction lists of available
++ * Use with calendarSystemsList() to populate selection lists of available
+ * calendar systems.
+ *
+- * @param calendarType the specific calendar type to return the label for
++ * @param calendarSystem the specific calendar type to return the label for
+ * @param locale the locale to use for the label, defaults to global
+ * @return label for calendar
+ */
+- static QString calendarLabel( KLocale::CalendarSystem calendarSystem, const KLocale *locale = KGlobal::locale() );
++ static QString calendarLabel(KLocale::CalendarSystem calendarSystem, const KLocale *locale = KGlobal::locale());
+
++ //KDE5 Remove
+ /**
++ * @deprecated use calendarSystem(const QString &calendarType) instead
+ * @since 4.6
+ *
+ * Returns the Calendar System enum value for a given Calendar Type,
+@@ -185,14 +187,38 @@ public:
+ * @param calendarType the calendar type to convert
+ * @return calendar system for calendar type
+ */
+- static KLocale::CalendarSystem calendarSystemForCalendarType( const QString &calendarType );
++ KDE_DEPRECATED static KLocale::CalendarSystem calendarSystemForCalendarType(const QString &calendarType);
++
++ //KDE5 Remove
++ /**
++ * @since 4.7
++ *
++ * Returns the Calendar System enum value for a given Calendar Type,
++ * e.g. KLocale::QDateCalendar for "gregorian"
++ *
++ * @param calendarType the calendar type to convert
++ * @return calendar system for calendar type
++ */
++ static KLocale::CalendarSystem calendarSystem(const QString &calendarType);
++
++ //KDE5 remove
++ /**
++ * @since 4.7
++ *
++ * Returns the deprecated Calendar Type for a given Calendar System enum value,
++ * e.g. "gregorian" for KLocale::QDateCalendar
++ *
++ * @param calendarSystem the calendar system to convert
++ * @return calendar type for calendar system
++ */
++ static QString calendarType(KLocale::CalendarSystem calendarSystem);
+
+ /**
+ * Constructor of abstract calendar class. This will be called by derived classes.
+ *
+ * @param locale locale to use for translations. The global locale is used if null.
+ */
+- explicit KCalendarSystem( const KLocale *locale = 0 );
++ explicit KCalendarSystem(const KLocale *locale = 0);
+
+ /**
+ * Constructor of abstract calendar class. This will be called by derived classes.
+@@ -202,7 +228,7 @@ public:
+ if null.
+ * @param locale locale to use for translations. The global locale is used if null.
+ */
+- explicit KCalendarSystem( const KSharedConfig::Ptr config, const KLocale *locale = 0 );
++ explicit KCalendarSystem(const KSharedConfig::Ptr config, const KLocale *locale = 0);
+
+ /**
+ * Destructor.
+@@ -216,7 +242,7 @@ public:
+ *
+ * @return type of calendar system
+ */
+- virtual QString calendarType() const = 0;
++ KDE_DEPRECATED virtual QString calendarType() const = 0;
+
+ //KDE5 make virtual?
+ /**
+@@ -285,7 +311,7 @@ public:
+ * @param day the day portion of the date to check
+ * @return @c true if the date is valid, @c false otherwise
+ */
+- virtual bool isValid( int year, int month, int day ) const = 0;
++ virtual bool isValid(int year, int month, int day) const = 0;
+
+ //KDE5 make virtual?
+ /**
+@@ -297,7 +323,7 @@ public:
+ * @param dayOfYear the day of year portion of the date to check
+ * @return @c true if the date is valid, @c false otherwise
+ */
+- bool isValid( int year, int dayOfYear ) const;
++ bool isValid(int year, int dayOfYear) const;
+
+ //KDE5 make virtual?
+ /**
+@@ -305,13 +331,13 @@ public:
+ *
+ * Returns whether a given date is valid in this calendar system.
+ *
+- * @param era the Era Name portion of the date to check
++ * @param eraName the Era Name portion of the date to check
+ * @param yearInEra the Year In Era portion of the date to check
+ * @param month the Month portion of the date to check
+ * @param day the Day portion of the date to check
+ * @return @c true if the date is valid, @c false otherwise
+ */
+- bool isValid( const QString &eraName, int yearInEra, int month, int day ) const;
++ bool isValid(const QString &eraName, int yearInEra, int month, int day) const;
+
+ //KDE5 make virtual?
+ /**
+@@ -324,7 +350,7 @@ public:
+ * @param dayOfIsoWeek the day of week portion of the date to check
+ * @return @c true if the date is valid, @c false otherwise
+ */
+- bool isValidIsoWeekDate( int year, int isoWeekNumber, int dayOfIsoWeek ) const;
++ bool isValidIsoWeekDate(int year, int isoWeekNumber, int dayOfIsoWeek) const;
+
+ /**
+ * Returns whether a given date is valid in this calendar system.
+@@ -332,7 +358,7 @@ public:
+ * @param date the date to check
+ * @return @c true if the date is valid, @c false otherwise
+ */
+- virtual bool isValid( const QDate &date ) const;
++ virtual bool isValid(const QDate &date) const;
+
+ /**
+ * Changes the date's year, month and day. The range of the year, month
+@@ -346,7 +372,7 @@ public:
+ * @param day day of month
+ * @return @c true if the date is valid, @c false otherwise
+ */
+- virtual bool setDate( QDate &date, int year, int month, int day ) const;
++ virtual bool setDate(QDate &date, int year, int month, int day) const;
+
+ //KDE5 make virtual?
+ /**
+@@ -359,7 +385,7 @@ public:
+ * @param dayOfYear day of year
+ * @return @c true if the date is valid, @c false otherwise
+ */
+- bool setDate( QDate &date, int year, int dayOfYear ) const;
++ bool setDate(QDate &date, int year, int dayOfYear) const;
+
+ //KDE5 make virtual?
+ /**
+@@ -369,12 +395,12 @@ public:
+ *
+ * @param date date to change
+ * @param eraName Era string
+- * @param year Year In Era number
++ * @param yearInEra Year In Era number
+ * @param month Month number
+ * @param day Day Of Month number
+ * @return @c true if the date is valid, @c false otherwise
+ */
+- bool setDate( QDate &date, QString eraName, int yearInEra, int month, int day ) const;
++ bool setDate(QDate &date, QString eraName, int yearInEra, int month, int day) const;
+
+ //KDE5 make virtual?
+ /**
+@@ -388,14 +414,10 @@ public:
+ * @param dayOfIsoWeek day of week Mon..Sun (1..7)
+ * @return @c true if the date is valid, @c false otherwise
+ */
+- bool setDateIsoWeek( QDate &date, int year, int isoWeekNumber, int dayOfIsoWeek ) const;
++ bool setDateIsoWeek(QDate &date, int year, int isoWeekNumber, int dayOfIsoWeek) const;
+
+ /**
+- * @deprecated
+- *
+- * Use setDate instead
+- *
+- * @see KCalendarSystem::setDate
++ * @deprecated Use setDate() instead
+ *
+ * Some implementations reject year range 00 to 99, but extended date
+ * ranges now require these to be accepted. Equivalent in QDate is
+@@ -410,7 +432,7 @@ public:
+ * @param d Day of month
+ * @return true if the date is valid; otherwise returns false.
+ */
+- virtual bool setYMD( QDate &date, int y, int m, int d ) const;
++ KDE_DEPRECATED virtual bool setYMD(QDate &date, int y, int m, int d) const;
+
+ //KDE5 make virtual?
+ /**
+@@ -423,7 +445,7 @@ public:
+ * @param month month number returned in this variable
+ * @param day day of month returned in this variable
+ */
+- void getDate( const QDate date, int *year, int *month, int *day ) const;
++ void getDate(const QDate date, int *year, int *month, int *day) const;
+
+ /**
+ * Returns the year portion of a given date in the current calendar system
+@@ -431,7 +453,7 @@ public:
+ * @param date date to return year for
+ * @return year, 0 if input date is invalid
+ */
+- virtual int year( const QDate &date ) const;
++ virtual int year(const QDate &date) const;
+
+ /**
+ * Returns the month portion of a given date in the current calendar system
+@@ -439,7 +461,7 @@ public:
+ * @param date date to return month for
+ * @return month of year, 0 if input date is invalid
+ */
+- virtual int month( const QDate &date ) const;
++ virtual int month(const QDate &date) const;
+
+ /**
+ * Returns the day portion of a given date in the current calendar system
+@@ -447,7 +469,7 @@ public:
+ * @param date date to return day for
+ * @return day of the month, 0 if input date is invalid
+ */
+- virtual int day( const QDate &date ) const;
++ virtual int day(const QDate &date) const;
+
+ //KDE5 make virtual?
+ /**
+@@ -460,7 +482,7 @@ public:
+ * @param format format to return, either short or long
+ * @return era name, empty string if input date is invalid
+ */
+- QString eraName( const QDate &date, StringFormat format = ShortFormat ) const;
++ QString eraName(const QDate &date, StringFormat format = ShortFormat) const;
+
+ //KDE5 make virtual?
+ /**
+@@ -473,7 +495,7 @@ public:
+ * @param format format to return, either short or long
+ * @return era name, empty string if input date is invalid
+ */
+- QString eraYear( const QDate &date, StringFormat format = ShortFormat ) const;
++ QString eraYear(const QDate &date, StringFormat format = ShortFormat) const;
+
+ //KDE5 make virtual?
+ /**
+@@ -485,7 +507,7 @@ public:
+ * @param date date to return Year In Era for
+ * @return Year In Era, -1 if input date is invalid
+ */
+- int yearInEra( const QDate &date ) const;
++ int yearInEra(const QDate &date) const;
+
+ /**
+ * Returns a QDate containing a date @p nyears years later.
+@@ -494,7 +516,7 @@ public:
+ * @param nyears The number of years to add
+ * @return The new date, null date if any errors
+ */
+- virtual QDate addYears( const QDate &date, int nyears ) const;
++ virtual QDate addYears(const QDate &date, int nyears) const;
+
+ /**
+ * Returns a QDate containing a date @p nmonths months later.
+@@ -503,7 +525,7 @@ public:
+ * @param nmonths number of months to add
+ * @return The new date, null date if any errors
+ */
+- virtual QDate addMonths( const QDate &date, int nmonths ) const;
++ virtual QDate addMonths(const QDate &date, int nmonths) const;
+
+ /**
+ * Returns a QDate containing a date @p ndays days later.
+@@ -512,7 +534,7 @@ public:
+ * @param ndays number of days to add
+ * @return The new date, null date if any errors
+ */
+- virtual QDate addDays( const QDate &date, int ndays ) const;
++ virtual QDate addDays(const QDate &date, int ndays) const;
+
+ //KDE5 make virtual?
+ /**
+@@ -533,8 +555,8 @@ public:
+ * @param daysDiff Returns number of days difference
+ * @param direction Returns direction of difference, 1 if fromDate <= toDate, -1 otherwise
+ */
+- void dateDifference( const QDate &fromDate, const QDate &toDate,
+- int *yearsDiff, int *monthsDiff, int *daysDiff, int *direction ) const;
++ void dateDifference(const QDate &fromDate, const QDate &toDate,
++ int *yearsDiff, int *monthsDiff, int *daysDiff, int *direction) const;
+
+ //KDE5 make virtual?
+ /**
+@@ -547,7 +569,7 @@ public:
+ * @param toDate The date to end at
+ * @return The number of years difference
+ */
+- int yearsDifference( const QDate &fromDate, const QDate &toDate ) const;
++ int yearsDifference(const QDate &fromDate, const QDate &toDate) const;
+
+ //KDE5 make virtual?
+ /**
+@@ -562,7 +584,7 @@ public:
+ * @param toDate The date to end at
+ * @return The number of months difference
+ */
+- int monthsDifference( const QDate &fromDate, const QDate &toDate ) const;
++ int monthsDifference(const QDate &fromDate, const QDate &toDate) const;
+
+ //KDE5 make virtual?
+ /**
+@@ -573,7 +595,7 @@ public:
+ * @param toDate The date to end at
+ * @return The number of days difference
+ */
+- int daysDifference( const QDate &fromDate, const QDate &toDate ) const;
++ int daysDifference(const QDate &fromDate, const QDate &toDate) const;
+
+ /**
+ * Returns number of months in the given year
+@@ -581,7 +603,7 @@ public:
+ * @param date the date to obtain year from
+ * @return number of months in the year, -1 if input date invalid
+ */
+- virtual int monthsInYear( const QDate &date ) const;
++ virtual int monthsInYear(const QDate &date) const;
+
+ //KDE5 make virtual?
+ /**
+@@ -592,7 +614,7 @@ public:
+ * @param year the required year
+ * @return number of months in the year, -1 if input date invalid
+ */
+- int monthsInYear( int year ) const;
++ int monthsInYear(int year) const;
+
+ /**
+ * Returns the number of localized weeks in the given year.
+@@ -600,7 +622,7 @@ public:
+ * @param date the date to obtain year from
+ * @return number of weeks in the year, -1 if input date invalid
+ */
+- virtual int weeksInYear( const QDate &date ) const;
++ virtual int weeksInYear(const QDate &date) const;
+
+ //KDE5 Merge with virtual weeksInYear with default
+ /**
+@@ -617,7 +639,7 @@ public:
+ * @param weekNumberSystem the week number system to use
+ * @return number of weeks in the year, -1 if date invalid
+ */
+- int weeksInYear( const QDate &date, KLocale::WeekNumberSystem weekNumberSystem ) const;
++ int weeksInYear(const QDate &date, KLocale::WeekNumberSystem weekNumberSystem) const;
+
+ /**
+ * Returns the number of localized weeks in the given year.
+@@ -625,7 +647,7 @@ public:
+ * @param year the year
+ * @return number of weeks in the year, -1 if input date invalid
+ */
+- virtual int weeksInYear( int year ) const;
++ virtual int weeksInYear(int year) const;
+
+ //KDE5 Merge with virtual weeksInYear with default
+ /**
+@@ -642,7 +664,7 @@ public:
+ * @param weekNumberSystem the week number system to use
+ * @return number of weeks in the year, -1 if date invalid
+ */
+- int weeksInYear( int year, KLocale::WeekNumberSystem weekNumberSystem ) const;
++ int weeksInYear(int year, KLocale::WeekNumberSystem weekNumberSystem) const;
+
+ /**
+ * Returns the number of days in the given year.
+@@ -650,7 +672,7 @@ public:
+ * @param date the date to obtain year from
+ * @return number of days in year, -1 if input date invalid
+ */
+- virtual int daysInYear( const QDate &date ) const;
++ virtual int daysInYear(const QDate &date) const;
+
+ //KDE5 make virtual?
+ /**
+@@ -661,7 +683,7 @@ public:
+ * @param year the year
+ * @return number of days in year, -1 if input date invalid
+ */
+- int daysInYear( int year ) const;
++ int daysInYear(int year) const;
+
+ /**
+ * Returns the number of days in the given month.
+@@ -669,7 +691,7 @@ public:
+ * @param date the date to obtain month from
+ * @return number of days in month, -1 if input date invalid
+ */
+- virtual int daysInMonth( const QDate &date ) const;
++ virtual int daysInMonth(const QDate &date) const;
+
+ //KDE5 make virtual?
+ /**
+@@ -681,7 +703,7 @@ public:
+ * @param month the month
+ * @return number of days in month, -1 if input date invalid
+ */
+- int daysInMonth( int year, int month ) const;
++ int daysInMonth(int year, int month) const;
+
+ /**
+ * Returns the number of days in the given week.
+@@ -689,7 +711,7 @@ public:
+ * @param date the date to obtain week from
+ * @return number of days in week, -1 if input date invalid
+ */
+- virtual int daysInWeek( const QDate &date ) const;
++ virtual int daysInWeek(const QDate &date) const;
+
+ /**
+ * Returns the day number of year for the given date
+@@ -699,7 +721,7 @@ public:
+ * @param date the date to obtain day from
+ * @return day of year number, -1 if input date not valid
+ */
+- virtual int dayOfYear( const QDate &date ) const;
++ virtual int dayOfYear(const QDate &date) const;
+
+ /**
+ * Returns the weekday number for the given date
+@@ -711,10 +733,10 @@ public:
+ * @param date the date to obtain day from
+ * @return day of week number, -1 if input date not valid
+ */
+- virtual int dayOfWeek( const QDate &date ) const;
++ virtual int dayOfWeek(const QDate &date) const;
+
+ /**
+- * @deprecated
++ * @deprecated use week() instead
+ *
+ * Returns the ISO week number for the given date.
+ *
+@@ -728,7 +750,7 @@ public:
+ * @param yearNum returns the year the date belongs to
+ * @return ISO week number, -1 if input date invalid
+ */
+- virtual int weekNumber( const QDate &date, int *yearNum = 0 ) const;
++ KDE_DEPRECATED virtual int weekNumber(const QDate &date, int *yearNum = 0) const;
+
+ //KDE5 Make virtual?
+ /**
+@@ -748,7 +770,7 @@ public:
+ * @param yearNum returns the year the date belongs to
+ * @return localized week number, -1 if input date invalid
+ */
+- int week( const QDate &date, int *yearNum = 0 ) const;
++ int week(const QDate &date, int *yearNum = 0) const;
+
+ //KDE5 Make virtual?
+ /**
+@@ -771,7 +793,7 @@ public:
+ * @param yearNum returns the year the date belongs to
+ * @return week number, -1 if input date invalid
+ */
+- int week( const QDate &date, KLocale::WeekNumberSystem weekNumberSystem, int *yearNum = 0) const;
++ int week(const QDate &date, KLocale::WeekNumberSystem weekNumberSystem, int *yearNum = 0) const;
+
+ /**
+ * Returns whether a given year is a leap year.
+@@ -782,7 +804,7 @@ public:
+ * @param year the year to check
+ * @return @c true if the year is a leap year, @c false otherwise
+ */
+- virtual bool isLeapYear( int year ) const = 0;
++ virtual bool isLeapYear(int year) const = 0;
+
+ /**
+ * Returns whether a given date falls in a leap year.
+@@ -793,7 +815,7 @@ public:
+ * @param date the date to check
+ * @return @c true if the date falls in a leap year, @c false otherwise
+ */
+- virtual bool isLeapYear( const QDate &date ) const;
++ virtual bool isLeapYear(const QDate &date) const;
+
+ //KDE5 Make virtual?
+ /**
+@@ -801,10 +823,10 @@ public:
+ *
+ * Returns a QDate containing the first day of the year
+ *
+- * @param date The year to return the date for
++ * @param year The year to return the date for
+ * @return The first day of the year
+ */
+- QDate firstDayOfYear( int year ) const;
++ QDate firstDayOfYear(int year) const;
+
+ //KDE5 Make virtual?
+ /**
+@@ -812,10 +834,10 @@ public:
+ *
+ * Returns a QDate containing the last day of the year
+ *
+- * @param date The year to return the date for
++ * @param year The year to return the date for
+ * @return The last day of the year
+ */
+- QDate lastDayOfYear( int year ) const;
++ QDate lastDayOfYear(int year) const;
+
+ //KDE5 Make virtual?
+ /**
+@@ -826,7 +848,7 @@ public:
+ * @param date The year to return the date for, defaults to today
+ * @return The first day of the year
+ */
+- QDate firstDayOfYear( const QDate &date = QDate::currentDate() ) const;
++ QDate firstDayOfYear(const QDate &date = QDate::currentDate()) const;
+
+ //KDE5 Make virtual?
+ /**
+@@ -837,7 +859,7 @@ public:
+ * @param date The year to return the date for, defaults to today
+ * @return The last day of the year
+ */
+- QDate lastDayOfYear( const QDate &date = QDate::currentDate() ) const;
++ QDate lastDayOfYear(const QDate &date = QDate::currentDate()) const;
+
+ //KDE5 Make virtual?
+ /**
+@@ -845,10 +867,11 @@ public:
+ *
+ * Returns a QDate containing the first day of the month
+ *
+- * @param date The month to return the date for, defaults to today
++ * @param year The year to return the date for
++ * @param month The month to return the date for
+ * @return The first day of the month
+ */
+- QDate firstDayOfMonth( int year, int month ) const;
++ QDate firstDayOfMonth(int year, int month) const;
+
+ //KDE5 Make virtual?
+ /**
+@@ -856,10 +879,11 @@ public:
+ *
+ * Returns a QDate containing the last day of the month
+ *
+- * @param date The month to return the date for, defaults to today
++ * @param year The year to return the date for
++ * @param month The month to return the date for
+ * @return The last day of the month
+ */
+- QDate lastDayOfMonth( int year, int month ) const;
++ QDate lastDayOfMonth(int year, int month) const;
+
+ //KDE5 Make virtual?
+ /**
+@@ -870,7 +894,7 @@ public:
+ * @param date The month to return the date for, defaults to today
+ * @return The first day of the month
+ */
+- QDate firstDayOfMonth( const QDate &date = QDate::currentDate() ) const;
++ QDate firstDayOfMonth(const QDate &date = QDate::currentDate()) const;
+
+ //KDE5 Make virtual?
+ /**
+@@ -881,7 +905,7 @@ public:
+ * @param date The month to return the date for, defaults to today
+ * @return The last day of the month
+ */
+- QDate lastDayOfMonth( const QDate &date = QDate::currentDate() ) const;
++ QDate lastDayOfMonth(const QDate &date = QDate::currentDate()) const;
+
+ /**
+ * Gets specific calendar type month name for a given month number
+@@ -892,7 +916,7 @@ public:
+ * @param format specifies whether the short month name or long month name should be used
+ * @return name of the month, empty string if any error
+ */
+- virtual QString monthName( int month, int year, MonthNameFormat format = LongName ) const = 0;
++ virtual QString monthName(int month, int year, MonthNameFormat format = LongName) const = 0;
+
+ /**
+ * Gets specific calendar type month name for a given date
+@@ -901,7 +925,7 @@ public:
+ * @param format specifies whether the short month name or long month name should be used
+ * @return name of the month, empty string if any error
+ */
+- virtual QString monthName( const QDate &date, MonthNameFormat format = LongName ) const;
++ virtual QString monthName(const QDate &date, MonthNameFormat format = LongName) const;
+
+ /**
+ * Gets specific calendar type week day name.
+@@ -911,7 +935,7 @@ public:
+ * @param format specifies whether the short month name or long month name should be used
+ * @return day name, empty string if any error
+ */
+- virtual QString weekDayName( int weekDay, WeekDayNameFormat format = LongDayName ) const = 0;
++ virtual QString weekDayName(int weekDay, WeekDayNameFormat format = LongDayName) const = 0;
+
+ /**
+ * Gets specific calendar type week day name.
+@@ -920,9 +944,11 @@ public:
+ * @param format specifies whether the short month name or long month name should be used
+ * @return day name, empty string if any error
+ */
+- virtual QString weekDayName( const QDate &date, WeekDayNameFormat format = LongDayName ) const;
++ virtual QString weekDayName(const QDate &date, WeekDayNameFormat format = LongDayName) const;
+
+ /**
++ * @deprecated use formatDate(QDate, KLocale::DateTimeComponant, KLocale::DateTimeComponentFormat)
++ *
+ * Converts a date into a year literal
+ *
+ * @param date date to convert
+@@ -930,9 +956,11 @@ public:
+ * @return year literal of the date, empty string if any error
+ * @see year()
+ */
+- virtual QString yearString( const QDate &date, StringFormat format = LongFormat ) const;
++ KDE_DEPRECATED virtual QString yearString(const QDate &date, StringFormat format = LongFormat) const;
+
+ /**
++ * @deprecated use formatDate(QDate, KLocale::DateTimeComponant, KLocale::DateTimeComponentFormat)
++ *
+ * Converts a date into a month literal
+ *
+ * @param pDate The date to convert
+@@ -940,9 +968,11 @@ public:
+ * @return The month literal of the date, empty string if any error
+ * @see month()
+ */
+- virtual QString monthString( const QDate &pDate, StringFormat format = LongFormat ) const;
++ KDE_DEPRECATED virtual QString monthString(const QDate &pDate, StringFormat format = LongFormat) const;
+
+ /**
++ * @deprecated use formatDate(QDate, KLocale::DateTimeComponant, KLocale::DateTimeComponentFormat)
++ *
+ * Converts a date into a day literal
+ *
+ * @param pDate The date to convert
+@@ -950,10 +980,12 @@ public:
+ * @return The day literal of the date, empty string if any error
+ * @see day()
+ */
+- virtual QString dayString( const QDate &pDate, StringFormat format = LongFormat ) const;
++ KDE_DEPRECATED virtual QString dayString(const QDate &pDate, StringFormat format = LongFormat) const;
+
+ //KDE5 make virtual?
+ /**
++ * @deprecated use formatDate(QDate, KLocale::DateTimeComponant, KLocale::DateTimeComponentFormat)
++ *
+ * @since 4.5
+ *
+ * Converts a date into a Year In Era literal
+@@ -962,10 +994,12 @@ public:
+ * @param format format to return, either short or long
+ * @return Year In Era literal of the date, empty string if any error
+ */
+- QString yearInEraString( const QDate &date, StringFormat format = ShortFormat ) const;
++ KDE_DEPRECATED QString yearInEraString(const QDate &date, StringFormat format = ShortFormat) const;
+
+ //KDE5 make virtual?
+ /**
++ * @deprecated use formatDate(QDate, KLocale::DateTimeComponant, KLocale::DateTimeComponentFormat)
++ *
+ * @since 4.4
+ *
+ * Converts a date into a day of year literal
+@@ -975,10 +1009,12 @@ public:
+ * @return The day of year literal of the date, empty string if any error
+ * @see dayOfYear()
+ */
+- QString dayOfYearString( const QDate &pDate, StringFormat format = LongFormat ) const;
++ KDE_DEPRECATED QString dayOfYearString(const QDate &pDate, StringFormat format = LongFormat) const;
+
+ //KDE5 make virtual?
+ /**
++ * @deprecated use formatDate(QDate, KLocale::DateTimeComponant, KLocale::DateTimeComponentFormat)
++ *
+ * @since 4.4
+ *
+ * Converts a date into a day of week literal
+@@ -987,10 +1023,12 @@ public:
+ * @return The day of week literal of the date, empty string if any error
+ * @see dayOfWeek()
+ */
+- QString dayOfWeekString( const QDate &pDate ) const;
++ KDE_DEPRECATED QString dayOfWeekString(const QDate &pDate) const;
+
+ //KDE5 make virtual?
+ /**
++ * @deprecated use formatDate(QDate, KLocale::DateTimeComponant, KLocale::DateTimeComponentFormat)
++ *
+ * @since 4.4
+ *
+ * Converts a date into a week number literal
+@@ -1000,10 +1038,12 @@ public:
+ * @return The day literal of the date, empty string if any error
+ * @see weekNumber()
+ */
+- QString weekNumberString( const QDate &pDate, StringFormat format = LongFormat ) const;
++ KDE_DEPRECATED QString weekNumberString(const QDate &pDate, StringFormat format = LongFormat) const;
+
+ //KDE5 make virtual?
+ /**
++ * @deprecated use formatDate(QDate, KLocale::DateTimeComponant, KLocale::DateTimeComponentFormat)
++ *
+ * @since 4.4
+ *
+ * Returns the months in year for a date as a numeric string
+@@ -1013,10 +1053,12 @@ public:
+ * @return The months in year literal of the date, empty string if any error
+ * @see monthsInYear()
+ */
+- QString monthsInYearString( const QDate &pDate, StringFormat format = LongFormat ) const;
++ KDE_DEPRECATED QString monthsInYearString(const QDate &pDate, StringFormat format = LongFormat) const;
+
+ //KDE5 make virtual?
+ /**
++ * @deprecated use formatDate(QDate, KLocale::DateTimeComponant, KLocale::DateTimeComponentFormat)
++ *
+ * @since 4.4
+ *
+ * Returns the weeks in year for a date as a numeric string
+@@ -1026,10 +1068,12 @@ public:
+ * @return The weeks in year literal of the date, empty string if any error
+ * @see weeksInYear()
+ */
+- QString weeksInYearString( const QDate &pDate, StringFormat format = LongFormat ) const;
++ KDE_DEPRECATED QString weeksInYearString(const QDate &pDate, StringFormat format = LongFormat) const;
+
+ //KDE5 make virtual?
+ /**
++ * @deprecated use formatDate(QDate, KLocale::DateTimeComponant, KLocale::DateTimeComponentFormat)
++ *
+ * @since 4.4
+ *
+ * Returns the days in year for a date as a numeric string
+@@ -1039,10 +1083,12 @@ public:
+ * @return The days in year literal of the date, empty string if any error
+ * @see daysInYear()
+ */
+- QString daysInYearString( const QDate &pDate, StringFormat format = LongFormat ) const;
++ KDE_DEPRECATED QString daysInYearString(const QDate &pDate, StringFormat format = LongFormat) const;
+
+ //KDE5 make virtual?
+ /**
++ * @deprecated use formatDate(QDate, KLocale::DateTimeComponant, KLocale::DateTimeComponentFormat)
++ *
+ * @since 4.4
+ *
+ * Returns the days in month for a date as a numeric string
+@@ -1052,10 +1098,12 @@ public:
+ * @return The days in month literal of the date, empty string if any error
+ * @see daysInMonth()
+ */
+- QString daysInMonthString( const QDate &pDate, StringFormat format = LongFormat ) const;
++ KDE_DEPRECATED QString daysInMonthString(const QDate &pDate, StringFormat format = LongFormat) const;
+
+ //KDE5 make virtual?
+ /**
++ * @deprecated use formatDate(QDate, KLocale::DateTimeComponant, KLocale::DateTimeComponentFormat)
++ *
+ * @since 4.4
+ *
+ * Returns the days in week for a date as a numeric string
+@@ -1064,11 +1112,11 @@ public:
+ * @return The days in week literal of the date, empty string if any error
+ * @see daysInWeek()
+ */
+- QString daysInWeekString( const QDate &date ) const;
++ KDE_DEPRECATED QString daysInWeekString(const QDate &date) const;
+
+ //KDE5 make protected or remove?
+ /**
+- * @deprecated
++ * @deprecated for internal use only
+ *
+ * Converts a year literal of a part of a string into a integer starting at the beginning of the string
+ *
+@@ -1076,11 +1124,11 @@ public:
+ * @param iLength The number of QChars used, and 0 if no valid symbols was found in the string
+ * @return An integer corresponding to the year
+ */
+- virtual int yearStringToInteger( const QString &sNum, int &iLength ) const;
++ virtual int yearStringToInteger(const QString &sNum, int &iLength) const;
+
+ //KDE5 make protected or remove?
+ /**
+- * @deprecated
++ * @deprecated for internal use only
+ *
+ * Converts a month literal of a part of a string into a integer starting at the beginning of the string
+ *
+@@ -1088,11 +1136,11 @@ public:
+ * @param iLength The number of QChars used, and 0 if no valid symbols was found in the string
+ * @return An integer corresponding to the month
+ */
+- virtual int monthStringToInteger( const QString &sNum, int &iLength ) const;
++ virtual int monthStringToInteger(const QString &sNum, int &iLength) const;
+
+ //KDE5 make protected or remove?
+ /**
+- * @deprecated
++ * @deprecated for internal use only
+ *
+ * Converts a day literal of a part of a string into a integer starting at the beginning of the string
+ *
+@@ -1100,7 +1148,7 @@ public:
+ * @param iLength The number of QChars used, and 0 if no valid symbols was found in the string
+ * @return An integer corresponding to the day
+ */
+- virtual int dayStringToInteger( const QString &sNum, int &iLength ) const;
++ virtual int dayStringToInteger(const QString &sNum, int &iLength) const;
+
+ /**
+ * Returns a string formatted to the current locale's conventions
+@@ -1118,7 +1166,7 @@ public:
+ *
+ * @return The date as a string
+ */
+- virtual QString formatDate( const QDate &fromDate, KLocale::DateFormat toFormat = KLocale::LongDate ) const;
++ virtual QString formatDate(const QDate &fromDate, KLocale::DateFormat toFormat = KLocale::LongDate) const;
+
+ //KDE5 Make virtual
+ /**
+@@ -1237,8 +1285,8 @@ public:
+ *
+ * @return The date as a string
+ */
+- QString formatDate( const QDate &fromDate, const QString &toFormat,
+- KLocale::DateTimeFormatStandard formatStandard = KLocale::KdeFormat ) const;
++ QString formatDate(const QDate &fromDate, const QString &toFormat,
++ KLocale::DateTimeFormatStandard formatStandard = KLocale::KdeFormat) const;
+
+ //KDE5 Make virtual
+ /**
+@@ -1257,8 +1305,8 @@ public:
+ *
+ * @return The date as a string
+ */
+- QString formatDate( const QDate &fromDate, const QString &toFormat, KLocale::DigitSet digitSet,
+- KLocale::DateTimeFormatStandard formatStandard = KLocale::KdeFormat ) const;
++ QString formatDate(const QDate &fromDate, const QString &toFormat, KLocale::DigitSet digitSet,
++ KLocale::DateTimeFormatStandard formatStandard = KLocale::KdeFormat) const;
+
+ //KDE5 Make virtual
+ /**
+@@ -1299,7 +1347,7 @@ public:
+ *
+ * @return the string converted to a QDate
+ */
+- virtual QDate readDate( const QString &str, bool *ok = 0 ) const;
++ virtual QDate readDate(const QString &str, bool *ok = 0) const;
+
+ /**
+ * Converts a localized date string to a QDate.
+@@ -1319,7 +1367,7 @@ public:
+ *
+ * @return the string converted to a QDate
+ */
+- virtual QDate readDate( const QString &str, KLocale::ReadDateFlags flags, bool *ok = 0 ) const;
++ virtual QDate readDate(const QString &str, KLocale::ReadDateFlags flags, bool *ok = 0) const;
+
+ /**
+ * Converts a localized date string to a QDate, using the specified @p format.
+@@ -1334,7 +1382,7 @@ public:
+ * @see formatDate
+ * @see KLocale::readDate
+ */
+- virtual QDate readDate( const QString &dateString, const QString &dateFormat, bool *ok = 0 ) const;
++ virtual QDate readDate(const QString &dateString, const QString &dateFormat, bool *ok = 0) const;
+
+ //KDE5 Make virtual
+ /**
+@@ -1396,8 +1444,8 @@ public:
+ * @see formatDate
+ * @see KLocale::readDate
+ */
+- QDate readDate( const QString &dateString, const QString &dateFormat, bool *ok,
+- KLocale::DateTimeFormatStandard formatStandard ) const;
++ QDate readDate(const QString &dateString, const QString &dateFormat, bool *ok,
++ KLocale::DateTimeFormatStandard formatStandard) const;
+
+ //KDE5 Make virtual
+ /**
+@@ -1448,7 +1496,7 @@ public:
+ * @param inputYear the year number to apply the year window to
+ * @return the year number after applying the year window
+ */
+- int applyShortYearWindow( int inputYear ) const;
++ int applyShortYearWindow(int inputYear) const;
+
+ /**
+ * Use this to determine which day is the first day of the week.
+@@ -1465,6 +1513,8 @@ public:
+ virtual int weekStartDay() const;
+
+ /**
++ * @deprecated use KLocale::weekDayOfPray() instead
++ *
+ * Returns the day of the week traditionally associated with religious
+ * observance for this calendar system. Note this may not be accurate
+ * for the users locale, e.g. Gregorian calendar used in non-Christian
+@@ -1473,7 +1523,7 @@ public:
+ *
+ * @return day number (None = 0, Monday = 1, ..., Sunday = 7)
+ */
+- virtual int weekDayOfPray() const = 0;
++ KDE_DEPRECATED virtual int weekDayOfPray() const = 0;
+
+ /**
+ * Returns whether the calendar is lunar based.
+@@ -1524,7 +1574,7 @@ protected:
+ * @param day day of month returned in this variable
+ * @return @c true if the date is valid, @c false otherwise
+ */
+- virtual bool julianDayToDate( int jd, int &year, int &month, int &day ) const = 0;
++ virtual bool julianDayToDate(int jd, int &year, int &month, int &day) const = 0;
+
+ /**
+ * Internal method to convert YMD values for this calendar system into a
+@@ -1542,7 +1592,7 @@ protected:
+ * @param jd Julian day number returned in this variable
+ * @return @c true if the date is valid, @c false otherwise
+ */
+- virtual bool dateToJulianDay( int year, int month, int day, int &jd ) const = 0;
++ virtual bool dateToJulianDay(int year, int month, int day, int &jd) const = 0;
+
+ /**
+ * Returns the locale used for translations and formats for this
+@@ -1569,25 +1619,25 @@ protected:
+ const KLocale *locale() const;
+
+ /**
+- * @deprecated
++ * @deprecated for internal use only
+ *
+ * Sets the maximum number of months in a year
+ *
+ * Only for internal calendar system use
+ */
+- void setMaxMonthsInYear( int maxMonths );
++ KDE_DEPRECATED void setMaxMonthsInYear(int maxMonths);
+
+ /**
+- * @deprecated
++ * @deprecated for internal use only
+ *
+ * Sets the maximum number of days in a week
+ *
+ * Only for internal calendar system use
+ */
+- void setMaxDaysInWeek( int maxDays );
++ KDE_DEPRECATED void setMaxDaysInWeek(int maxDays);
+
+ /**
+- * @deprecated
++ * @deprecated for internal use only
+ *
+ * @since 4.4
+ *
+@@ -1595,7 +1645,7 @@ protected:
+ *
+ * Only for internal calendar system use
+ */
+- void setHasYear0( bool hasYear0 );
++ KDE_DEPRECATED void setHasYear0(bool hasYear0);
+
+ /**
+ * Constructor of abstract calendar class. This will be called by derived classes.
+@@ -1606,36 +1656,38 @@ protected:
+ if null.
+ * @param locale locale to use for translations. The global locale is used if null.
+ */
+- KCalendarSystem( KCalendarSystemPrivate &dd,
+- const KSharedConfig::Ptr config = KSharedConfig::Ptr(),
+- const KLocale *locale = 0 );
++ KCalendarSystem(KCalendarSystemPrivate &dd,
++ const KSharedConfig::Ptr config = KSharedConfig::Ptr(),
++ const KLocale *locale = 0);
+
+ private:
+ //Required for shared d-pointer as already private, remove in KDE5
+ friend class KCalendarSystemCoptic;
+ friend class KCalendarSystemEthiopian;
+ friend class KCalendarSystemGregorian;
+- friend class KCalendarSystemGregorianProleptic;
+ friend class KCalendarSystemHebrew;
+- friend class KCalendarSystemHijri;
+ friend class KCalendarSystemIndianNational;
++ friend class KCalendarSystemIslamicCivil;
+ friend class KCalendarSystemJalali;
+ friend class KCalendarSystemJapanese;
+ friend class KCalendarSystemJulian;
+ friend class KCalendarSystemMinguo;
++ friend class KCalendarSystemQDate;
+ friend class KCalendarSystemThai;
++ //Other friends that need access to protected/private functions
+ friend class KLocalizedDate;
+ friend class KLocalizedDatePrivate;
+ friend class KDateTimeParser;
++ friend class KDateTable;
+
+ // Era functions needed by friends, may be made public later if needed in KCM
+ QList<KCalendarEra> *eraList() const;
+- KCalendarEra era( const QDate &eraDate ) const;
+- KCalendarEra era( const QString &eraName, int yearInEra ) const;
++ KCalendarEra era(const QDate &eraDate) const;
++ KCalendarEra era(const QString &eraName, int yearInEra) const;
+
+- Q_DISABLE_COPY( KCalendarSystem )
++ Q_DISABLE_COPY(KCalendarSystem)
+ KCalendarSystemPrivate * const d_ptr; // KDE5 make protected
+- Q_DECLARE_PRIVATE( KCalendarSystem )
++ Q_DECLARE_PRIVATE(KCalendarSystem)
+ };
+
+ #endif
+diff --git a/kdecore/date/kcalendarsystemcoptic.cpp b/kdecore/date/kcalendarsystemcoptic.cpp
+index d8ed426..25f4f0d 100644
+--- a/kdecore/date/kcalendarsystemcoptic.cpp
++++ b/kdecore/date/kcalendarsystemcoptic.cpp
+@@ -29,8 +29,8 @@
+
+ // Shared d pointer implementations
+
+-KCalendarSystemCopticPrivate::KCalendarSystemCopticPrivate( KCalendarSystemCoptic *q )
+- :KCalendarSystemPrivate( q )
++KCalendarSystemCopticPrivate::KCalendarSystemCopticPrivate(KCalendarSystemCoptic *q)
++ : KCalendarSystemPrivate(q)
+ {
+ }
+
+@@ -47,22 +47,22 @@ void KCalendarSystemCopticPrivate::loadDefaultEraList()
+ {
+ QString name, shortName, format;
+ // AM for Anno Martyrum or "Year of the Martyrs"
+- name = i18nc( "Calendar Era: Coptic Era of Martyrs, years > 0, LongFormat", "Anno Martyrum" );
+- shortName = i18nc( "Calendar Era: Coptic Era of Martyrs, years > 0, ShortFormat", "AM" );
+- format = i18nc( "(kdedt-format) Coptic, AM, full era year format used for %EY, e.g. 2000 AM", "%Ey %EC" );
+- addEra( '+', 1, q->epoch(), 1, q->latestValidDate(), name, shortName, format );
++ name = i18nc("Calendar Era: Coptic Era of Martyrs, years > 0, LongFormat", "Anno Martyrum");
++ shortName = i18nc("Calendar Era: Coptic Era of Martyrs, years > 0, ShortFormat", "AM");
++ format = i18nc("(kdedt-format) Coptic, AM, full era year format used for %EY, e.g. 2000 AM", "%Ey %EC");
++ addEra('+', 1, q->epoch(), 1, q->latestValidDate(), name, shortName, format);
+ }
+
+-int KCalendarSystemCopticPrivate::monthsInYear( int year ) const
++int KCalendarSystemCopticPrivate::monthsInYear(int year) const
+ {
+- Q_UNUSED( year )
++ Q_UNUSED(year)
+ return 13;
+ }
+
+-int KCalendarSystemCopticPrivate::daysInMonth( int year, int month ) const
++int KCalendarSystemCopticPrivate::daysInMonth(int year, int month) const
+ {
+- if ( month == 13 ) {
+- if ( isLeapYear( year ) ) {
++ if (month == 13) {
++ if (isLeapYear(year)) {
+ return 6;
+ } else {
+ return 5;
+@@ -72,9 +72,9 @@ int KCalendarSystemCopticPrivate::daysInMonth( int year, int month ) const
+ return 30;
+ }
+
+-int KCalendarSystemCopticPrivate::daysInYear( int year ) const
++int KCalendarSystemCopticPrivate::daysInYear(int year) const
+ {
+- if ( isLeapYear( year ) ) {
++ if (isLeapYear(year)) {
+ return 366;
+ } else {
+ return 365;
+@@ -86,16 +86,16 @@ int KCalendarSystemCopticPrivate::daysInWeek() const
+ return 7;
+ }
+
+-bool KCalendarSystemCopticPrivate::isLeapYear( int year ) const
++bool KCalendarSystemCopticPrivate::isLeapYear(int year) const
+ {
+ //Uses same rule as Julian but offset by 1 year with year 3 being first leap year
+- if ( year < 1 ) {
++ if (year < 1) {
+ year = year + 2;
+ } else {
+ year = year + 1;
+ }
+
+- if ( year % 4 == 0 ) {
++ if (year % 4 == 0) {
+ return true;
+ }
+ return false;
+@@ -156,170 +156,170 @@ int KCalendarSystemCopticPrivate::latestValidYear() const
+ // * Mesore Mesori Mesorē Mesra Mesra
+ // * Kouji nabot Pi Kogi Enavot Epagomenē Nasie
+ // *
+-QString KCalendarSystemCopticPrivate::monthName( int month, int year, KLocale::DateTimeComponentFormat format, bool possessive ) const
++QString KCalendarSystemCopticPrivate::monthName(int month, int year, KLocale::DateTimeComponentFormat format, bool possessive) const
+ {
+- Q_UNUSED( year );
++ Q_UNUSED(year);
+
+- if ( format == KLocale::NarrowName ) {
+- switch ( month ) {
++ if (format == KLocale::NarrowName) {
++ switch (month) {
+ case 1:
+- return ki18nc( "Coptic month 1 - KLocale::NarrowName", "T" ).toString( locale() );
++ return ki18nc("Coptic month 1 - KLocale::NarrowName", "T").toString(locale());
+ case 2:
+- return ki18nc( "Coptic month 2 - KLocale::NarrowName", "P" ).toString( locale() );
++ return ki18nc("Coptic month 2 - KLocale::NarrowName", "P").toString(locale());
+ case 3:
+- return ki18nc( "Coptic month 3 - KLocale::NarrowName", "H" ).toString( locale() );
++ return ki18nc("Coptic month 3 - KLocale::NarrowName", "H").toString(locale());
+ case 4:
+- return ki18nc( "Coptic month 4 - KLocale::NarrowName", "K" ).toString( locale() );
++ return ki18nc("Coptic month 4 - KLocale::NarrowName", "K").toString(locale());
+ case 5:
+- return ki18nc( "Coptic month 5 - KLocale::NarrowName", "T" ).toString( locale() );
++ return ki18nc("Coptic month 5 - KLocale::NarrowName", "T").toString(locale());
+ case 6:
+- return ki18nc( "Coptic month 6 - KLocale::NarrowName", "M" ).toString( locale() );
++ return ki18nc("Coptic month 6 - KLocale::NarrowName", "M").toString(locale());
+ case 7:
+- return ki18nc( "Coptic month 7 - KLocale::NarrowName", "P" ).toString( locale() );
++ return ki18nc("Coptic month 7 - KLocale::NarrowName", "P").toString(locale());
+ case 8:
+- return ki18nc( "Coptic month 8 - KLocale::NarrowName", "P" ).toString( locale() );
++ return ki18nc("Coptic month 8 - KLocale::NarrowName", "P").toString(locale());
+ case 9:
+- return ki18nc( "Coptic month 9 - KLocale::NarrowName", "P" ).toString( locale() );
++ return ki18nc("Coptic month 9 - KLocale::NarrowName", "P").toString(locale());
+ case 10:
+- return ki18nc( "Coptic month 10 - KLocale::NarrowName", "P" ).toString( locale() );
++ return ki18nc("Coptic month 10 - KLocale::NarrowName", "P").toString(locale());
+ case 11:
+- return ki18nc( "Coptic month 11 - KLocale::NarrowName", "E" ).toString( locale() );
++ return ki18nc("Coptic month 11 - KLocale::NarrowName", "E").toString(locale());
+ case 12:
+- return ki18nc( "Coptic month 12 - KLocale::NarrowName", "M" ).toString( locale() );
++ return ki18nc("Coptic month 12 - KLocale::NarrowName", "M").toString(locale());
+ case 13:
+- return ki18nc( "Coptic month 13 - KLocale::NarrowName", "K" ).toString( locale() );
++ return ki18nc("Coptic month 13 - KLocale::NarrowName", "K").toString(locale());
+ default:
+ return QString();
+ }
+ }
+
+- if ( format == KLocale::ShortName && possessive ) {
+- switch ( month ) {
++ if (format == KLocale::ShortName && possessive) {
++ switch (month) {
+ case 1:
+- return ki18nc( "Coptic month 1 - KLocale::ShortName Possessive", "of Tho" ).toString( locale() );
++ return ki18nc("Coptic month 1 - KLocale::ShortName Possessive", "of Tho").toString(locale());
+ case 2:
+- return ki18nc( "Coptic month 2 - KLocale::ShortName Possessive", "of Pao" ).toString( locale() );
++ return ki18nc("Coptic month 2 - KLocale::ShortName Possessive", "of Pao").toString(locale());
+ case 3:
+- return ki18nc( "Coptic month 3 - KLocale::ShortName Possessive", "of Hat" ).toString( locale() );
++ return ki18nc("Coptic month 3 - KLocale::ShortName Possessive", "of Hat").toString(locale());
+ case 4:
+- return ki18nc( "Coptic month 4 - KLocale::ShortName Possessive", "of Kia" ).toString( locale() );
++ return ki18nc("Coptic month 4 - KLocale::ShortName Possessive", "of Kia").toString(locale());
+ case 5:
+- return ki18nc( "Coptic month 5 - KLocale::ShortName Possessive", "of Tob" ).toString( locale() );
++ return ki18nc("Coptic month 5 - KLocale::ShortName Possessive", "of Tob").toString(locale());
+ case 6:
+- return ki18nc( "Coptic month 6 - KLocale::ShortName Possessive", "of Mes" ).toString( locale() );
++ return ki18nc("Coptic month 6 - KLocale::ShortName Possessive", "of Mes").toString(locale());
+ case 7:
+- return ki18nc( "Coptic month 7 - KLocale::ShortName Possessive", "of Par" ).toString( locale() );
++ return ki18nc("Coptic month 7 - KLocale::ShortName Possessive", "of Par").toString(locale());
+ case 8:
+- return ki18nc( "Coptic month 8 - KLocale::ShortName Possessive", "of Pam" ).toString( locale() );
++ return ki18nc("Coptic month 8 - KLocale::ShortName Possessive", "of Pam").toString(locale());
+ case 9:
+- return ki18nc( "Coptic month 9 - KLocale::ShortName Possessive", "of Pas" ).toString( locale() );
++ return ki18nc("Coptic month 9 - KLocale::ShortName Possessive", "of Pas").toString(locale());
+ case 10:
+- return ki18nc( "Coptic month 10 - KLocale::ShortName Possessive", "of Pan" ).toString( locale() );
++ return ki18nc("Coptic month 10 - KLocale::ShortName Possessive", "of Pan").toString(locale());
+ case 11:
+- return ki18nc( "Coptic month 11 - KLocale::ShortName Possessive", "of Epe" ).toString( locale() );
++ return ki18nc("Coptic month 11 - KLocale::ShortName Possessive", "of Epe").toString(locale());
+ case 12:
+- return ki18nc( "Coptic month 12 - KLocale::ShortName Possessive", "of Meo" ).toString( locale() );
++ return ki18nc("Coptic month 12 - KLocale::ShortName Possessive", "of Meo").toString(locale());
+ case 13:
+- return ki18nc( "Coptic month 13 - KLocale::ShortName Possessive", "of Kou" ).toString( locale() );
++ return ki18nc("Coptic month 13 - KLocale::ShortName Possessive", "of Kou").toString(locale());
+ default:
+ return QString();
+ }
+ }
+
+- if ( format == KLocale::ShortName && !possessive ) {
+- switch ( month ) {
++ if (format == KLocale::ShortName && !possessive) {
++ switch (month) {
+ case 1:
+- return ki18nc( "Coptic month 1 - KLocale::ShortName", "Tho" ).toString( locale() );
++ return ki18nc("Coptic month 1 - KLocale::ShortName", "Tho").toString(locale());
+ case 2:
+- return ki18nc( "Coptic month 2 - KLocale::ShortName", "Pao" ).toString( locale() );
++ return ki18nc("Coptic month 2 - KLocale::ShortName", "Pao").toString(locale());
+ case 3:
+- return ki18nc( "Coptic month 3 - KLocale::ShortName", "Hat" ).toString( locale() );
++ return ki18nc("Coptic month 3 - KLocale::ShortName", "Hat").toString(locale());
+ case 4:
+- return ki18nc( "Coptic month 4 - KLocale::ShortName", "Kia" ).toString( locale() );
++ return ki18nc("Coptic month 4 - KLocale::ShortName", "Kia").toString(locale());
+ case 5:
+- return ki18nc( "Coptic month 5 - KLocale::ShortName", "Tob" ).toString( locale() );
++ return ki18nc("Coptic month 5 - KLocale::ShortName", "Tob").toString(locale());
+ case 6:
+- return ki18nc( "Coptic month 6 - KLocale::ShortName", "Mes" ).toString( locale() );
++ return ki18nc("Coptic month 6 - KLocale::ShortName", "Mes").toString(locale());
+ case 7:
+- return ki18nc( "Coptic month 7 - KLocale::ShortName", "Par" ).toString( locale() );
++ return ki18nc("Coptic month 7 - KLocale::ShortName", "Par").toString(locale());
+ case 8:
+- return ki18nc( "Coptic month 8 - KLocale::ShortName", "Pam" ).toString( locale() );
++ return ki18nc("Coptic month 8 - KLocale::ShortName", "Pam").toString(locale());
+ case 9:
+- return ki18nc( "Coptic month 9 - KLocale::ShortName", "Pas" ).toString( locale() );
++ return ki18nc("Coptic month 9 - KLocale::ShortName", "Pas").toString(locale());
+ case 10:
+- return ki18nc( "Coptic month 10 - KLocale::ShortName", "Pan" ).toString( locale() );
++ return ki18nc("Coptic month 10 - KLocale::ShortName", "Pan").toString(locale());
+ case 11:
+- return ki18nc( "Coptic month 11 - KLocale::ShortName", "Epe" ).toString( locale() );
++ return ki18nc("Coptic month 11 - KLocale::ShortName", "Epe").toString(locale());
+ case 12:
+- return ki18nc( "Coptic month 12 - KLocale::ShortName", "Meo" ).toString( locale() );
++ return ki18nc("Coptic month 12 - KLocale::ShortName", "Meo").toString(locale());
+ case 13:
+- return ki18nc( "Coptic month 12 - KLocale::ShortName", "Kou" ).toString( locale() );
++ return ki18nc("Coptic month 12 - KLocale::ShortName", "Kou").toString(locale());
+ default:
+ return QString();
+ }
+ }
+
+- if ( format == KLocale::LongName && possessive ) {
+- switch ( month ) {
++ if (format == KLocale::LongName && possessive) {
++ switch (month) {
+ case 1:
+- return ki18nc( "Coptic month 1 - KLocale::LongName Possessive", "of Thoout" ).toString( locale() );
++ return ki18nc("Coptic month 1 - KLocale::LongName Possessive", "of Thoout").toString(locale());
+ case 2:
+- return ki18nc( "Coptic month 2 - KLocale::LongName Possessive", "of Paope" ).toString( locale() );
++ return ki18nc("Coptic month 2 - KLocale::LongName Possessive", "of Paope").toString(locale());
+ case 3:
+- return ki18nc( "Coptic month 3 - KLocale::LongName Possessive", "of Hathor" ).toString( locale() );
++ return ki18nc("Coptic month 3 - KLocale::LongName Possessive", "of Hathor").toString(locale());
+ case 4:
+- return ki18nc( "Coptic month 4 - KLocale::LongName Possessive", "of Kiahk" ).toString( locale() );
++ return ki18nc("Coptic month 4 - KLocale::LongName Possessive", "of Kiahk").toString(locale());
+ case 5:
+- return ki18nc( "Coptic month 5 - KLocale::LongName Possessive", "of Tobe" ).toString( locale() );
++ return ki18nc("Coptic month 5 - KLocale::LongName Possessive", "of Tobe").toString(locale());
+ case 6:
+- return ki18nc( "Coptic month 6 - KLocale::LongName Possessive", "of Meshir" ).toString( locale() );
++ return ki18nc("Coptic month 6 - KLocale::LongName Possessive", "of Meshir").toString(locale());
+ case 7:
+- return ki18nc( "Coptic month 7 - KLocale::LongName Possessive", "of Paremhotep" ).toString( locale() );
++ return ki18nc("Coptic month 7 - KLocale::LongName Possessive", "of Paremhotep").toString(locale());
+ case 8:
+- return ki18nc( "Coptic month 8 - KLocale::LongName Possessive", "of Parmoute" ).toString( locale() );
++ return ki18nc("Coptic month 8 - KLocale::LongName Possessive", "of Parmoute").toString(locale());
+ case 9:
+- return ki18nc( "Coptic month 9 - KLocale::LongName Possessive", "of Pashons" ).toString( locale() );
++ return ki18nc("Coptic month 9 - KLocale::LongName Possessive", "of Pashons").toString(locale());
+ case 10:
+- return ki18nc( "Coptic month 10 - KLocale::LongName Possessive", "of Paone" ).toString( locale() );
++ return ki18nc("Coptic month 10 - KLocale::LongName Possessive", "of Paone").toString(locale());
+ case 11:
+- return ki18nc( "Coptic month 11 - KLocale::LongName Possessive", "of Epep" ).toString( locale() );
++ return ki18nc("Coptic month 11 - KLocale::LongName Possessive", "of Epep").toString(locale());
+ case 12:
+- return ki18nc( "Coptic month 12 - KLocale::LongName Possessive", "of Mesore" ).toString( locale() );
++ return ki18nc("Coptic month 12 - KLocale::LongName Possessive", "of Mesore").toString(locale());
+ case 13:
+- return ki18nc( "Coptic month 12 - KLocale::LongName Possessive", "of Kouji nabot" ).toString( locale() );
++ return ki18nc("Coptic month 12 - KLocale::LongName Possessive", "of Kouji nabot").toString(locale());
+ default:
+ return QString();
+ }
+ }
+
+ // Default to LongName
+- switch ( month ) {
++ switch (month) {
+ case 1:
+- return ki18nc( "Coptic month 1 - KLocale::LongName", "Thoout" ).toString( locale() );
++ return ki18nc("Coptic month 1 - KLocale::LongName", "Thoout").toString(locale());
+ case 2:
+- return ki18nc( "Coptic month 2 - KLocale::LongName", "Paope" ).toString( locale() );
++ return ki18nc("Coptic month 2 - KLocale::LongName", "Paope").toString(locale());
+ case 3:
+- return ki18nc( "Coptic month 3 - KLocale::LongName", "Hathor" ).toString( locale() );
++ return ki18nc("Coptic month 3 - KLocale::LongName", "Hathor").toString(locale());
+ case 4:
+- return ki18nc( "Coptic month 4 - KLocale::LongName", "Kiahk" ).toString( locale() );
++ return ki18nc("Coptic month 4 - KLocale::LongName", "Kiahk").toString(locale());
+ case 5:
+- return ki18nc( "Coptic month 5 - KLocale::LongName", "Tobe" ).toString( locale() );
++ return ki18nc("Coptic month 5 - KLocale::LongName", "Tobe").toString(locale());
+ case 6:
+- return ki18nc( "Coptic month 6 - KLocale::LongName", "Meshir" ).toString( locale() );
++ return ki18nc("Coptic month 6 - KLocale::LongName", "Meshir").toString(locale());
+ case 7:
+- return ki18nc( "Coptic month 7 - KLocale::LongName", "Paremhotep" ).toString( locale() );
++ return ki18nc("Coptic month 7 - KLocale::LongName", "Paremhotep").toString(locale());
+ case 8:
+- return ki18nc( "Coptic month 8 - KLocale::LongName", "Parmoute" ).toString( locale() );
++ return ki18nc("Coptic month 8 - KLocale::LongName", "Parmoute").toString(locale());
+ case 9:
+- return ki18nc( "Coptic month 9 - KLocale::LongName", "Pashons" ).toString( locale() );
++ return ki18nc("Coptic month 9 - KLocale::LongName", "Pashons").toString(locale());
+ case 10:
+- return ki18nc( "Coptic month 10 - KLocale::LongName", "Paone" ).toString( locale() );
++ return ki18nc("Coptic month 10 - KLocale::LongName", "Paone").toString(locale());
+ case 11:
+- return ki18nc( "Coptic month 11 - KLocale::LongName", "Epep" ).toString( locale() );
++ return ki18nc("Coptic month 11 - KLocale::LongName", "Epep").toString(locale());
+ case 12:
+- return ki18nc( "Coptic month 12 - KLocale::LongName", "Mesore" ).toString( locale() );
++ return ki18nc("Coptic month 12 - KLocale::LongName", "Mesore").toString(locale());
+ case 13:
+- return ki18nc( "Coptic month 12 - KLocale::LongName", "Kouji nabot" ).toString( locale() );
++ return ki18nc("Coptic month 12 - KLocale::LongName", "Kouji nabot").toString(locale());
+ default:
+ return QString();
+ }
+@@ -327,115 +327,111 @@ QString KCalendarSystemCopticPrivate::monthName( int month, int year, KLocale::D
+
+ // Names taken from from the Sahidic dialect transliterations used in Dershowitz & Reingold which went out of use in the 11th centuary
+ // Boharic or Arabic transliterations would be preferred but none could be found
+-QString KCalendarSystemCopticPrivate::weekDayName( int weekDay, KLocale::DateTimeComponentFormat format ) const
++QString KCalendarSystemCopticPrivate::weekDayName(int weekDay, KLocale::DateTimeComponentFormat format) const
+ {
+- if ( format == KLocale::NarrowName ) {
+- switch ( weekDay ) {
++ if (format == KLocale::NarrowName) {
++ switch (weekDay) {
+ case 1:
+- return ki18nc( "Coptic weekday 1 - KLocale::NarrowName", "P" ).toString( locale() );
++ return ki18nc("Coptic weekday 1 - KLocale::NarrowName", "P").toString(locale());
+ case 2:
+- return ki18nc( "Coptic weekday 2 - KLocale::NarrowName", "P" ).toString( locale() );
++ return ki18nc("Coptic weekday 2 - KLocale::NarrowName", "P").toString(locale());
+ case 3:
+- return ki18nc( "Coptic weekday 3 - KLocale::NarrowName", "P" ).toString( locale() );
++ return ki18nc("Coptic weekday 3 - KLocale::NarrowName", "P").toString(locale());
+ case 4:
+- return ki18nc( "Coptic weekday 4 - KLocale::NarrowName", "P" ).toString( locale() );
++ return ki18nc("Coptic weekday 4 - KLocale::NarrowName", "P").toString(locale());
+ case 5:
+- return ki18nc( "Coptic weekday 5 - KLocale::NarrowName", "P" ).toString( locale() );
++ return ki18nc("Coptic weekday 5 - KLocale::NarrowName", "P").toString(locale());
+ case 6:
+- return ki18nc( "Coptic weekday 6 - KLocale::NarrowName", "P" ).toString( locale() );
++ return ki18nc("Coptic weekday 6 - KLocale::NarrowName", "P").toString(locale());
+ case 7:
+- return ki18nc( "Coptic weekday 7 - KLocale::NarrowName", "T" ).toString( locale() );
++ return ki18nc("Coptic weekday 7 - KLocale::NarrowName", "T").toString(locale());
+ default:
+ return QString();
+ }
+ }
+
+- if ( format == KLocale::ShortName || format == KLocale:: ShortNumber ) {
+- switch ( weekDay ) {
++ if (format == KLocale::ShortName || format == KLocale:: ShortNumber) {
++ switch (weekDay) {
+ case 1:
+- return ki18nc( "Coptic weekday 1 - KLocale::ShortName", "Pes" ).toString( locale() );
++ return ki18nc("Coptic weekday 1 - KLocale::ShortName", "Pes").toString(locale());
+ case 2:
+- return ki18nc( "Coptic weekday 2 - KLocale::ShortName", "Psh" ).toString( locale() );
++ return ki18nc("Coptic weekday 2 - KLocale::ShortName", "Psh").toString(locale());
+ case 3:
+- return ki18nc( "Coptic weekday 3 - KLocale::ShortName", "Pef" ).toString( locale() );
++ return ki18nc("Coptic weekday 3 - KLocale::ShortName", "Pef").toString(locale());
+ case 4:
+- return ki18nc( "Coptic weekday 4 - KLocale::ShortName", "Pti" ).toString( locale() );
++ return ki18nc("Coptic weekday 4 - KLocale::ShortName", "Pti").toString(locale());
+ case 5:
+- return ki18nc( "Coptic weekday 5 - KLocale::ShortName", "Pso" ).toString( locale() );
++ return ki18nc("Coptic weekday 5 - KLocale::ShortName", "Pso").toString(locale());
+ case 6:
+- return ki18nc( "Coptic weekday 6 - KLocale::ShortName", "Psa" ).toString( locale() );
++ return ki18nc("Coptic weekday 6 - KLocale::ShortName", "Psa").toString(locale());
+ case 7:
+- return ki18nc( "Coptic weekday 7 - KLocale::ShortName", "Tky" ).toString( locale() );
++ return ki18nc("Coptic weekday 7 - KLocale::ShortName", "Tky").toString(locale());
+ default:
+ return QString();
+ }
+ }
+
+- switch ( weekDay ) {
++ switch (weekDay) {
+ case 1:
+- return ki18nc( "Coptic weekday 1 - KLocale::LongName", "Pesnau" ).toString( locale() );
++ return ki18nc("Coptic weekday 1 - KLocale::LongName", "Pesnau").toString(locale());
+ case 2:
+- return ki18nc( "Coptic weekday 2 - KLocale::LongName", "Pshoment" ).toString( locale() );
++ return ki18nc("Coptic weekday 2 - KLocale::LongName", "Pshoment").toString(locale());
+ case 3:
+- return ki18nc( "Coptic weekday 3 - KLocale::LongName", "Peftoou" ).toString( locale() );
++ return ki18nc("Coptic weekday 3 - KLocale::LongName", "Peftoou").toString(locale());
+ case 4:
+- return ki18nc( "Coptic weekday 4 - KLocale::LongName", "Ptiou" ).toString( locale() );
++ return ki18nc("Coptic weekday 4 - KLocale::LongName", "Ptiou").toString(locale());
+ case 5:
+- return ki18nc( "Coptic weekday 5 - KLocale::LongName", "Psoou" ).toString( locale() );
++ return ki18nc("Coptic weekday 5 - KLocale::LongName", "Psoou").toString(locale());
+ case 6:
+- return ki18nc( "Coptic weekday 6 - KLocale::LongName", "Psabbaton" ).toString( locale() );
++ return ki18nc("Coptic weekday 6 - KLocale::LongName", "Psabbaton").toString(locale());
+ case 7:
+- return ki18nc( "Coptic weekday 7 - KLocale::LongName", "Tkyriakē" ).toString( locale() );
++ return ki18nc("Coptic weekday 7 - KLocale::LongName", "Tkyriakē").toString(locale());
+ default:
+ return QString();
+ }
+ }
+
+
+-KCalendarSystemCoptic::KCalendarSystemCoptic( const KLocale *locale )
+- : KCalendarSystem( *new KCalendarSystemCopticPrivate( this ), KSharedConfig::Ptr(), locale ),
+- dont_use( 0 )
++KCalendarSystemCoptic::KCalendarSystemCoptic(const KLocale *locale)
++ : KCalendarSystem(*new KCalendarSystemCopticPrivate(this), KSharedConfig::Ptr(), locale)
+ {
+- d_ptr->loadConfig( calendarType() );
++ d_ptr->loadConfig(calendarType());
+ }
+
+-KCalendarSystemCoptic::KCalendarSystemCoptic( const KSharedConfig::Ptr config, const KLocale *locale )
+- : KCalendarSystem( *new KCalendarSystemCopticPrivate( this ), config, locale ),
+- dont_use( 0 )
++KCalendarSystemCoptic::KCalendarSystemCoptic(const KSharedConfig::Ptr config, const KLocale *locale)
++ : KCalendarSystem(*new KCalendarSystemCopticPrivate(this), config, locale)
+ {
+- d_ptr->loadConfig( calendarType() );
++ d_ptr->loadConfig(calendarType());
+ }
+
+-KCalendarSystemCoptic::KCalendarSystemCoptic( KCalendarSystemCopticPrivate &dd,
+- const KSharedConfig::Ptr config, const KLocale *locale )
+- : KCalendarSystem( dd, config, locale ),
+- dont_use( 0 )
++KCalendarSystemCoptic::KCalendarSystemCoptic(KCalendarSystemCopticPrivate &dd,
++ const KSharedConfig::Ptr config, const KLocale *locale)
++ : KCalendarSystem(dd, config, locale)
+ {
+- d_ptr->loadConfig( calendarType() );
++ d_ptr->loadConfig(calendarType());
+ }
+
+ KCalendarSystemCoptic::~KCalendarSystemCoptic()
+ {
+- delete dont_use;
+ }
+
+ QString KCalendarSystemCoptic::calendarType() const
+ {
+- return QLatin1String( "coptic" );
++ return QLatin1String("coptic");
+ }
+
+ QDate KCalendarSystemCoptic::epoch() const
+ {
+ //0001-01-01, no Year 0.
+ //0284-08-29 AD Julian
+- return QDate::fromJulianDay( 1825030 );
++ return QDate::fromJulianDay(1825030);
+ }
+
+ QDate KCalendarSystemCoptic::earliestValidDate() const
+ {
+ //0001-01-01, no Year 0.
+ //0284-08-29 AD Julian
+- return QDate::fromJulianDay( 1825030 );
++ return QDate::fromJulianDay(1825030);
+ }
+
+ QDate KCalendarSystemCoptic::latestValidDate() const
+@@ -443,188 +439,47 @@ QDate KCalendarSystemCoptic::latestValidDate() const
+ // Set to last day of year 9999 until confirm date formats & widgets support > 9999
+ //9999-12-30
+ //10283-08-29 AD Julian
+- return QDate::fromJulianDay( 5477164 );
++ return QDate::fromJulianDay(5477164);
+ }
+
+-bool KCalendarSystemCoptic::isValid( int year, int month, int day ) const
++bool KCalendarSystemCoptic::isValid(int year, int month, int day) const
+ {
+- return KCalendarSystem::isValid( year, month, day );
++ return KCalendarSystem::isValid(year, month, day);
+ }
+
+-bool KCalendarSystemCoptic::isValid( const QDate &date ) const
++bool KCalendarSystemCoptic::isValid(const QDate &date) const
+ {
+- return KCalendarSystem::isValid( date );
++ return KCalendarSystem::isValid(date);
+ }
+
+-bool KCalendarSystemCoptic::setDate( QDate &date, int year, int month, int day ) const
++bool KCalendarSystemCoptic::isLeapYear(int year) const
+ {
+- return KCalendarSystem::setDate( date, year, month, day );
++ return KCalendarSystem::isLeapYear(year);
+ }
+
+-// Deprecated
+-bool KCalendarSystemCoptic::setYMD( QDate &date, int y, int m, int d ) const
++bool KCalendarSystemCoptic::isLeapYear(const QDate &date) const
+ {
+- return KCalendarSystem::setDate( date, y, m, d );
++ return KCalendarSystem::isLeapYear(date);
+ }
+
+-int KCalendarSystemCoptic::year( const QDate &date ) const
++QString KCalendarSystemCoptic::monthName(int month, int year, MonthNameFormat format) const
+ {
+- return KCalendarSystem::year( date );
++ return KCalendarSystem::monthName(month, year, format);
+ }
+
+-int KCalendarSystemCoptic::month( const QDate &date ) const
++QString KCalendarSystemCoptic::monthName(const QDate &date, MonthNameFormat format) const
+ {
+- return KCalendarSystem::month( date );
++ return KCalendarSystem::monthName(date, format);
+ }
+
+-int KCalendarSystemCoptic::day( const QDate &date ) const
++QString KCalendarSystemCoptic::weekDayName(int weekDay, WeekDayNameFormat format) const
+ {
+- return KCalendarSystem::day( date );
++ return KCalendarSystem::weekDayName(weekDay, format);
+ }
+
+-QDate KCalendarSystemCoptic::addYears( const QDate &date, int nyears ) const
++QString KCalendarSystemCoptic::weekDayName(const QDate &date, WeekDayNameFormat format) const
+ {
+- return KCalendarSystem::addYears( date, nyears );
+-}
+-
+-QDate KCalendarSystemCoptic::addMonths( const QDate &date, int nmonths ) const
+-{
+- return KCalendarSystem::addMonths( date, nmonths );
+-}
+-
+-QDate KCalendarSystemCoptic::addDays( const QDate &date, int ndays ) const
+-{
+- return KCalendarSystem::addDays( date, ndays );
+-}
+-
+-int KCalendarSystemCoptic::monthsInYear( const QDate &date ) const
+-{
+- return KCalendarSystem::monthsInYear( date );
+-}
+-
+-int KCalendarSystemCoptic::weeksInYear( const QDate &date ) const
+-{
+- return KCalendarSystem::weeksInYear( date );
+-}
+-
+-int KCalendarSystemCoptic::weeksInYear( int year ) const
+-{
+- return KCalendarSystem::weeksInYear( year );
+-}
+-
+-int KCalendarSystemCoptic::daysInYear( const QDate &date ) const
+-{
+- return KCalendarSystem::daysInYear( date );
+-}
+-
+-int KCalendarSystemCoptic::daysInMonth( const QDate &date ) const
+-{
+- return KCalendarSystem::daysInMonth( date );
+-}
+-
+-int KCalendarSystemCoptic::daysInWeek( const QDate &date ) const
+-{
+- return KCalendarSystem::daysInWeek( date );
+-}
+-
+-int KCalendarSystemCoptic::dayOfYear( const QDate &date ) const
+-{
+- return KCalendarSystem::dayOfYear( date );
+-}
+-
+-int KCalendarSystemCoptic::dayOfWeek( const QDate &date ) const
+-{
+- return KCalendarSystem::dayOfWeek( date );
+-}
+-
+-int KCalendarSystemCoptic::weekNumber( const QDate &date, int * yearNum ) const
+-{
+- return KCalendarSystem::weekNumber( date, yearNum );
+-}
+-
+-bool KCalendarSystemCoptic::isLeapYear( int year ) const
+-{
+- return KCalendarSystem::isLeapYear( year );
+-}
+-
+-bool KCalendarSystemCoptic::isLeapYear( const QDate &date ) const
+-{
+- return KCalendarSystem::isLeapYear( date );
+-}
+-
+-QString KCalendarSystemCoptic::monthName( int month, int year, MonthNameFormat format ) const
+-{
+- return KCalendarSystem::monthName( month, year, format );
+-}
+-
+-QString KCalendarSystemCoptic::monthName( const QDate &date, MonthNameFormat format ) const
+-{
+- return KCalendarSystem::monthName( date, format );
+-}
+-
+-QString KCalendarSystemCoptic::weekDayName( int weekDay, WeekDayNameFormat format ) const
+-{
+- return KCalendarSystem::weekDayName( weekDay, format );
+-}
+-
+-QString KCalendarSystemCoptic::weekDayName( const QDate &date, WeekDayNameFormat format ) const
+-{
+- return KCalendarSystem::weekDayName( date, format );
+-}
+-
+-QString KCalendarSystemCoptic::yearString( const QDate &pDate, StringFormat format ) const
+-{
+- return KCalendarSystem::yearString( pDate, format );
+-}
+-
+-QString KCalendarSystemCoptic::monthString( const QDate &pDate, StringFormat format ) const
+-{
+- return KCalendarSystem::monthString( pDate, format );
+-}
+-
+-QString KCalendarSystemCoptic::dayString( const QDate &pDate, StringFormat format ) const
+-{
+- return KCalendarSystem::dayString( pDate, format );
+-}
+-
+-int KCalendarSystemCoptic::yearStringToInteger( const QString &sNum, int &iLength ) const
+-{
+- return KCalendarSystem::yearStringToInteger( sNum, iLength );
+-}
+-
+-int KCalendarSystemCoptic::monthStringToInteger( const QString &sNum, int &iLength ) const
+-{
+- return KCalendarSystem::monthStringToInteger( sNum, iLength );
+-}
+-
+-int KCalendarSystemCoptic::dayStringToInteger( const QString &sNum, int &iLength ) const
+-{
+- return KCalendarSystem::dayStringToInteger( sNum, iLength );
+-}
+-
+-QString KCalendarSystemCoptic::formatDate( const QDate &date, KLocale::DateFormat format ) const
+-{
+- return KCalendarSystem::formatDate( date, format );
+-}
+-
+-QDate KCalendarSystemCoptic::readDate( const QString &str, bool *ok ) const
+-{
+- return KCalendarSystem::readDate( str, ok );
+-}
+-
+-QDate KCalendarSystemCoptic::readDate( const QString &intstr, const QString &fmt, bool *ok ) const
+-{
+- return KCalendarSystem::readDate( intstr, fmt, ok );
+-}
+-
+-QDate KCalendarSystemCoptic::readDate( const QString &str, KLocale::ReadDateFlags flags, bool *ok ) const
+-{
+- return KCalendarSystem::readDate( str, flags, ok );
+-}
+-
+-int KCalendarSystemCoptic::weekStartDay() const
+-{
+- return KCalendarSystem::weekStartDay();
++ return KCalendarSystem::weekDayName(date, format);
+ }
+
+ int KCalendarSystemCoptic::weekDayOfPray() const
+@@ -652,7 +507,7 @@ bool KCalendarSystemCoptic::isProleptic() const
+ return false;
+ }
+
+-bool KCalendarSystemCoptic::julianDayToDate( int jd, int &year, int &month, int &day ) const
++bool KCalendarSystemCoptic::julianDayToDate(int jd, int &year, int &month, int &day) const
+ {
+ //The Coptic calendar has 12 months of 30 days, a 13th month of 5 or 6 days,
+ //and a leap year every 4th year without fail that falls on the last day of
+@@ -663,32 +518,32 @@ bool KCalendarSystemCoptic::julianDayToDate( int jd, int &year, int &month, int
+ //pattern of 365/365/365/366 with the leap day the very last day makes the maths easier.
+
+ //Day number in the fake epoch, 0 indexed
+- int dayInEpoch = jd - ( epoch().toJulianDay() - 365 );
++ int dayInEpoch = jd - (epoch().toJulianDay() - 365);
+ //How many full 4 year leap cycles have been completed, 1461 = (365*3)+366
+ int leapCyclesCompleted = dayInEpoch / 1461;
+ //Which year are we in the current 4 year leap cycle, 0 indexed
+ //Need the qMin as day 366 of 4th year of cycle returns following year (max 3 as 0 index)
+- int yearInCurrentLeapCycle = qMin( 3, ( dayInEpoch % 1461 ) / 365 );
++ int yearInCurrentLeapCycle = qMin(3, (dayInEpoch % 1461) / 365);
+ //Calculate the year
+- year = ( leapCyclesCompleted * 4 ) + yearInCurrentLeapCycle;
++ year = (leapCyclesCompleted * 4) + yearInCurrentLeapCycle;
+ //Days since the fake epoch up to 1st day of this year
+- int daysBeforeThisYear = ( year * 365 ) + ( year / 4 );
++ int daysBeforeThisYear = (year * 365) + (year / 4);
+ //Gives the day number in this year, 0 indexed
+ int dayOfThisYear = dayInEpoch - daysBeforeThisYear;
+ //Then just calculate month and day from that based on regular 30 day months
+- month = ( ( dayOfThisYear ) / 30 ) + 1;
+- day = dayOfThisYear - ( ( month - 1 ) * 30 ) + 1;
++ month = ((dayOfThisYear) / 30) + 1;
++ day = dayOfThisYear - ((month - 1) * 30) + 1;
+
+ // If year is -ve then is BC. In Coptic there is no year 0, but the maths
+ // is easier if we pretend there is, so internally year of 0 = 1BC = -1 outside
+- if ( year < 1 ) {
++ if (year < 1) {
+ year = year - 1;
+ }
+
+ return true;
+ }
+
+-bool KCalendarSystemCoptic::dateToJulianDay( int year, int month, int day, int &jd ) const
++bool KCalendarSystemCoptic::dateToJulianDay(int year, int month, int day, int &jd) const
+ {
+ //The Coptic calendar has 12 months of 30 days, a 13th month of 5 or 6 days,
+ //and a leap year every 4th year without fail that falls on the last day of
+@@ -699,17 +554,17 @@ bool KCalendarSystemCoptic::dateToJulianDay( int year, int month, int day, int &
+ // If year is -ve then is 'BC'. In Coptic there is no year 0, but the maths
+ // is easier if we pretend there is, so internally year of -1 = 1BC = 0 internally
+ int y;
+- if ( year < 1 ) {
++ if (year < 1) {
+ y = year + 1;
+ } else {
+ y = year;
+ }
+
+ jd = epoch().toJulianDay() - 1 // jd of day before Epoch
+- + ( ( y - 1 ) * 365 ) // Add all normal days in years preceding
+- + ( y / 4 ) // Add all leap days in years preceding
+- + ( ( month - 1 ) * 30 ) // Add days this year in months preceding
+- + day; // Add days in this month
++ + ((y - 1) * 365) // Add all normal days in years preceding
++ + (y / 4) // Add all leap days in years preceding
++ + ((month - 1) * 30) // Add days this year in months preceding
++ + day; // Add days in this month
+
+ return true;
+ }
+diff --git a/kdecore/date/kcalendarsystemcoptic_p.h b/kdecore/date/kcalendarsystemcoptic_p.h
+index e62c0e2..d7498a4 100644
+--- a/kdecore/date/kcalendarsystemcoptic_p.h
++++ b/kdecore/date/kcalendarsystemcoptic_p.h
+@@ -37,8 +37,8 @@ class KCalendarSystemCopticPrivate;
+ class KCalendarSystemCoptic: public KCalendarSystem
+ {
+ public:
+- explicit KCalendarSystemCoptic( const KLocale *locale = 0 );
+- explicit KCalendarSystemCoptic( const KSharedConfig::Ptr config, const KLocale *locale = 0 );
++ explicit KCalendarSystemCoptic(const KLocale *locale = 0);
++ explicit KCalendarSystemCoptic(const KSharedConfig::Ptr config, const KLocale *locale = 0);
+ virtual ~KCalendarSystemCoptic();
+
+ virtual QString calendarType() const;
+@@ -46,58 +46,19 @@ public:
+ virtual QDate epoch() const;
+ virtual QDate earliestValidDate() const;
+ virtual QDate latestValidDate() const;
+- virtual bool isValid( int year, int month, int day ) const;
+- virtual bool isValid( const QDate &date ) const;
++ virtual bool isValid(int year, int month, int day) const;
++ virtual bool isValid(const QDate &date) const;
+
+- virtual bool setDate( QDate &date, int year, int month, int day ) const;
+- /** @deprecated */
+- virtual bool setYMD( QDate &date, int year, int month, int day ) const;
++ virtual bool isLeapYear(int year) const;
++ virtual bool isLeapYear(const QDate &date) const;
+
+- virtual int year( const QDate &date ) const;
+- virtual int month( const QDate &date ) const;
+- virtual int day( const QDate &date ) const;
++ virtual QString monthName(int month, int year, MonthNameFormat format = LongName) const;
++ virtual QString monthName(const QDate &date, MonthNameFormat format = LongName) const;
+
+- virtual QDate addYears( const QDate &date, int nyears ) const;
+- virtual QDate addMonths( const QDate &date, int nmonths ) const;
+- virtual QDate addDays( const QDate &date, int ndays ) const;
++ virtual QString weekDayName(int weekDay, WeekDayNameFormat format = LongDayName) const;
++ virtual QString weekDayName(const QDate &date, WeekDayNameFormat format = LongDayName) const;
+
+- virtual int monthsInYear( const QDate &date ) const;
+- virtual int weeksInYear( const QDate &date ) const;
+- virtual int weeksInYear( int year ) const;
+- virtual int daysInYear( const QDate &date ) const;
+- virtual int daysInMonth( const QDate &date ) const;
+- virtual int daysInWeek( const QDate &date ) const;
+-
+- virtual int dayOfYear( const QDate &date ) const;
+- virtual int dayOfWeek( const QDate &date ) const;
+-
+- virtual int weekNumber( const QDate &date, int *yearNum = 0 ) const;
+-
+- virtual bool isLeapYear( int year ) const;
+- virtual bool isLeapYear( const QDate &date ) const;
+-
+- virtual QString monthName( int month, int year, MonthNameFormat format = LongName ) const;
+- virtual QString monthName( const QDate &date, MonthNameFormat format = LongName ) const;
+-
+- virtual QString weekDayName( int weekDay, WeekDayNameFormat format = LongDayName ) const;
+- virtual QString weekDayName( const QDate &date, WeekDayNameFormat format = LongDayName ) const;
+-
+- virtual QString yearString( const QDate & pDate, StringFormat format = LongFormat ) const;
+- virtual QString monthString( const QDate &pDate, StringFormat format = LongFormat ) const;
+- virtual QString dayString( const QDate &pDate, StringFormat format = LongFormat ) const;
+-
+- virtual int yearStringToInteger( const QString &sNum, int &iLength ) const;
+- virtual int monthStringToInteger( const QString &sNum, int &iLength ) const;
+- virtual int dayStringToInteger( const QString &sNum, int &iLength ) const;
+-
+- virtual QString formatDate( const QDate &fromDate, KLocale::DateFormat toFormat = KLocale::LongDate ) const;
+-
+- virtual QDate readDate( const QString &str, bool *ok = 0 ) const;
+- virtual QDate readDate( const QString &dateString, const QString &dateFormat, bool *ok = 0 ) const;
+- virtual QDate readDate( const QString &str, KLocale::ReadDateFlags flags, bool *ok = 0 ) const;
+-
+- virtual int weekStartDay() const;
+- virtual int weekDayOfPray () const;
++ virtual int weekDayOfPray() const;
+
+ virtual bool isLunar() const;
+ virtual bool isLunisolar() const;
+@@ -105,14 +66,13 @@ public:
+ virtual bool isProleptic() const;
+
+ protected:
+- virtual bool julianDayToDate( int jd, int &year, int &month, int &day ) const;
+- virtual bool dateToJulianDay( int year, int month, int day, int &jd ) const;
+- KCalendarSystemCoptic( KCalendarSystemCopticPrivate &dd, const KSharedConfig::Ptr config = KSharedConfig::Ptr(),
+- const KLocale *locale = 0 );
++ virtual bool julianDayToDate(int jd, int &year, int &month, int &day) const;
++ virtual bool dateToJulianDay(int year, int month, int day, int &jd) const;
++ KCalendarSystemCoptic(KCalendarSystemCopticPrivate &dd, const KSharedConfig::Ptr config = KSharedConfig::Ptr(),
++ const KLocale *locale = 0);
+
+ private:
+- Q_DECLARE_PRIVATE( KCalendarSystemCoptic )
+- KCalendarSystemCopticPrivate * const dont_use; // KDE5 remove, use shared d
++ Q_DECLARE_PRIVATE(KCalendarSystemCoptic)
+ };
+
+ #endif // KCALENDARSYSTEMCOPTIC_H
+diff --git a/kdecore/date/kcalendarsystemcopticprivate_p.h b/kdecore/date/kcalendarsystemcopticprivate_p.h
+index e2a15ca..d30bd6a 100644
+--- a/kdecore/date/kcalendarsystemcopticprivate_p.h
++++ b/kdecore/date/kcalendarsystemcopticprivate_p.h
+@@ -25,26 +25,26 @@
+ class KCalendarSystemCopticPrivate : public KCalendarSystemPrivate
+ {
+ public:
+- explicit KCalendarSystemCopticPrivate( KCalendarSystemCoptic *q );
++ explicit KCalendarSystemCopticPrivate(KCalendarSystemCoptic *q);
+
+ virtual ~KCalendarSystemCopticPrivate();
+
+ // Virtual methods each calendar system must re-implement
+ virtual KLocale::CalendarSystem calendarSystem() const;
+ virtual void loadDefaultEraList();
+- virtual int monthsInYear( int year ) const;
+- virtual int daysInMonth( int year, int month ) const;
+- virtual int daysInYear( int year ) const;
++ virtual int monthsInYear(int year) const;
++ virtual int daysInMonth(int year, int month) const;
++ virtual int daysInYear(int year) const;
+ virtual int daysInWeek() const;
+- virtual bool isLeapYear( int year ) const;
++ virtual bool isLeapYear(int year) const;
+ virtual bool hasLeapMonths() const;
+ virtual bool hasYearZero() const;
+ virtual int maxDaysInWeek() const;
+ virtual int maxMonthsInYear() const;
+ virtual int earliestValidYear() const;
+ virtual int latestValidYear() const;
+- virtual QString monthName( int month, int year, KLocale::DateTimeComponentFormat format, bool possessive ) const;
+- virtual QString weekDayName( int weekDay, KLocale::DateTimeComponentFormat format ) const;
++ virtual QString monthName(int month, int year, KLocale::DateTimeComponentFormat format, bool possessive) const;
++ virtual QString weekDayName(int weekDay, KLocale::DateTimeComponentFormat format) const;
+ };
+
+ #endif // KCALENDARSYSTEMCOPTICPRIVATE_H
+diff --git a/kdecore/date/kcalendarsystemethiopian.cpp b/kdecore/date/kcalendarsystemethiopian.cpp
+index 967c356..d337003 100644
+--- a/kdecore/date/kcalendarsystemethiopian.cpp
++++ b/kdecore/date/kcalendarsystemethiopian.cpp
+@@ -30,18 +30,16 @@
+ class KCalendarSystemEthiopianPrivate : public KCalendarSystemCopticPrivate
+ {
+ public:
+- explicit KCalendarSystemEthiopianPrivate( KCalendarSystemEthiopian *q ) : KCalendarSystemCopticPrivate( q )
+- {
++ explicit KCalendarSystemEthiopianPrivate(KCalendarSystemEthiopian *q) : KCalendarSystemCopticPrivate(q) {
+ }
+
+- virtual ~KCalendarSystemEthiopianPrivate()
+- {
++ virtual ~KCalendarSystemEthiopianPrivate() {
+ }
+
+ virtual KLocale::CalendarSystem calendarSystem() const;
+ virtual void loadDefaultEraList();
+- virtual QString monthName( int month, int year, KLocale::DateTimeComponentFormat format, bool possessive ) const;
+- virtual QString weekDayName( int weekDay, KLocale::DateTimeComponentFormat format ) const;
++ virtual QString monthName(int month, int year, KLocale::DateTimeComponentFormat format, bool possessive) const;
++ virtual QString weekDayName(int weekDay, KLocale::DateTimeComponentFormat format) const;
+ };
+
+ KLocale::CalendarSystem KCalendarSystemEthiopianPrivate::calendarSystem() const
+@@ -53,291 +51,287 @@ void KCalendarSystemEthiopianPrivate::loadDefaultEraList()
+ {
+ QString name, shortName, format;
+ // Incarnation Era, Amätä Mehrät, "Year of Mercy".
+- name = i18nc( "Calendar Era: Ethiopian Incarnation Era, years > 0, LongFormat", "Amata Mehrat" );
+- shortName = i18nc( "Calendar Era: Ethiopian Incarnation Era, years > 0, ShortFormat", "AM" );
+- format = i18nc( "(kdedt-format) Ethiopian, AM, full era year format used for %EY, e.g. 2000 AM", "%Ey %EC" );
+- addEra( '+', 1, q->epoch(), 1, q->latestValidDate(), name, shortName, format );
++ name = i18nc("Calendar Era: Ethiopian Incarnation Era, years > 0, LongFormat", "Amata Mehrat");
++ shortName = i18nc("Calendar Era: Ethiopian Incarnation Era, years > 0, ShortFormat", "AM");
++ format = i18nc("(kdedt-format) Ethiopian, AM, full era year format used for %EY, e.g. 2000 AM", "%Ey %EC");
++ addEra('+', 1, q->epoch(), 1, q->latestValidDate(), name, shortName, format);
+ }
+
+ // Names taken from http://www.ethiopianembassy.at/dates_cycles.htm, alternative transliterations exist
+-QString KCalendarSystemEthiopianPrivate::monthName( int month, int year, KLocale::DateTimeComponentFormat format, bool possessive ) const
++QString KCalendarSystemEthiopianPrivate::monthName(int month, int year, KLocale::DateTimeComponentFormat format, bool possessive) const
+ {
+- Q_UNUSED( year );
++ Q_UNUSED(year);
+
+- if ( format == KLocale::NarrowName ) {
+- switch ( month ) {
++ if (format == KLocale::NarrowName) {
++ switch (month) {
+ case 1:
+- return ki18nc( "Ethiopian month 1 - KLocale::NarrowName", "M" ).toString( locale() );
++ return ki18nc("Ethiopian month 1 - KLocale::NarrowName", "M").toString(locale());
+ case 2:
+- return ki18nc( "Ethiopian month 2 - KLocale::NarrowName", "T" ).toString( locale() );
++ return ki18nc("Ethiopian month 2 - KLocale::NarrowName", "T").toString(locale());
+ case 3:
+- return ki18nc( "Ethiopian month 3 - KLocale::NarrowName", "H" ).toString( locale() );
++ return ki18nc("Ethiopian month 3 - KLocale::NarrowName", "H").toString(locale());
+ case 4:
+- return ki18nc( "Ethiopian month 4 - KLocale::NarrowName", "T" ).toString( locale() );
++ return ki18nc("Ethiopian month 4 - KLocale::NarrowName", "T").toString(locale());
+ case 5:
+- return ki18nc( "Ethiopian month 5 - KLocale::NarrowName", "T" ).toString( locale() );
++ return ki18nc("Ethiopian month 5 - KLocale::NarrowName", "T").toString(locale());
+ case 6:
+- return ki18nc( "Ethiopian month 6 - KLocale::NarrowName", "Y" ).toString( locale() );
++ return ki18nc("Ethiopian month 6 - KLocale::NarrowName", "Y").toString(locale());
+ case 7:
+- return ki18nc( "Ethiopian month 7 - KLocale::NarrowName", "M" ).toString( locale() );
++ return ki18nc("Ethiopian month 7 - KLocale::NarrowName", "M").toString(locale());
+ case 8:
+- return ki18nc( "Ethiopian month 8 - KLocale::NarrowName", "M" ).toString( locale() );
++ return ki18nc("Ethiopian month 8 - KLocale::NarrowName", "M").toString(locale());
+ case 9:
+- return ki18nc( "Ethiopian month 9 - KLocale::NarrowName", "G" ).toString( locale() );
++ return ki18nc("Ethiopian month 9 - KLocale::NarrowName", "G").toString(locale());
+ case 10:
+- return ki18nc( "Ethiopian month 10 - KLocale::NarrowName", "S" ).toString( locale() );
++ return ki18nc("Ethiopian month 10 - KLocale::NarrowName", "S").toString(locale());
+ case 11:
+- return ki18nc( "Ethiopian month 11 - KLocale::NarrowName", "H" ).toString( locale() );
++ return ki18nc("Ethiopian month 11 - KLocale::NarrowName", "H").toString(locale());
+ case 12:
+- return ki18nc( "Ethiopian month 12 - KLocale::NarrowName", "N" ).toString( locale() );
++ return ki18nc("Ethiopian month 12 - KLocale::NarrowName", "N").toString(locale());
+ case 13:
+- return ki18nc( "Ethiopian month 13 - KLocale::NarrowName", "P" ).toString( locale() );
++ return ki18nc("Ethiopian month 13 - KLocale::NarrowName", "P").toString(locale());
+ default:
+ return QString();
+ }
+ }
+
+- if ( format == KLocale::ShortName && possessive ) {
+- switch ( month ) {
++ if (format == KLocale::ShortName && possessive) {
++ switch (month) {
+ case 1:
+- return ki18nc( "Ethiopian month 1 - KLocale::ShortName Possessive", "of Mes" ).toString( locale() );
++ return ki18nc("Ethiopian month 1 - KLocale::ShortName Possessive", "of Mes").toString(locale());
+ case 2:
+- return ki18nc( "Ethiopian month 2 - KLocale::ShortName Possessive", "of Teq" ).toString( locale() );
++ return ki18nc("Ethiopian month 2 - KLocale::ShortName Possessive", "of Teq").toString(locale());
+ case 3:
+- return ki18nc( "Ethiopian month 3 - KLocale::ShortName Possessive", "of Hed" ).toString( locale() );
++ return ki18nc("Ethiopian month 3 - KLocale::ShortName Possessive", "of Hed").toString(locale());
+ case 4:
+- return ki18nc( "Ethiopian month 4 - KLocale::ShortName Possessive", "of Tah" ).toString( locale() );
++ return ki18nc("Ethiopian month 4 - KLocale::ShortName Possessive", "of Tah").toString(locale());
+ case 5:
+- return ki18nc( "Ethiopian month 5 - KLocale::ShortName Possessive", "of Ter" ).toString( locale() );
++ return ki18nc("Ethiopian month 5 - KLocale::ShortName Possessive", "of Ter").toString(locale());
+ case 6:
+- return ki18nc( "Ethiopian month 6 - KLocale::ShortName Possessive", "of Yak" ).toString( locale() );
++ return ki18nc("Ethiopian month 6 - KLocale::ShortName Possessive", "of Yak").toString(locale());
+ case 7:
+- return ki18nc( "Ethiopian month 7 - KLocale::ShortName Possessive", "of Mag" ).toString( locale() );
++ return ki18nc("Ethiopian month 7 - KLocale::ShortName Possessive", "of Mag").toString(locale());
+ case 8:
+- return ki18nc( "Ethiopian month 8 - KLocale::ShortName Possessive", "of Miy" ).toString( locale() );
++ return ki18nc("Ethiopian month 8 - KLocale::ShortName Possessive", "of Miy").toString(locale());
+ case 9:
+- return ki18nc( "Ethiopian month 9 - KLocale::ShortName Possessive", "of Gen" ).toString( locale() );
++ return ki18nc("Ethiopian month 9 - KLocale::ShortName Possessive", "of Gen").toString(locale());
+ case 10:
+- return ki18nc( "Ethiopian month 10 - KLocale::ShortName Possessive", "of Sen" ).toString( locale() );
++ return ki18nc("Ethiopian month 10 - KLocale::ShortName Possessive", "of Sen").toString(locale());
+ case 11:
+- return ki18nc( "Ethiopian month 11 - KLocale::ShortName Possessive", "of Ham" ).toString( locale() );
++ return ki18nc("Ethiopian month 11 - KLocale::ShortName Possessive", "of Ham").toString(locale());
+ case 12:
+- return ki18nc( "Ethiopian month 12 - KLocale::ShortName Possessive", "of Neh" ).toString( locale() );
++ return ki18nc("Ethiopian month 12 - KLocale::ShortName Possessive", "of Neh").toString(locale());
+ case 13:
+- return ki18nc( "Ethiopian month 13 - KLocale::ShortName Possessive", "of Pag" ).toString( locale() );
++ return ki18nc("Ethiopian month 13 - KLocale::ShortName Possessive", "of Pag").toString(locale());
+ default:
+ return QString();
+ }
+ }
+
+- if ( format == KLocale::ShortName && !possessive ) {
+- switch ( month ) {
++ if (format == KLocale::ShortName && !possessive) {
++ switch (month) {
+ case 1:
+- return ki18nc( "Ethiopian month 1 - KLocale::ShortName", "Mes" ).toString( locale() );
++ return ki18nc("Ethiopian month 1 - KLocale::ShortName", "Mes").toString(locale());
+ case 2:
+- return ki18nc( "Ethiopian month 2 - KLocale::ShortName", "Teq" ).toString( locale() );
++ return ki18nc("Ethiopian month 2 - KLocale::ShortName", "Teq").toString(locale());
+ case 3:
+- return ki18nc( "Ethiopian month 3 - KLocale::ShortName", "Hed" ).toString( locale() );
++ return ki18nc("Ethiopian month 3 - KLocale::ShortName", "Hed").toString(locale());
+ case 4:
+- return ki18nc( "Ethiopian month 4 - KLocale::ShortName", "Tah" ).toString( locale() );
++ return ki18nc("Ethiopian month 4 - KLocale::ShortName", "Tah").toString(locale());
+ case 5:
+- return ki18nc( "Ethiopian month 5 - KLocale::ShortName", "Ter" ).toString( locale() );
++ return ki18nc("Ethiopian month 5 - KLocale::ShortName", "Ter").toString(locale());
+ case 6:
+- return ki18nc( "Ethiopian month 6 - KLocale::ShortName", "Yak" ).toString( locale() );
++ return ki18nc("Ethiopian month 6 - KLocale::ShortName", "Yak").toString(locale());
+ case 7:
+- return ki18nc( "Ethiopian month 7 - KLocale::ShortName", "Mag" ).toString( locale() );
++ return ki18nc("Ethiopian month 7 - KLocale::ShortName", "Mag").toString(locale());
+ case 8:
+- return ki18nc( "Ethiopian month 8 - KLocale::ShortName", "Miy" ).toString( locale() );
++ return ki18nc("Ethiopian month 8 - KLocale::ShortName", "Miy").toString(locale());
+ case 9:
+- return ki18nc( "Ethiopian month 9 - KLocale::ShortName", "Gen" ).toString( locale() );
++ return ki18nc("Ethiopian month 9 - KLocale::ShortName", "Gen").toString(locale());
+ case 10:
+- return ki18nc( "Ethiopian month 10 - KLocale::ShortName", "Sen" ).toString( locale() );
++ return ki18nc("Ethiopian month 10 - KLocale::ShortName", "Sen").toString(locale());
+ case 11:
+- return ki18nc( "Ethiopian month 11 - KLocale::ShortName", "Ham" ).toString( locale() );
++ return ki18nc("Ethiopian month 11 - KLocale::ShortName", "Ham").toString(locale());
+ case 12:
+- return ki18nc( "Ethiopian month 12 - KLocale::ShortName", "Neh" ).toString( locale() );
++ return ki18nc("Ethiopian month 12 - KLocale::ShortName", "Neh").toString(locale());
+ case 13:
+- return ki18nc( "Ethiopian month 13 - KLocale::ShortName", "Pag" ).toString( locale() );
++ return ki18nc("Ethiopian month 13 - KLocale::ShortName", "Pag").toString(locale());
+ default:
+ return QString();
+ }
+ }
+
+- if ( format == KLocale::LongName && possessive ) {
+- switch ( month ) {
++ if (format == KLocale::LongName && possessive) {
++ switch (month) {
+ case 1:
+- return ki18nc( "Ethiopian month 1 - KLocale::LongName Possessive", "of Meskerem" ).toString( locale() );
++ return ki18nc("Ethiopian month 1 - KLocale::LongName Possessive", "of Meskerem").toString(locale());
+ case 2:
+- return ki18nc( "Ethiopian month 2 - KLocale::LongName Possessive", "of Tequemt" ).toString( locale() );
++ return ki18nc("Ethiopian month 2 - KLocale::LongName Possessive", "of Tequemt").toString(locale());
+ case 3:
+- return ki18nc( "Ethiopian month 3 - KLocale::LongName Possessive", "of Hedar" ).toString( locale() );
++ return ki18nc("Ethiopian month 3 - KLocale::LongName Possessive", "of Hedar").toString(locale());
+ case 4:
+- return ki18nc( "Ethiopian month 4 - KLocale::LongName Possessive", "of Tahsas" ).toString( locale() );
++ return ki18nc("Ethiopian month 4 - KLocale::LongName Possessive", "of Tahsas").toString(locale());
+ case 5:
+- return ki18nc( "Ethiopian month 5 - KLocale::LongName Possessive", "of Ter" ).toString( locale() );
++ return ki18nc("Ethiopian month 5 - KLocale::LongName Possessive", "of Ter").toString(locale());
+ case 6:
+- return ki18nc( "Ethiopian month 6 - KLocale::LongName Possessive", "of Yakatit" ).toString( locale() );
++ return ki18nc("Ethiopian month 6 - KLocale::LongName Possessive", "of Yakatit").toString(locale());
+ case 7:
+- return ki18nc( "Ethiopian month 7 - KLocale::LongName Possessive", "of Magabit" ).toString( locale() );
++ return ki18nc("Ethiopian month 7 - KLocale::LongName Possessive", "of Magabit").toString(locale());
+ case 8:
+- return ki18nc( "Ethiopian month 8 - KLocale::LongName Possessive", "of Miyazya" ).toString( locale() );
++ return ki18nc("Ethiopian month 8 - KLocale::LongName Possessive", "of Miyazya").toString(locale());
+ case 9:
+- return ki18nc( "Ethiopian month 9 - KLocale::LongName Possessive", "of Genbot" ).toString( locale() );
++ return ki18nc("Ethiopian month 9 - KLocale::LongName Possessive", "of Genbot").toString(locale());
+ case 10:
+- return ki18nc( "Ethiopian month 10 - KLocale::LongName Possessive", "of Sene" ).toString( locale() );
++ return ki18nc("Ethiopian month 10 - KLocale::LongName Possessive", "of Sene").toString(locale());
+ case 11:
+- return ki18nc( "Ethiopian month 11 - KLocale::LongName Possessive", "of Hamle" ).toString( locale() );
++ return ki18nc("Ethiopian month 11 - KLocale::LongName Possessive", "of Hamle").toString(locale());
+ case 12:
+- return ki18nc( "Ethiopian month 12 - KLocale::LongName Possessive", "of Nehase" ).toString( locale() );
++ return ki18nc("Ethiopian month 12 - KLocale::LongName Possessive", "of Nehase").toString(locale());
+ case 13:
+- return ki18nc( "Ethiopian month 13 - KLocale::LongName Possessive", "of Pagumen" ).toString( locale() );
++ return ki18nc("Ethiopian month 13 - KLocale::LongName Possessive", "of Pagumen").toString(locale());
+ default:
+ return QString();
+ }
+ }
+
+ // Default to LongName
+- switch ( month ) {
++ switch (month) {
+ case 1:
+- return ki18nc( "Ethiopian month 1 - KLocale::LongName", "Meskerem" ).toString( locale() );
++ return ki18nc("Ethiopian month 1 - KLocale::LongName", "Meskerem").toString(locale());
+ case 2:
+- return ki18nc( "Ethiopian month 2 - KLocale::LongName", "Tequemt" ).toString( locale() );
++ return ki18nc("Ethiopian month 2 - KLocale::LongName", "Tequemt").toString(locale());
+ case 3:
+- return ki18nc( "Ethiopian month 3 - KLocale::LongName", "Hedar" ).toString( locale() );
++ return ki18nc("Ethiopian month 3 - KLocale::LongName", "Hedar").toString(locale());
+ case 4:
+- return ki18nc( "Ethiopian month 4 - KLocale::LongName", "Tahsas" ).toString( locale() );
++ return ki18nc("Ethiopian month 4 - KLocale::LongName", "Tahsas").toString(locale());
+ case 5:
+- return ki18nc( "Ethiopian month 5 - KLocale::LongName", "Ter" ).toString( locale() );
++ return ki18nc("Ethiopian month 5 - KLocale::LongName", "Ter").toString(locale());
+ case 6:
+- return ki18nc( "Ethiopian month 6 - KLocale::LongName", "Yakatit" ).toString( locale() );
++ return ki18nc("Ethiopian month 6 - KLocale::LongName", "Yakatit").toString(locale());
+ case 7:
+- return ki18nc( "Ethiopian month 7 - KLocale::LongName", "Magabit" ).toString( locale() );
++ return ki18nc("Ethiopian month 7 - KLocale::LongName", "Magabit").toString(locale());
+ case 8:
+- return ki18nc( "Ethiopian month 8 - KLocale::LongName", "Miyazya" ).toString( locale() );
++ return ki18nc("Ethiopian month 8 - KLocale::LongName", "Miyazya").toString(locale());
+ case 9:
+- return ki18nc( "Ethiopian month 9 - KLocale::LongName", "Genbot" ).toString( locale() );
++ return ki18nc("Ethiopian month 9 - KLocale::LongName", "Genbot").toString(locale());
+ case 10:
+- return ki18nc( "Ethiopian month 10 - KLocale::LongName", "Sene" ).toString( locale() );
++ return ki18nc("Ethiopian month 10 - KLocale::LongName", "Sene").toString(locale());
+ case 11:
+- return ki18nc( "Ethiopian month 11 - KLocale::LongName", "Hamle" ).toString( locale() );
++ return ki18nc("Ethiopian month 11 - KLocale::LongName", "Hamle").toString(locale());
+ case 12:
+- return ki18nc( "Ethiopian month 12 - KLocale::LongName", "Nehase" ).toString( locale() );
++ return ki18nc("Ethiopian month 12 - KLocale::LongName", "Nehase").toString(locale());
+ case 13:
+- return ki18nc( "Ethiopian month 13 - KLocale::LongName", "Pagumen" ).toString( locale() );
++ return ki18nc("Ethiopian month 13 - KLocale::LongName", "Pagumen").toString(locale());
+ default:
+ return QString();
+ }
+ }
+
+ // Names taken from http://www.ethiopianembassy.at/dates_cycles.htm, alternative transliterations exist
+-QString KCalendarSystemEthiopianPrivate::weekDayName( int weekDay, KLocale::DateTimeComponentFormat format ) const
++QString KCalendarSystemEthiopianPrivate::weekDayName(int weekDay, KLocale::DateTimeComponentFormat format) const
+ {
+- if ( format == KLocale::NarrowName ) {
+- switch ( weekDay ) {
++ if (format == KLocale::NarrowName) {
++ switch (weekDay) {
+ case 1:
+- return ki18nc( "Ethiopian weekday 1 - KLocale::NarrowName ", "S" ).toString( locale() );
++ return ki18nc("Ethiopian weekday 1 - KLocale::NarrowName ", "S").toString(locale());
+ case 2:
+- return ki18nc( "Ethiopian weekday 2 - KLocale::NarrowName ", "M" ).toString( locale() );
++ return ki18nc("Ethiopian weekday 2 - KLocale::NarrowName ", "M").toString(locale());
+ case 3:
+- return ki18nc( "Ethiopian weekday 3 - KLocale::NarrowName ", "R" ).toString( locale() );
++ return ki18nc("Ethiopian weekday 3 - KLocale::NarrowName ", "R").toString(locale());
+ case 4:
+- return ki18nc( "Ethiopian weekday 4 - KLocale::NarrowName ", "H" ).toString( locale() );
++ return ki18nc("Ethiopian weekday 4 - KLocale::NarrowName ", "H").toString(locale());
+ case 5:
+- return ki18nc( "Ethiopian weekday 5 - KLocale::NarrowName ", "A" ).toString( locale() );
++ return ki18nc("Ethiopian weekday 5 - KLocale::NarrowName ", "A").toString(locale());
+ case 6:
+- return ki18nc( "Ethiopian weekday 6 - KLocale::NarrowName ", "Q" ).toString( locale() );
++ return ki18nc("Ethiopian weekday 6 - KLocale::NarrowName ", "Q").toString(locale());
+ case 7:
+- return ki18nc( "Ethiopian weekday 7 - KLocale::NarrowName ", "E" ).toString( locale() );
++ return ki18nc("Ethiopian weekday 7 - KLocale::NarrowName ", "E").toString(locale());
+ default:
+ return QString();
+ }
+ }
+
+- if ( format == KLocale::ShortName || format == KLocale:: ShortNumber ) {
+- switch ( weekDay ) {
++ if (format == KLocale::ShortName || format == KLocale:: ShortNumber) {
++ switch (weekDay) {
+ case 1:
+- return ki18nc( "Ethiopian weekday 1 - KLocale::ShortName", "Seg" ).toString( locale() );
++ return ki18nc("Ethiopian weekday 1 - KLocale::ShortName", "Seg").toString(locale());
+ case 2:
+- return ki18nc( "Ethiopian weekday 2 - KLocale::ShortName", "Mak" ).toString( locale() );
++ return ki18nc("Ethiopian weekday 2 - KLocale::ShortName", "Mak").toString(locale());
+ case 3:
+- return ki18nc( "Ethiopian weekday 3 - KLocale::ShortName", "Rob" ).toString( locale() );
++ return ki18nc("Ethiopian weekday 3 - KLocale::ShortName", "Rob").toString(locale());
+ case 4:
+- return ki18nc( "Ethiopian weekday 4 - KLocale::ShortName", "Ham" ).toString( locale() );
++ return ki18nc("Ethiopian weekday 4 - KLocale::ShortName", "Ham").toString(locale());
+ case 5:
+- return ki18nc( "Ethiopian weekday 5 - KLocale::ShortName", "Arb" ).toString( locale() );
++ return ki18nc("Ethiopian weekday 5 - KLocale::ShortName", "Arb").toString(locale());
+ case 6:
+- return ki18nc( "Ethiopian weekday 6 - KLocale::ShortName", "Qed" ).toString( locale() );
++ return ki18nc("Ethiopian weekday 6 - KLocale::ShortName", "Qed").toString(locale());
+ case 7:
+- return ki18nc( "Ethiopian weekday 7 - KLocale::ShortName", "Ehu" ).toString( locale() );
++ return ki18nc("Ethiopian weekday 7 - KLocale::ShortName", "Ehu").toString(locale());
+ default: return QString();
+ }
+ }
+
+- switch ( weekDay ) {
++ switch (weekDay) {
+ case 1:
+- return ki18nc( "Ethiopian weekday 1 - KLocale::LongName", "Segno" ).toString( locale() );
++ return ki18nc("Ethiopian weekday 1 - KLocale::LongName", "Segno").toString(locale());
+ case 2:
+- return ki18nc( "Ethiopian weekday 2 - KLocale::LongName", "Maksegno" ).toString( locale() );
++ return ki18nc("Ethiopian weekday 2 - KLocale::LongName", "Maksegno").toString(locale());
+ case 3:
+- return ki18nc( "Ethiopian weekday 3 - KLocale::LongName", "Rob" ).toString( locale() );
++ return ki18nc("Ethiopian weekday 3 - KLocale::LongName", "Rob").toString(locale());
+ case 4:
+- return ki18nc( "Ethiopian weekday 4 - KLocale::LongName", "Hamus" ).toString( locale() );
++ return ki18nc("Ethiopian weekday 4 - KLocale::LongName", "Hamus").toString(locale());
+ case 5:
+- return ki18nc( "Ethiopian weekday 5 - KLocale::LongName", "Arb" ).toString( locale() );
++ return ki18nc("Ethiopian weekday 5 - KLocale::LongName", "Arb").toString(locale());
+ case 6:
+- return ki18nc( "Ethiopian weekday 6 - KLocale::LongName", "Qedame" ).toString( locale() );
++ return ki18nc("Ethiopian weekday 6 - KLocale::LongName", "Qedame").toString(locale());
+ case 7:
+- return ki18nc( "Ethiopian weekday 7 - KLocale::LongName", "Ehud" ).toString( locale() );
++ return ki18nc("Ethiopian weekday 7 - KLocale::LongName", "Ehud").toString(locale());
+ default:
+ return QString();
+ }
+ }
+
+
+-KCalendarSystemEthiopian::KCalendarSystemEthiopian( const KLocale *locale )
+- : KCalendarSystemCoptic( *new KCalendarSystemEthiopianPrivate( this ), KSharedConfig::Ptr(), locale ),
+- dont_use( 0 )
++KCalendarSystemEthiopian::KCalendarSystemEthiopian(const KLocale *locale)
++ : KCalendarSystemCoptic(*new KCalendarSystemEthiopianPrivate(this), KSharedConfig::Ptr(), locale)
+ {
+- d_ptr->loadConfig( calendarType() );
++ d_ptr->loadConfig(calendarType());
+ }
+
+-KCalendarSystemEthiopian::KCalendarSystemEthiopian( const KSharedConfig::Ptr config, const KLocale *locale )
+- : KCalendarSystemCoptic( *new KCalendarSystemEthiopianPrivate( this ), config, locale ),
+- dont_use( 0 )
++KCalendarSystemEthiopian::KCalendarSystemEthiopian(const KSharedConfig::Ptr config, const KLocale *locale)
++ : KCalendarSystemCoptic(*new KCalendarSystemEthiopianPrivate(this), config, locale)
+ {
+- d_ptr->loadConfig( calendarType() );
++ d_ptr->loadConfig(calendarType());
+ }
+
+-KCalendarSystemEthiopian::KCalendarSystemEthiopian( KCalendarSystemEthiopianPrivate &dd,
+- const KSharedConfig::Ptr config, const KLocale *locale )
+- : KCalendarSystemCoptic( dd, config, locale ),
+- dont_use( 0 )
++KCalendarSystemEthiopian::KCalendarSystemEthiopian(KCalendarSystemEthiopianPrivate &dd,
++ const KSharedConfig::Ptr config, const KLocale *locale)
++ : KCalendarSystemCoptic(dd, config, locale)
+ {
+- d_ptr->loadConfig( calendarType() );
++ d_ptr->loadConfig(calendarType());
+ }
+
+ KCalendarSystemEthiopian::~KCalendarSystemEthiopian()
+ {
+- delete dont_use;
+ }
+
+ QString KCalendarSystemEthiopian::calendarType() const
+ {
+- return QLatin1String( "ethiopian" );
++ return QLatin1String("ethiopian");
+ }
+
+ QDate KCalendarSystemEthiopian::epoch() const
+ {
+ //0001-01-01, no Year 0.
+ //0008-08-29 AD Julian
+- return QDate::fromJulianDay( 1724221 );
++ return QDate::fromJulianDay(1724221);
+ }
+
+ QDate KCalendarSystemEthiopian::earliestValidDate() const
+ {
+ //0001-01-01, no Year 0.
+ //0008-08-29 AD Julian
+- return QDate::fromJulianDay( 1724221 );
++ return QDate::fromJulianDay(1724221);
+ }
+
+ QDate KCalendarSystemEthiopian::latestValidDate() const
+@@ -345,188 +339,47 @@ QDate KCalendarSystemEthiopian::latestValidDate() const
+ // Set to last day of year 9999 until confirm date formats & widgets support > 9999
+ //9999-12-30
+ //100008-08-29 AD Julian
+- return QDate::fromJulianDay( 5376721 );
++ return QDate::fromJulianDay(5376721);
+ }
+
+-bool KCalendarSystemEthiopian::isValid( int year, int month, int day ) const
++bool KCalendarSystemEthiopian::isValid(int year, int month, int day) const
+ {
+- return KCalendarSystemCoptic::isValid( year, month, day );
++ return KCalendarSystemCoptic::isValid(year, month, day);
+ }
+
+-bool KCalendarSystemEthiopian::isValid( const QDate &date ) const
++bool KCalendarSystemEthiopian::isValid(const QDate &date) const
+ {
+- return KCalendarSystemCoptic::isValid( date );
++ return KCalendarSystemCoptic::isValid(date);
+ }
+
+-bool KCalendarSystemEthiopian::setDate( QDate &date, int year, int month, int day ) const
++bool KCalendarSystemEthiopian::isLeapYear(int year) const
+ {
+- return KCalendarSystemCoptic::setDate( date, year, month, day );
++ return KCalendarSystemCoptic::isLeapYear(year);
+ }
+
+-// Deprecated
+-bool KCalendarSystemEthiopian::setYMD( QDate &date, int y, int m, int d ) const
++bool KCalendarSystemEthiopian::isLeapYear(const QDate &date) const
+ {
+- return KCalendarSystemCoptic::setDate( date, y, m, d );
++ return KCalendarSystemCoptic::isLeapYear(date);
+ }
+
+-int KCalendarSystemEthiopian::year( const QDate &date ) const
++QString KCalendarSystemEthiopian::monthName(int month, int year, MonthNameFormat format) const
+ {
+- return KCalendarSystemCoptic::year( date );
++ return KCalendarSystemCoptic::monthName(month, year, format);
+ }
+
+-int KCalendarSystemEthiopian::month( const QDate &date ) const
++QString KCalendarSystemEthiopian::monthName(const QDate &date, MonthNameFormat format) const
+ {
+- return KCalendarSystemCoptic::month( date );
++ return KCalendarSystemCoptic::monthName(date, format);
+ }
+
+-int KCalendarSystemEthiopian::day( const QDate &date ) const
++QString KCalendarSystemEthiopian::weekDayName(int weekDay, WeekDayNameFormat format) const
+ {
+- return KCalendarSystemCoptic::day( date );
++ return KCalendarSystemCoptic::weekDayName(weekDay, format);
+ }
+
+-QDate KCalendarSystemEthiopian::addYears( const QDate &date, int nyears ) const
++QString KCalendarSystemEthiopian::weekDayName(const QDate &date, WeekDayNameFormat format) const
+ {
+- return KCalendarSystemCoptic::addYears( date, nyears );
+-}
+-
+-QDate KCalendarSystemEthiopian::addMonths( const QDate &date, int nmonths ) const
+-{
+- return KCalendarSystemCoptic::addMonths( date, nmonths );
+-}
+-
+-QDate KCalendarSystemEthiopian::addDays( const QDate &date, int ndays ) const
+-{
+- return KCalendarSystemCoptic::addDays( date, ndays );
+-}
+-
+-int KCalendarSystemEthiopian::monthsInYear( const QDate &date ) const
+-{
+- return KCalendarSystemCoptic::monthsInYear( date );
+-}
+-
+-int KCalendarSystemEthiopian::weeksInYear( const QDate &date ) const
+-{
+- return KCalendarSystemCoptic::weeksInYear( date );
+-}
+-
+-int KCalendarSystemEthiopian::weeksInYear( int year ) const
+-{
+- return KCalendarSystemCoptic::weeksInYear( year );
+-}
+-
+-int KCalendarSystemEthiopian::daysInYear( const QDate &date ) const
+-{
+- return KCalendarSystemCoptic::daysInYear( date );
+-}
+-
+-int KCalendarSystemEthiopian::daysInMonth( const QDate &date ) const
+-{
+- return KCalendarSystemCoptic::daysInMonth( date );
+-}
+-
+-int KCalendarSystemEthiopian::daysInWeek( const QDate &date ) const
+-{
+- return KCalendarSystemCoptic::daysInWeek( date );
+-}
+-
+-int KCalendarSystemEthiopian::dayOfYear( const QDate &date ) const
+-{
+- return KCalendarSystemCoptic::dayOfYear( date );
+-}
+-
+-int KCalendarSystemEthiopian::dayOfWeek( const QDate &date ) const
+-{
+- return KCalendarSystemCoptic::dayOfWeek( date );
+-}
+-
+-int KCalendarSystemEthiopian::weekNumber( const QDate &date, int * yearNum ) const
+-{
+- return KCalendarSystemCoptic::weekNumber( date, yearNum );
+-}
+-
+-bool KCalendarSystemEthiopian::isLeapYear( int year ) const
+-{
+- return KCalendarSystemCoptic::isLeapYear( year );
+-}
+-
+-bool KCalendarSystemEthiopian::isLeapYear( const QDate &date ) const
+-{
+- return KCalendarSystemCoptic::isLeapYear( date );
+-}
+-
+-QString KCalendarSystemEthiopian::monthName( int month, int year, MonthNameFormat format ) const
+-{
+- return KCalendarSystemCoptic::monthName( month, year, format );
+-}
+-
+-QString KCalendarSystemEthiopian::monthName( const QDate &date, MonthNameFormat format ) const
+-{
+- return KCalendarSystemCoptic::monthName( date, format );
+-}
+-
+-QString KCalendarSystemEthiopian::weekDayName( int weekDay, WeekDayNameFormat format ) const
+-{
+- return KCalendarSystemCoptic::weekDayName( weekDay, format );
+-}
+-
+-QString KCalendarSystemEthiopian::weekDayName( const QDate &date, WeekDayNameFormat format ) const
+-{
+- return KCalendarSystemCoptic::weekDayName( date, format );
+-}
+-
+-QString KCalendarSystemEthiopian::yearString( const QDate &pDate, StringFormat format ) const
+-{
+- return KCalendarSystemCoptic::yearString( pDate, format );
+-}
+-
+-QString KCalendarSystemEthiopian::monthString( const QDate &pDate, StringFormat format ) const
+-{
+- return KCalendarSystemCoptic::monthString( pDate, format );
+-}
+-
+-QString KCalendarSystemEthiopian::dayString( const QDate &pDate, StringFormat format ) const
+-{
+- return KCalendarSystemCoptic::dayString( pDate, format );
+-}
+-
+-int KCalendarSystemEthiopian::yearStringToInteger( const QString &sNum, int &iLength ) const
+-{
+- return KCalendarSystemCoptic::yearStringToInteger( sNum, iLength );
+-}
+-
+-int KCalendarSystemEthiopian::monthStringToInteger( const QString &sNum, int &iLength ) const
+-{
+- return KCalendarSystemCoptic::monthStringToInteger( sNum, iLength );
+-}
+-
+-int KCalendarSystemEthiopian::dayStringToInteger( const QString &sNum, int &iLength ) const
+-{
+- return KCalendarSystemCoptic::dayStringToInteger( sNum, iLength );
+-}
+-
+-QString KCalendarSystemEthiopian::formatDate( const QDate &date, KLocale::DateFormat format ) const
+-{
+- return KCalendarSystemCoptic::formatDate( date, format );
+-}
+-
+-QDate KCalendarSystemEthiopian::readDate( const QString &str, bool *ok ) const
+-{
+- return KCalendarSystemCoptic::readDate( str, ok );
+-}
+-
+-QDate KCalendarSystemEthiopian::readDate( const QString &intstr, const QString &fmt, bool *ok ) const
+-{
+- return KCalendarSystemCoptic::readDate( intstr, fmt, ok );
+-}
+-
+-QDate KCalendarSystemEthiopian::readDate( const QString &str, KLocale::ReadDateFlags flags, bool *ok ) const
+-{
+- return KCalendarSystemCoptic::readDate( str, flags, ok );
+-}
+-
+-int KCalendarSystemEthiopian::weekStartDay() const
+-{
+- return KCalendarSystemCoptic::weekStartDay();
++ return KCalendarSystemCoptic::weekDayName(date, format);
+ }
+
+ int KCalendarSystemEthiopian::weekDayOfPray() const
+@@ -554,12 +407,12 @@ bool KCalendarSystemEthiopian::isProleptic() const
+ return false;
+ }
+
+-bool KCalendarSystemEthiopian::julianDayToDate( int jd, int &year, int &month, int &day ) const
++bool KCalendarSystemEthiopian::julianDayToDate(int jd, int &year, int &month, int &day) const
+ {
+- return KCalendarSystemCoptic::julianDayToDate( jd, year, month, day );
++ return KCalendarSystemCoptic::julianDayToDate(jd, year, month, day);
+ }
+
+-bool KCalendarSystemEthiopian::dateToJulianDay( int year, int month, int day, int &jd ) const
++bool KCalendarSystemEthiopian::dateToJulianDay(int year, int month, int day, int &jd) const
+ {
+- return KCalendarSystemCoptic::dateToJulianDay( year, month, day, jd );
++ return KCalendarSystemCoptic::dateToJulianDay(year, month, day, jd);
+ }
+diff --git a/kdecore/date/kcalendarsystemethiopian_p.h b/kdecore/date/kcalendarsystemethiopian_p.h
+index 002c2c5..8394f07 100644
+--- a/kdecore/date/kcalendarsystemethiopian_p.h
++++ b/kdecore/date/kcalendarsystemethiopian_p.h
+@@ -38,8 +38,8 @@ class KCalendarSystemEthiopianPrivate;
+ class KCalendarSystemEthiopian: public KCalendarSystemCoptic
+ {
+ public:
+- explicit KCalendarSystemEthiopian( const KLocale *locale = 0 );
+- explicit KCalendarSystemEthiopian( const KSharedConfig::Ptr config, const KLocale *locale = 0 );
++ explicit KCalendarSystemEthiopian(const KLocale *locale = 0);
++ explicit KCalendarSystemEthiopian(const KSharedConfig::Ptr config, const KLocale *locale = 0);
+ virtual ~KCalendarSystemEthiopian();
+
+ virtual QString calendarType() const;
+@@ -47,58 +47,19 @@ public:
+ virtual QDate epoch() const;
+ virtual QDate earliestValidDate() const;
+ virtual QDate latestValidDate() const;
+- virtual bool isValid( int year, int month, int day ) const;
+- virtual bool isValid( const QDate &date ) const;
++ virtual bool isValid(int year, int month, int day) const;
++ virtual bool isValid(const QDate &date) const;
+
+- virtual bool setDate( QDate &date, int year, int month, int day ) const;
+- /** @deprecated */
+- virtual bool setYMD( QDate &date, int year, int month, int day ) const;
++ virtual bool isLeapYear(int year) const;
++ virtual bool isLeapYear(const QDate &date) const;
+
+- virtual int year( const QDate &date ) const;
+- virtual int month( const QDate &date ) const;
+- virtual int day( const QDate &date ) const;
++ virtual QString monthName(int month, int year, MonthNameFormat format = LongName) const;
++ virtual QString monthName(const QDate &date, MonthNameFormat format = LongName) const;
+
+- virtual QDate addYears( const QDate &date, int nyears ) const;
+- virtual QDate addMonths( const QDate &date, int nmonths ) const;
+- virtual QDate addDays( const QDate &date, int ndays ) const;
++ virtual QString weekDayName(int weekDay, WeekDayNameFormat format = LongDayName) const;
++ virtual QString weekDayName(const QDate &date, WeekDayNameFormat format = LongDayName) const;
+
+- virtual int monthsInYear( const QDate &date ) const;
+- virtual int weeksInYear( const QDate &date ) const;
+- virtual int weeksInYear( int year ) const;
+- virtual int daysInYear( const QDate &date ) const;
+- virtual int daysInMonth( const QDate &date ) const;
+- virtual int daysInWeek( const QDate &date ) const;
+-
+- virtual int dayOfYear( const QDate &date ) const;
+- virtual int dayOfWeek( const QDate &date ) const;
+-
+- virtual int weekNumber( const QDate &date, int *yearNum = 0 ) const;
+-
+- virtual bool isLeapYear( int year ) const;
+- virtual bool isLeapYear( const QDate &date ) const;
+-
+- virtual QString monthName( int month, int year, MonthNameFormat format = LongName ) const;
+- virtual QString monthName( const QDate &date, MonthNameFormat format = LongName ) const;
+-
+- virtual QString weekDayName( int weekDay, WeekDayNameFormat format = LongDayName ) const;
+- virtual QString weekDayName( const QDate &date, WeekDayNameFormat format = LongDayName ) const;
+-
+- virtual QString yearString( const QDate & pDate, StringFormat format = LongFormat ) const;
+- virtual QString monthString( const QDate &pDate, StringFormat format = LongFormat ) const;
+- virtual QString dayString( const QDate &pDate, StringFormat format = LongFormat ) const;
+-
+- virtual int yearStringToInteger( const QString &sNum, int &iLength ) const;
+- virtual int monthStringToInteger( const QString &sNum, int &iLength ) const;
+- virtual int dayStringToInteger( const QString &sNum, int &iLength ) const;
+-
+- virtual QString formatDate( const QDate &fromDate, KLocale::DateFormat toFormat = KLocale::LongDate ) const;
+-
+- virtual QDate readDate( const QString &str, bool *ok = 0 ) const;
+- virtual QDate readDate( const QString &dateString, const QString &dateFormat, bool *ok = 0 ) const;
+- virtual QDate readDate( const QString &str, KLocale::ReadDateFlags flags, bool *ok = 0 ) const;
+-
+- virtual int weekStartDay() const;
+- virtual int weekDayOfPray () const;
++ virtual int weekDayOfPray() const;
+
+ virtual bool isLunar() const;
+ virtual bool isLunisolar() const;
+@@ -106,15 +67,14 @@ public:
+ virtual bool isProleptic() const;
+
+ protected:
+- virtual bool julianDayToDate( int jd, int &year, int &month, int &day ) const;
+- virtual bool dateToJulianDay( int year, int month, int day, int &jd ) const;
+- KCalendarSystemEthiopian( KCalendarSystemEthiopianPrivate &dd,
+- const KSharedConfig::Ptr config = KSharedConfig::Ptr(),
+- const KLocale *locale = 0 );
++ virtual bool julianDayToDate(int jd, int &year, int &month, int &day) const;
++ virtual bool dateToJulianDay(int year, int month, int day, int &jd) const;
++ KCalendarSystemEthiopian(KCalendarSystemEthiopianPrivate &dd,
++ const KSharedConfig::Ptr config = KSharedConfig::Ptr(),
++ const KLocale *locale = 0);
+
+ private:
+ Q_DECLARE_PRIVATE(KCalendarSystemEthiopian)
+- KCalendarSystemEthiopianPrivate * const dont_use; // KDE5 remove, use shared d
+ };
+
+ #endif // KCALENDARSYSTEMETHIOPIAN_H
+diff --git a/kdecore/date/kcalendarsystemgregorian.cpp b/kdecore/date/kcalendarsystemgregorian.cpp
+index 26132dc..57ba552 100644
+--- a/kdecore/date/kcalendarsystemgregorian.cpp
++++ b/kdecore/date/kcalendarsystemgregorian.cpp
+@@ -1,7 +1,5 @@
+ /*
+- Copyright (c) 2002 Carlos Moro <cfmoro@correo.uniovi.es>
+- Copyright (c) 2002-2003 Hans Petter Bieker <bieker@kde.org>
+- Copyright 2007, 2010 John Layt <john@layt.net>
++ Copyright 2009, 2010 John Layt <john@layt.net>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+@@ -22,7 +20,7 @@
+ // Derived gregorian kde calendar class
+
+ #include "kcalendarsystemgregorian_p.h"
+-#include "kcalendarsystemprivate_p.h"
++#include "kcalendarsystemgregorianprivate_p.h"
+ #include "kcalendarera_p.h"
+
+ #include "kdebug.h"
+@@ -33,39 +31,10 @@
+ #include <QtCore/QDate>
+ #include <QtCore/QCharRef>
+
+-class KCalendarSystemGregorianPrivate : public KCalendarSystemPrivate
+-{
+-public:
+- explicit KCalendarSystemGregorianPrivate( KCalendarSystemGregorian *q );
+-
+- virtual ~KCalendarSystemGregorianPrivate();
+-
+- // Virtual methods each calendar system must re-implement
+- virtual KLocale::CalendarSystem calendarSystem() const;
+- virtual void loadDefaultEraList();
+- virtual int monthsInYear( int year ) const;
+- virtual int daysInMonth( int year, int month ) const;
+- virtual int daysInYear( int year ) const;
+- virtual int daysInWeek() const;
+- virtual bool isLeapYear( int year ) const;
+- virtual bool hasLeapMonths() const;
+- virtual bool hasYearZero() const;
+- virtual int maxDaysInWeek() const;
+- virtual int maxMonthsInYear() const;
+- virtual int earliestValidYear() const;
+- virtual int latestValidYear() const;
+- virtual QString monthName( int month, int year, KLocale::DateTimeComponentFormat format, bool possessive ) const;
+- virtual QString weekDayName( int weekDay, KLocale::DateTimeComponentFormat format ) const;
+-
+- bool m_useCommonEra;
+-};
+-
+-// Shared d pointer implementations
+-
+-KCalendarSystemGregorianPrivate::KCalendarSystemGregorianPrivate( KCalendarSystemGregorian *q )
+- :KCalendarSystemPrivate( q ),
+- m_useCommonEra( false )
++// Shared d pointer base class definitions
+
++KCalendarSystemGregorianPrivate::KCalendarSystemGregorianPrivate(KCalendarSystemGregorian *q)
++ : KCalendarSystemPrivate(q)
+ {
+ }
+
+@@ -75,54 +44,69 @@ KCalendarSystemGregorianPrivate::~KCalendarSystemGregorianPrivate()
+
+ KLocale::CalendarSystem KCalendarSystemGregorianPrivate::calendarSystem() const
+ {
+- return KLocale::QDateCalendar;
++ return KLocale::GregorianCalendar;
+ }
+
++// Dummy version using Gregorian as an example
++// This method MUST be re-implemented in any new Calendar System
+ void KCalendarSystemGregorianPrivate::loadDefaultEraList()
+ {
+ QString name, shortName, format;
+
+- KConfigGroup lcg( config(), QString::fromLatin1( "Locale" ) );
+- KConfigGroup cg = lcg.group( QString::fromLatin1( "KCalendarSystem %1" ).arg( q->calendarType() ) );
+- m_useCommonEra = cg.readEntry( "UseCommonEra", false );
++ KConfigGroup cg(config(), QString::fromLatin1("KCalendarSystem %1").arg(q->calendarType(q->calendarSystem())));
++ m_useCommonEra = cg.readEntry("UseCommonEra", false);
+
+- if ( m_useCommonEra ) {
+- name = i18nc( "Calendar Era: Gregorian Common Era, years < 0, LongFormat", "Before Common Era" );
+- shortName = i18nc( "Calendar Era: Gregorian Common Era, years < 0, ShortFormat", "BCE" );
++ if (m_useCommonEra) {
++ name = i18nc("Calendar Era: Gregorian Common Era, years < 0, LongFormat", "Before Common Era");
++ shortName = i18nc("Calendar Era: Gregorian Common Era, years < 0, ShortFormat", "BCE");
+ } else {
+- name = i18nc( "Calendar Era: Gregorian Christian Era, years < 0, LongFormat", "Before Christ" );
+- shortName = i18nc( "Calendar Era: Gregorian Christian Era, years < 0, ShortFormat", "BC" );
++ name = i18nc("Calendar Era: Gregorian Christian Era, years < 0, LongFormat", "Before Christ");
++ shortName = i18nc("Calendar Era: Gregorian Christian Era, years < 0, ShortFormat", "BC");
+ }
+- format = i18nc( "(kdedt-format) Gregorian, BC, full era year format used for %EY, e.g. 2000 BC", "%Ey %EC" );
+- addEra( '-', 1, q->epoch().addDays( -1 ), -1, q->earliestValidDate(), name, shortName, format );
++ format = i18nc("(kdedt-format) Gregorian, BC, full era year format used for %EY, e.g. 2000 BC", "%Ey %EC");
++ addEra('-', 1, q->epoch().addDays(-1), -1, q->earliestValidDate(), name, shortName, format);
+
+- if ( m_useCommonEra ) {
+- name = i18nc( "Calendar Era: Gregorian Common Era, years > 0, LongFormat", "Common Era" );
+- shortName = i18nc( "Calendar Era: Gregorian Common Era, years > 0, ShortFormat", "CE" );
++ if (m_useCommonEra) {
++ name = i18nc("Calendar Era: Gregorian Common Era, years > 0, LongFormat", "Common Era");
++ shortName = i18nc("Calendar Era: Gregorian Common Era, years > 0, ShortFormat", "CE");
+ } else {
+- name = i18nc( "Calendar Era: Gregorian Christian Era, years > 0, LongFormat", "Anno Domini" );
+- shortName = i18nc( "Calendar Era: Gregorian Christian Era, years > 0, ShortFormat", "AD" );
++ name = i18nc("Calendar Era: Gregorian Christian Era, years > 0, LongFormat", "Anno Domini");
++ shortName = i18nc("Calendar Era: Gregorian Christian Era, years > 0, ShortFormat", "AD");
+ }
+- format = i18nc( "(kdedt-format) Gregorian, AD, full era year format used for %EY, e.g. 2000 AD", "%Ey %EC" );
+- addEra( '+', 1, q->epoch(), 1, q->latestValidDate(), name, shortName, format );
++ format = i18nc("(kdedt-format) Gregorian, AD, full era year format used for %EY, e.g. 2000 AD", "%Ey %EC");
++ addEra('+', 1, q->epoch(), 1, q->latestValidDate(), name, shortName, format);
+ }
+
+-int KCalendarSystemGregorianPrivate::monthsInYear( int year ) const
++int KCalendarSystemGregorianPrivate::monthsInYear(int year) const
+ {
+- Q_UNUSED( year )
++ Q_UNUSED(year)
+ return 12;
+ }
+
+-int KCalendarSystemGregorianPrivate::daysInMonth( int year, int month ) const
++int KCalendarSystemGregorianPrivate::daysInMonth(int year, int month) const
+ {
+- QDate tempDate( year, month, 1 );
+- return tempDate.daysInMonth();
++ if (month == 2) {
++ if (isLeapYear(year)) {
++ return 29;
++ } else {
++ return 28;
++ }
++ }
++
++ if (month == 4 || month == 6 || month == 9 || month == 11) {
++ return 30;
++ }
++
++ return 31;
+ }
+
+-int KCalendarSystemGregorianPrivate::daysInYear( int year ) const
++int KCalendarSystemGregorianPrivate::daysInYear(int year) const
+ {
+- QDate tempDate( year, 1, 1 );
+- return tempDate.daysInYear();
++ if (isLeapYear(year)) {
++ return 366;
++ } else {
++ return 365;
++ }
+ }
+
+ int KCalendarSystemGregorianPrivate::daysInWeek() const
+@@ -130,9 +114,21 @@ int KCalendarSystemGregorianPrivate::daysInWeek() const
+ return 7;
+ }
+
+-bool KCalendarSystemGregorianPrivate::isLeapYear( int year ) const
++bool KCalendarSystemGregorianPrivate::isLeapYear(int year) const
+ {
+- return QDate::isLeapYear( year );
++ if (!hasYearZero() && year < 1) {
++ year = year + 1;
++ }
++
++ if (year % 4 == 0) {
++ if (year % 100 != 0) {
++ return true;
++ } else if (year % 400 == 0) {
++ return true;
++ }
++ }
++
++ return false;
+ }
+
+ bool KCalendarSystemGregorianPrivate::hasLeapMonths() const
+@@ -157,7 +153,7 @@ int KCalendarSystemGregorianPrivate::maxMonthsInYear() const
+
+ int KCalendarSystemGregorianPrivate::earliestValidYear() const
+ {
+- return -4712;
++ return -4713;
+ }
+
+ int KCalendarSystemGregorianPrivate::latestValidYear() const
+@@ -165,465 +161,321 @@ int KCalendarSystemGregorianPrivate::latestValidYear() const
+ return 9999;
+ }
+
+-QString KCalendarSystemGregorianPrivate::monthName( int month, int year, KLocale::DateTimeComponentFormat format, bool possessive ) const
++QString KCalendarSystemGregorianPrivate::monthName(int month, int year, KLocale::DateTimeComponentFormat format, bool possessive) const
+ {
+- Q_UNUSED( year );
++ Q_UNUSED(year);
+
+- if ( format == KLocale::NarrowName ) {
+- switch ( month ) {
++ if (format == KLocale::NarrowName) {
++ switch (month) {
+ case 1:
+- return ki18nc( "Gregorian month 1 - KLocale::NarrowName", "J" ).toString( locale() );
++ return ki18nc("Gregorian month 1 - KLocale::NarrowName", "J").toString(locale());
+ case 2:
+- return ki18nc( "Gregorian month 2 - KLocale::NarrowName", "F" ).toString( locale() );
++ return ki18nc("Gregorian month 2 - KLocale::NarrowName", "F").toString(locale());
+ case 3:
+- return ki18nc( "Gregorian month 3 - KLocale::NarrowName", "M" ).toString( locale() );
++ return ki18nc("Gregorian month 3 - KLocale::NarrowName", "M").toString(locale());
+ case 4:
+- return ki18nc( "Gregorian month 4 - KLocale::NarrowName", "A" ).toString( locale() );
++ return ki18nc("Gregorian month 4 - KLocale::NarrowName", "A").toString(locale());
+ case 5:
+- return ki18nc( "Gregorian month 5 - KLocale::NarrowName", "M" ).toString( locale() );
++ return ki18nc("Gregorian month 5 - KLocale::NarrowName", "M").toString(locale());
+ case 6:
+- return ki18nc( "Gregorian month 6 - KLocale::NarrowName", "J" ).toString( locale() );
++ return ki18nc("Gregorian month 6 - KLocale::NarrowName", "J").toString(locale());
+ case 7:
+- return ki18nc( "Gregorian month 7 - KLocale::NarrowName", "J" ).toString( locale() );
++ return ki18nc("Gregorian month 7 - KLocale::NarrowName", "J").toString(locale());
+ case 8:
+- return ki18nc( "Gregorian month 8 - KLocale::NarrowName", "A" ).toString( locale() );
++ return ki18nc("Gregorian month 8 - KLocale::NarrowName", "A").toString(locale());
+ case 9:
+- return ki18nc( "Gregorian month 9 - KLocale::NarrowName", "S" ).toString( locale() );
++ return ki18nc("Gregorian month 9 - KLocale::NarrowName", "S").toString(locale());
+ case 10:
+- return ki18nc( "Gregorian month 10 - KLocale::NarrowName", "O" ).toString( locale() );
++ return ki18nc("Gregorian month 10 - KLocale::NarrowName", "O").toString(locale());
+ case 11:
+- return ki18nc( "Gregorian month 11 - KLocale::NarrowName", "N" ).toString( locale() );
++ return ki18nc("Gregorian month 11 - KLocale::NarrowName", "N").toString(locale());
+ case 12:
+- return ki18nc( "Gregorian month 12 - KLocale::NarrowName", "D" ).toString( locale() );
++ return ki18nc("Gregorian month 12 - KLocale::NarrowName", "D").toString(locale());
+ default:
+ return QString();
+ }
+ }
+
+- if ( format == KLocale::ShortName && possessive ) {
+- switch ( month ) {
++ if (format == KLocale::ShortName && possessive) {
++ switch (month) {
+ case 1:
+- return ki18nc( "Gregorian month 1 - KLocale::ShortName Possessive", "of Jan" ).toString( locale() );
++ return ki18nc("Gregorian month 1 - KLocale::ShortName Possessive", "of Jan").toString(locale());
+ case 2:
+- return ki18nc( "Gregorian month 2 - KLocale::ShortName Possessive", "of Feb" ).toString( locale() );
++ return ki18nc("Gregorian month 2 - KLocale::ShortName Possessive", "of Feb").toString(locale());
+ case 3:
+- return ki18nc( "Gregorian month 3 - KLocale::ShortName Possessive", "of Mar" ).toString( locale() );
++ return ki18nc("Gregorian month 3 - KLocale::ShortName Possessive", "of Mar").toString(locale());
+ case 4:
+- return ki18nc( "Gregorian month 4 - KLocale::ShortName Possessive", "of Apr" ).toString( locale() );
++ return ki18nc("Gregorian month 4 - KLocale::ShortName Possessive", "of Apr").toString(locale());
+ case 5:
+- return ki18nc( "Gregorian month 5 - KLocale::ShortName Possessive", "of May" ).toString( locale() );
++ return ki18nc("Gregorian month 5 - KLocale::ShortName Possessive", "of May").toString(locale());
+ case 6:
+- return ki18nc( "Gregorian month 6 - KLocale::ShortName Possessive", "of Jun" ).toString( locale() );
++ return ki18nc("Gregorian month 6 - KLocale::ShortName Possessive", "of Jun").toString(locale());
+ case 7:
+- return ki18nc( "Gregorian month 7 - KLocale::ShortName Possessive", "of Jul" ).toString( locale() );
++ return ki18nc("Gregorian month 7 - KLocale::ShortName Possessive", "of Jul").toString(locale());
+ case 8:
+- return ki18nc( "Gregorian month 8 - KLocale::ShortName Possessive", "of Aug" ).toString( locale() );
++ return ki18nc("Gregorian month 8 - KLocale::ShortName Possessive", "of Aug").toString(locale());
+ case 9:
+- return ki18nc( "Gregorian month 9 - KLocale::ShortName Possessive", "of Sep" ).toString( locale() );
++ return ki18nc("Gregorian month 9 - KLocale::ShortName Possessive", "of Sep").toString(locale());
+ case 10:
+- return ki18nc( "Gregorian month 10 - KLocale::ShortName Possessive", "of Oct" ).toString( locale() );
++ return ki18nc("Gregorian month 10 - KLocale::ShortName Possessive", "of Oct").toString(locale());
+ case 11:
+- return ki18nc( "Gregorian month 11 - KLocale::ShortName Possessive", "of Nov" ).toString( locale() );
++ return ki18nc("Gregorian month 11 - KLocale::ShortName Possessive", "of Nov").toString(locale());
+ case 12:
+- return ki18nc( "Gregorian month 12 - KLocale::ShortName Possessive", "of Dec" ).toString( locale() );
++ return ki18nc("Gregorian month 12 - KLocale::ShortName Possessive", "of Dec").toString(locale());
+ default:
+ return QString();
+ }
+ }
+
+- if ( format == KLocale::ShortName && !possessive ) {
+- switch ( month ) {
++ if (format == KLocale::ShortName && !possessive) {
++ switch (month) {
+ case 1:
+- return ki18nc( "Gregorian month 1 - KLocale::ShortName", "Jan" ).toString( locale() );
++ return ki18nc("Gregorian month 1 - KLocale::ShortName", "Jan").toString(locale());
+ case 2:
+- return ki18nc( "Gregorian month 2 - KLocale::ShortName", "Feb" ).toString( locale() );
++ return ki18nc("Gregorian month 2 - KLocale::ShortName", "Feb").toString(locale());
+ case 3:
+- return ki18nc( "Gregorian month 3 - KLocale::ShortName", "Mar" ).toString( locale() );
++ return ki18nc("Gregorian month 3 - KLocale::ShortName", "Mar").toString(locale());
+ case 4:
+- return ki18nc( "Gregorian month 4 - KLocale::ShortName", "Apr" ).toString( locale() );
++ return ki18nc("Gregorian month 4 - KLocale::ShortName", "Apr").toString(locale());
+ case 5:
+- return ki18nc( "Gregorian month 5 - KLocale::ShortName", "May" ).toString( locale() );
++ return ki18nc("Gregorian month 5 - KLocale::ShortName", "May").toString(locale());
+ case 6:
+- return ki18nc( "Gregorian month 6 - KLocale::ShortName", "Jun" ).toString( locale() );
++ return ki18nc("Gregorian month 6 - KLocale::ShortName", "Jun").toString(locale());
+ case 7:
+- return ki18nc( "Gregorian month 7 - KLocale::ShortName", "Jul" ).toString( locale() );
++ return ki18nc("Gregorian month 7 - KLocale::ShortName", "Jul").toString(locale());
+ case 8:
+- return ki18nc( "Gregorian month 8 - KLocale::ShortName", "Aug" ).toString( locale() );
++ return ki18nc("Gregorian month 8 - KLocale::ShortName", "Aug").toString(locale());
+ case 9:
+- return ki18nc( "Gregorian month 9 - KLocale::ShortName", "Sep" ).toString( locale() );
++ return ki18nc("Gregorian month 9 - KLocale::ShortName", "Sep").toString(locale());
+ case 10:
+- return ki18nc( "Gregorian month 10 - KLocale::ShortName", "Oct" ).toString( locale() );
++ return ki18nc("Gregorian month 10 - KLocale::ShortName", "Oct").toString(locale());
+ case 11:
+- return ki18nc( "Gregorian month 11 - KLocale::ShortName", "Nov" ).toString( locale() );
++ return ki18nc("Gregorian month 11 - KLocale::ShortName", "Nov").toString(locale());
+ case 12:
+- return ki18nc( "Gregorian month 12 - KLocale::ShortName", "Dec" ).toString( locale() );
++ return ki18nc("Gregorian month 12 - KLocale::ShortName", "Dec").toString(locale());
+ default:
+ return QString();
+ }
+ }
+
+- if ( format == KLocale::LongName && possessive ) {
+- switch ( month ) {
++ if (format == KLocale::LongName && possessive) {
++ switch (month) {
+ case 1:
+- return ki18nc( "Gregorian month 1 - KLocale::LongName Possessive", "of January" ).toString( locale() );
++ return ki18nc("Gregorian month 1 - KLocale::LongName Possessive", "of January").toString(locale());
+ case 2:
+- return ki18nc( "Gregorian month 2 - KLocale::LongName Possessive", "of February" ).toString( locale() );
++ return ki18nc("Gregorian month 2 - KLocale::LongName Possessive", "of February").toString(locale());
+ case 3:
+- return ki18nc( "Gregorian month 3 - KLocale::LongName Possessive", "of March" ).toString( locale() );
++ return ki18nc("Gregorian month 3 - KLocale::LongName Possessive", "of March").toString(locale());
+ case 4:
+- return ki18nc( "Gregorian month 4 - KLocale::LongName Possessive", "of April" ).toString( locale() );
++ return ki18nc("Gregorian month 4 - KLocale::LongName Possessive", "of April").toString(locale());
+ case 5:
+- return ki18nc( "Gregorian month 5 - KLocale::LongName Possessive", "of May" ).toString( locale() );
++ return ki18nc("Gregorian month 5 - KLocale::LongName Possessive", "of May").toString(locale());
+ case 6:
+- return ki18nc( "Gregorian month 6 - KLocale::LongName Possessive", "of June" ).toString( locale() );
++ return ki18nc("Gregorian month 6 - KLocale::LongName Possessive", "of June").toString(locale());
+ case 7:
+- return ki18nc( "Gregorian month 7 - KLocale::LongName Possessive", "of July" ).toString( locale() );
++ return ki18nc("Gregorian month 7 - KLocale::LongName Possessive", "of July").toString(locale());
+ case 8:
+- return ki18nc( "Gregorian month 8 - KLocale::LongName Possessive", "of August" ).toString( locale() );
++ return ki18nc("Gregorian month 8 - KLocale::LongName Possessive", "of August").toString(locale());
+ case 9:
+- return ki18nc( "Gregorian month 9 - KLocale::LongName Possessive", "of September" ).toString( locale() );
++ return ki18nc("Gregorian month 9 - KLocale::LongName Possessive", "of September").toString(locale());
+ case 10:
+- return ki18nc( "Gregorian month 10 - KLocale::LongName Possessive", "of October" ).toString( locale() );
++ return ki18nc("Gregorian month 10 - KLocale::LongName Possessive", "of October").toString(locale());
+ case 11:
+- return ki18nc( "Gregorian month 11 - KLocale::LongName Possessive", "of November" ).toString( locale() );
++ return ki18nc("Gregorian month 11 - KLocale::LongName Possessive", "of November").toString(locale());
+ case 12:
+- return ki18nc( "Gregorian month 12 - KLocale::LongName Possessive", "of December" ).toString( locale() );
++ return ki18nc("Gregorian month 12 - KLocale::LongName Possessive", "of December").toString(locale());
+ default:
+ return QString();
+ }
+ }
+
+ // Default to LongName
+- switch ( month ) {
++ switch (month) {
+ case 1:
+- return ki18nc( "Gregorian month 1 - KLocale::LongName", "January" ).toString( locale() );
++ return ki18nc("Gregorian month 1 - KLocale::LongName", "January").toString(locale());
+ case 2:
+- return ki18nc( "Gregorian month 2 - KLocale::LongName", "February" ).toString( locale() );
++ return ki18nc("Gregorian month 2 - KLocale::LongName", "February").toString(locale());
+ case 3:
+- return ki18nc( "Gregorian month 3 - KLocale::LongName", "March" ).toString( locale() );
++ return ki18nc("Gregorian month 3 - KLocale::LongName", "March").toString(locale());
+ case 4:
+- return ki18nc( "Gregorian month 4 - KLocale::LongName", "April" ).toString( locale() );
++ return ki18nc("Gregorian month 4 - KLocale::LongName", "April").toString(locale());
+ case 5:
+- return ki18nc( "Gregorian month 5 - KLocale::LongName", "May" ).toString( locale() );
++ return ki18nc("Gregorian month 5 - KLocale::LongName", "May").toString(locale());
+ case 6:
+- return ki18nc( "Gregorian month 6 - KLocale::LongName", "June" ).toString( locale() );
++ return ki18nc("Gregorian month 6 - KLocale::LongName", "June").toString(locale());
+ case 7:
+- return ki18nc( "Gregorian month 7 - KLocale::LongName", "July" ).toString( locale() );
++ return ki18nc("Gregorian month 7 - KLocale::LongName", "July").toString(locale());
+ case 8:
+- return ki18nc( "Gregorian month 8 - KLocale::LongName", "August" ).toString( locale() );
++ return ki18nc("Gregorian month 8 - KLocale::LongName", "August").toString(locale());
+ case 9:
+- return ki18nc( "Gregorian month 9 - KLocale::LongName", "September" ).toString( locale() );
++ return ki18nc("Gregorian month 9 - KLocale::LongName", "September").toString(locale());
+ case 10:
+- return ki18nc( "Gregorian month 10 - KLocale::LongName", "October" ).toString( locale() );
++ return ki18nc("Gregorian month 10 - KLocale::LongName", "October").toString(locale());
+ case 11:
+- return ki18nc( "Gregorian month 11 - KLocale::LongName", "November" ).toString( locale() );
++ return ki18nc("Gregorian month 11 - KLocale::LongName", "November").toString(locale());
+ case 12:
+- return ki18nc( "Gregorian month 12 - KLocale::LongName", "December" ).toString( locale() );
++ return ki18nc("Gregorian month 12 - KLocale::LongName", "December").toString(locale());
+ default:
+ return QString();
+ }
+ }
+
+-QString KCalendarSystemGregorianPrivate::weekDayName( int weekDay, KLocale::DateTimeComponentFormat format ) const
++QString KCalendarSystemGregorianPrivate::weekDayName(int weekDay, KLocale::DateTimeComponentFormat format) const
+ {
+- if ( format == KLocale::NarrowName ) {
+- switch ( weekDay ) {
++ if (format == KLocale::NarrowName) {
++ switch (weekDay) {
+ case 1:
+- return ki18nc( "Gregorian weekday 1 - KLocale::NarrowName ", "M" ).toString( locale() );
++ return ki18nc("Gregorian weekday 1 - KLocale::NarrowName ", "M").toString(locale());
+ case 2:
+- return ki18nc( "Gregorian weekday 2 - KLocale::NarrowName ", "T" ).toString( locale() );
++ return ki18nc("Gregorian weekday 2 - KLocale::NarrowName ", "T").toString(locale());
+ case 3:
+- return ki18nc( "Gregorian weekday 3 - KLocale::NarrowName ", "W" ).toString( locale() );
++ return ki18nc("Gregorian weekday 3 - KLocale::NarrowName ", "W").toString(locale());
+ case 4:
+- return ki18nc( "Gregorian weekday 4 - KLocale::NarrowName ", "T" ).toString( locale() );
++ return ki18nc("Gregorian weekday 4 - KLocale::NarrowName ", "T").toString(locale());
+ case 5:
+- return ki18nc( "Gregorian weekday 5 - KLocale::NarrowName ", "F" ).toString( locale() );
++ return ki18nc("Gregorian weekday 5 - KLocale::NarrowName ", "F").toString(locale());
+ case 6:
+- return ki18nc( "Gregorian weekday 6 - KLocale::NarrowName ", "S" ).toString( locale() );
++ return ki18nc("Gregorian weekday 6 - KLocale::NarrowName ", "S").toString(locale());
+ case 7:
+- return ki18nc( "Gregorian weekday 7 - KLocale::NarrowName ", "S" ).toString( locale() );
++ return ki18nc("Gregorian weekday 7 - KLocale::NarrowName ", "S").toString(locale());
+ default:
+ return QString();
+ }
+ }
+
+- if ( format == KLocale::ShortName || format == KLocale:: ShortNumber ) {
+- switch ( weekDay ) {
++ if (format == KLocale::ShortName || format == KLocale:: ShortNumber) {
++ switch (weekDay) {
+ case 1:
+- return ki18nc( "Gregorian weekday 1 - KLocale::ShortName", "Mon" ).toString( locale() );
++ return ki18nc("Gregorian weekday 1 - KLocale::ShortName", "Mon").toString(locale());
+ case 2:
+- return ki18nc( "Gregorian weekday 2 - KLocale::ShortName", "Tue" ).toString( locale() );
++ return ki18nc("Gregorian weekday 2 - KLocale::ShortName", "Tue").toString(locale());
+ case 3:
+- return ki18nc( "Gregorian weekday 3 - KLocale::ShortName", "Wed" ).toString( locale() );
++ return ki18nc("Gregorian weekday 3 - KLocale::ShortName", "Wed").toString(locale());
+ case 4:
+- return ki18nc( "Gregorian weekday 4 - KLocale::ShortName", "Thu" ).toString( locale() );
++ return ki18nc("Gregorian weekday 4 - KLocale::ShortName", "Thu").toString(locale());
+ case 5:
+- return ki18nc( "Gregorian weekday 5 - KLocale::ShortName", "Fri" ).toString( locale() );
++ return ki18nc("Gregorian weekday 5 - KLocale::ShortName", "Fri").toString(locale());
+ case 6:
+- return ki18nc( "Gregorian weekday 6 - KLocale::ShortName", "Sat" ).toString( locale() );
++ return ki18nc("Gregorian weekday 6 - KLocale::ShortName", "Sat").toString(locale());
+ case 7:
+- return ki18nc( "Gregorian weekday 7 - KLocale::ShortName", "Sun" ).toString( locale() );
++ return ki18nc("Gregorian weekday 7 - KLocale::ShortName", "Sun").toString(locale());
+ default: return QString();
+ }
+ }
+
+- switch ( weekDay ) {
++ switch (weekDay) {
+ case 1:
+- return ki18nc( "Gregorian weekday 1 - KLocale::LongName", "Monday" ).toString( locale() );
++ return ki18nc("Gregorian weekday 1 - KLocale::LongName", "Monday").toString(locale());
+ case 2:
+- return ki18nc( "Gregorian weekday 2 - KLocale::LongName", "Tuesday" ).toString( locale() );
++ return ki18nc("Gregorian weekday 2 - KLocale::LongName", "Tuesday").toString(locale());
+ case 3:
+- return ki18nc( "Gregorian weekday 3 - KLocale::LongName", "Wednesday" ).toString( locale() );
++ return ki18nc("Gregorian weekday 3 - KLocale::LongName", "Wednesday").toString(locale());
+ case 4:
+- return ki18nc( "Gregorian weekday 4 - KLocale::LongName", "Thursday" ).toString( locale() );
++ return ki18nc("Gregorian weekday 4 - KLocale::LongName", "Thursday").toString(locale());
+ case 5:
+- return ki18nc( "Gregorian weekday 5 - KLocale::LongName", "Friday" ).toString( locale() );
++ return ki18nc("Gregorian weekday 5 - KLocale::LongName", "Friday").toString(locale());
+ case 6:
+- return ki18nc( "Gregorian weekday 6 - KLocale::LongName", "Saturday" ).toString( locale() );
++ return ki18nc("Gregorian weekday 6 - KLocale::LongName", "Saturday").toString(locale());
+ case 7:
+- return ki18nc( "Gregorian weekday 7 - KLocale::LongName", "Sunday" ).toString( locale() );
++ return ki18nc("Gregorian weekday 7 - KLocale::LongName", "Sunday").toString(locale());
+ default:
+ return QString();
+ }
+ }
+
+
+-KCalendarSystemGregorian::KCalendarSystemGregorian( const KLocale *locale )
+- : KCalendarSystem( *new KCalendarSystemGregorianPrivate( this ), KSharedConfig::Ptr(), locale ),
+- dont_use( 0 )
++KCalendarSystemGregorian::KCalendarSystemGregorian(const KLocale *locale)
++ : KCalendarSystem(*new KCalendarSystemGregorianPrivate(this), KSharedConfig::Ptr(), locale)
+ {
+- d_ptr->loadConfig( calendarType() );
++ d_ptr->loadConfig(calendarType());
+ }
+
+-KCalendarSystemGregorian::KCalendarSystemGregorian( const KSharedConfig::Ptr config, const KLocale *locale )
+- : KCalendarSystem( *new KCalendarSystemGregorianPrivate( this ), config, locale ),
+- dont_use( 0 )
++KCalendarSystemGregorian::KCalendarSystemGregorian(const KSharedConfig::Ptr config,
++ const KLocale *locale)
++ : KCalendarSystem(*new KCalendarSystemGregorianPrivate(this), config, locale)
+ {
+- d_ptr->loadConfig( calendarType() );
++ d_ptr->loadConfig(calendarType());
+ }
+
+-KCalendarSystemGregorian::KCalendarSystemGregorian( KCalendarSystemGregorianPrivate &dd, const KSharedConfig::Ptr config, const KLocale *locale )
+- : KCalendarSystem( dd, config, locale ),
+- dont_use( 0 )
++KCalendarSystemGregorian::KCalendarSystemGregorian(KCalendarSystemGregorianPrivate &dd,
++ const KSharedConfig::Ptr config,
++ const KLocale *locale)
++ : KCalendarSystem(dd, config, locale)
+ {
+- d_ptr->loadConfig( calendarType() );
++ d_ptr->loadConfig(calendarType());
+ }
+
+ KCalendarSystemGregorian::~KCalendarSystemGregorian()
+ {
+- delete dont_use;
+ }
+
+ QString KCalendarSystemGregorian::calendarType() const
+ {
+- return QLatin1String( "gregorian" );
++ return QLatin1String("gregorian-proleptic");
+ }
+
+ QDate KCalendarSystemGregorian::epoch() const
+ {
+- // 1 Jan 1 AD in Julian
+- return QDate::fromJulianDay( 1721424 );
++ return QDate::fromJulianDay(1721426);
+ }
+
+ QDate KCalendarSystemGregorian::earliestValidDate() const
+ {
+- // 1 Jan 4712 BC, no year zero, cant be 4713BC due to error in QDate that day 0 is not valid
+- // and we really need the first in each year to be valid for the date maths
+- return QDate::fromJulianDay( 366 );
++ // Gregorian 1 Jan 4713 BC, no year zero
++ return QDate::fromJulianDay(38);
+ }
+
+ QDate KCalendarSystemGregorian::latestValidDate() const
+ {
+- // Set to last day of year 9999 until confirm date formats & widets support > 9999
++ // Set to last day of year 9999 until confirm date formats & widgets support > 9999
+ // In Gregorian this is 9999-12-31, which is is jd 5373484
+ // Can't call setDate( 9999, 12, 31 ) as it creates circular reference!
+- return QDate::fromJulianDay( 5373484 );
+-}
+-
+-bool KCalendarSystemGregorian::isValid( int year, int month, int day ) const
+-{
+- // Limit to max year 9999 for now, QDate allows to be greater
+- if ( year <= 9999 ) {
+- return QDate::isValid( year, month, day );
+- }
+-
+- return false;
+-}
+-
+-bool KCalendarSystemGregorian::isValid( const QDate &date ) const
+-{
+- return KCalendarSystem::isValid( date );
+-}
+-
+-bool KCalendarSystemGregorian::setDate( QDate &date, int year, int month, int day ) const
+-{
+- return KCalendarSystem::setDate( date, year, month, day );
+-}
+-
+-// Deprecated
+-bool KCalendarSystemGregorian::setYMD( QDate &date, int y, int m, int d ) const
+-{
+- return KCalendarSystem::setDate( date, y, m, d );
+-}
+-
+-int KCalendarSystemGregorian::year( const QDate &date ) const
+-{
+- return date.year();
+-}
+-
+-int KCalendarSystemGregorian::month( const QDate &date ) const
+-{
+- return date.month();
+-}
+-
+-int KCalendarSystemGregorian::day( const QDate &date ) const
+-{
+- return date.day();
+-}
+-
+-QDate KCalendarSystemGregorian::addYears( const QDate &date, int nyears ) const
+-{
+- return KCalendarSystem::addYears( date, nyears );
+-}
+-
+-QDate KCalendarSystemGregorian::addMonths( const QDate &date, int nmonths ) const
+-{
+- return KCalendarSystem::addMonths( date, nmonths );
+-}
+-
+-QDate KCalendarSystemGregorian::addDays( const QDate &date, int ndays ) const
+-{
+- return KCalendarSystem::addDays( date, ndays );
+-}
+-
+-int KCalendarSystemGregorian::monthsInYear( const QDate &date ) const
+-{
+- return KCalendarSystem::monthsInYear( date );
+-}
+-
+-int KCalendarSystemGregorian::weeksInYear( const QDate &date ) const
+-{
+- return KCalendarSystem::weeksInYear( date );
+-}
+-
+-int KCalendarSystemGregorian::weeksInYear( int year ) const
+-{
+- return KCalendarSystem::weeksInYear( year );
++ return QDate::fromJulianDay(5373484);
+ }
+
+-int KCalendarSystemGregorian::daysInYear( const QDate &date ) const
++bool KCalendarSystemGregorian::isValid(int year, int month, int day) const
+ {
+- return date.daysInYear();
++ return KCalendarSystem::isValid(year, month, day);
+ }
+
+-int KCalendarSystemGregorian::daysInMonth( const QDate &date ) const
++bool KCalendarSystemGregorian::isValid(const QDate &date) const
+ {
+- return date.daysInMonth();
++ return KCalendarSystem::isValid(date);
+ }
+
+-int KCalendarSystemGregorian::daysInWeek( const QDate &date ) const
++bool KCalendarSystemGregorian::isLeapYear(int year) const
+ {
+- return KCalendarSystem::daysInWeek( date );
++ return KCalendarSystem::isLeapYear(year);
+ }
+
+-int KCalendarSystemGregorian::dayOfYear( const QDate &date ) const
++bool KCalendarSystemGregorian::isLeapYear(const QDate &date) const
+ {
+- return date.dayOfYear();
++ return KCalendarSystem::isLeapYear(date);
+ }
+
+-int KCalendarSystemGregorian::dayOfWeek( const QDate &date ) const
++QString KCalendarSystemGregorian::monthName(int month, int year, MonthNameFormat format) const
+ {
+- return date.dayOfWeek();
++ return KCalendarSystem::monthName(month, year, format);
+ }
+
+-int KCalendarSystemGregorian::weekNumber( const QDate &date, int * yearNum ) const
++QString KCalendarSystemGregorian::monthName(const QDate &date, MonthNameFormat format) const
+ {
+- return KCalendarSystem::weekNumber( date, yearNum );
++ return KCalendarSystem::monthName(date, format);
+ }
+
+-bool KCalendarSystemGregorian::isLeapYear( int year ) const
++QString KCalendarSystemGregorian::weekDayName(int weekDay, WeekDayNameFormat format) const
+ {
+- return QDate::isLeapYear( year );
++ return KCalendarSystem::weekDayName(weekDay, format);
+ }
+
+-bool KCalendarSystemGregorian::isLeapYear( const QDate &date ) const
++QString KCalendarSystemGregorian::weekDayName(const QDate &date, WeekDayNameFormat format) const
+ {
+- return QDate::isLeapYear( date.year() );
++ return KCalendarSystem::weekDayName(date, format);
+ }
+
+-QString KCalendarSystemGregorian::monthName( int month, int year, MonthNameFormat format ) const
++int KCalendarSystemGregorian::yearStringToInteger(const QString &sNum, int &iLength) const
+ {
+- return KCalendarSystem::monthName( month, year, format );
+-}
+-
+-QString KCalendarSystemGregorian::monthName( const QDate &date, MonthNameFormat format ) const
+-{
+- return KCalendarSystem::monthName( date, format );
+-}
+-
+-QString KCalendarSystemGregorian::weekDayName( int weekDay, WeekDayNameFormat format ) const
+-{
+- return KCalendarSystem::weekDayName( weekDay, format );
+-}
+-
+-QString KCalendarSystemGregorian::weekDayName( const QDate &date, WeekDayNameFormat format ) const
+-{
+- return KCalendarSystem::weekDayName( date, format );
+-}
+-
+-QString KCalendarSystemGregorian::yearString( const QDate &pDate, StringFormat format ) const
+-{
+- return KCalendarSystem::yearString( pDate, format );
+-}
+-
+-QString KCalendarSystemGregorian::monthString( const QDate &pDate, StringFormat format ) const
+-{
+- return KCalendarSystem::monthString( pDate, format );
+-}
+-
+-QString KCalendarSystemGregorian::dayString( const QDate &pDate, StringFormat format ) const
+-{
+- return KCalendarSystem::dayString( pDate, format );
+-}
+-
+-int KCalendarSystemGregorian::yearStringToInteger( const QString &sNum, int &iLength ) const
+-{
+- return KCalendarSystem::yearStringToInteger( sNum, iLength );
+-}
+-
+-int KCalendarSystemGregorian::monthStringToInteger( const QString &sNum, int &iLength ) const
+-{
+- return KCalendarSystem::monthStringToInteger( sNum, iLength );
+-}
+-
+-int KCalendarSystemGregorian::dayStringToInteger( const QString &sNum, int &iLength ) const
+-{
+- return KCalendarSystem::dayStringToInteger( sNum, iLength );
+-}
+-
+-QString KCalendarSystemGregorian::formatDate( const QDate &date, KLocale::DateFormat format ) const
+-{
+- return KCalendarSystem::formatDate( date, format );
+-}
+-
+-QDate KCalendarSystemGregorian::readDate( const QString &str, bool *ok ) const
+-{
+- return KCalendarSystem::readDate( str, ok );
+-}
+-
+-QDate KCalendarSystemGregorian::readDate( const QString &intstr, const QString &fmt, bool *ok ) const
+-{
+- return KCalendarSystem::readDate( intstr, fmt, ok );
+-}
+-
+-QDate KCalendarSystemGregorian::readDate( const QString &str, KLocale::ReadDateFlags flags, bool *ok ) const
+-{
+- return KCalendarSystem::readDate( str, flags, ok );
+-}
+-
+-int KCalendarSystemGregorian::weekStartDay() const
+-{
+- return KCalendarSystem::weekStartDay();
++ return KCalendarSystem::yearStringToInteger(sNum, iLength);
+ }
+
+ int KCalendarSystemGregorian::weekDayOfPray() const
+@@ -648,24 +500,67 @@ bool KCalendarSystemGregorian::isSolar() const
+
+ bool KCalendarSystemGregorian::isProleptic() const
+ {
+- return false;
++ return true;
+ }
+
+-bool KCalendarSystemGregorian::julianDayToDate( int jd, int &year, int &month, int &day ) const
++bool KCalendarSystemGregorian::julianDayToDate(int jd, int &year, int &month, int &day) const
+ {
+- QDate date = QDate::fromJulianDay( jd );
++ Q_D(const KCalendarSystemGregorian);
++
++ // Formula from The Calendar FAQ by Claus Tondering
++ // http://www.tondering.dk/claus/cal/node3.html#SECTION003161000000000000000
++ // NOTE: Coded from scratch from mathematical formulas, not copied from
++ // the Boost licensed source code
+
+- date.getDate( &year, &month, &day );
++ int a = jd + 32044;
++ int b = ((4 * a) + 3) / 146097;
++ int c = a - ((146097 * b) / 4);
++ int dd = ((4 * c) + 3) / 1461;
++ int e = c - ((1461 * dd) / 4);
++ int m = ((5 * e) + 2) / 153;
++ day = e - (((153 * m) + 2) / 5) + 1;
++ month = m + 3 - (12 * (m / 10));
++ year = (100 * b) + dd - 4800 + (m / 10);
+
+- return date.isValid();
++ // If year is -ve then is BC. In Gregorian there is no year 0, but the maths
++ // is easier if we pretend there is, so internally year of 0 = 1BC = -1 outside
++ // Check for Year 0 support as some Gregorian based calendars do have it, e.g. Thai and ISO
++ if (!d->hasYearZero() && year < 1) {
++ year = year - 1;
++ }
++ return true;
+ }
+
+-bool KCalendarSystemGregorian::dateToJulianDay( int year, int month, int day, int &jd ) const
++bool KCalendarSystemGregorian::dateToJulianDay(int year, int month, int day, int &jd) const
+ {
+- QDate date;
++ Q_D(const KCalendarSystemGregorian);
++
++ // Formula from The Calendar FAQ by Claus Tondering
++ // http://www.tondering.dk/claus/cal/node3.html#SECTION003161000000000000000
++ // NOTE: Coded from scratch from mathematical formulas, not copied from
++ // the Boost licensed source code
+
+- date.setDate( year, month, day );
+- jd = date.toJulianDay();
++ // If year is -ve then is BC. In Gregorian there is no year 0, but the maths
++ // is easier if we pretend there is, so internally year of -1 = 1BC = 0 internally
++ // Check for Year 0 support as some Gregorian based calendars do have it, e.g. Thai and ISO
++ int y;
++ if (!d->hasYearZero() && year < 1) {
++ y = year + 1;
++ } else {
++ y = year;
++ }
+
+- return date.isValid();
++ int a = (14 - month) / 12;
++ y = y + 4800 - a;
++ int m = month + (12 * a) - 3;
++
++ jd = day
++ + (((153 * m) + 2) / 5)
++ + (365 * y)
++ + (y / 4)
++ - (y / 100)
++ + (y / 400)
++ - 32045;
++
++ return true;
+ }
+diff --git a/kdecore/date/kcalendarsystemgregorian_p.h b/kdecore/date/kcalendarsystemgregorian_p.h
+index 31f861b..c173ea9 100644
+--- a/kdecore/date/kcalendarsystemgregorian_p.h
++++ b/kdecore/date/kcalendarsystemgregorian_p.h
+@@ -1,7 +1,5 @@
+ /*
+- Copyright (c) 2002 Carlos Moro <cfmoro@correo.uniovi.es>
+- Copyright (c) 2002 Hans Petter Bieker <bieker@kde.org>
+- Copyright 2007, 2010 John Layt <john@layt.net>
++ Copyright 2009, 2010 John Layt <john@layt.net>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+@@ -28,84 +26,46 @@ class KCalendarSystemGregorianPrivate;
+
+ /**
+ * @internal
+- * This is the Gregorian calendar implementation.
++ * This is the pure Gregorian calendar implementation.
+ *
+- * The Gregorian calendar is the most used calendar today. The first year in
+- * the calendar is set to the birth of Christ.
++ * Note: This is a proleptic version of the Gregorian calendar, it does not
++ * copy the QDate method of using the Julian Calendar for dates before 15
++ * October 1582. This is the traditional proleptic Gregorian calendar
++ * that does not have a year 0, unlike the ISO version which does.
+ *
+- * WARNING: This is not a pure Gregorian calendar, it copies the QDate method
+- * of using the Julian Calendar for dates before 15 October 1582.
+- *
+- * @b license GNU-GPL v.2
++ * @b license GNU-LGPL v.2 or later
+ *
+ * @see KLocale,KCalendarSystem
+ *
+- * @author Carlos Moro <cfmoro@correo.uniovi.es>
++ * @author John Layt <john@layt.net>
+ */
+ class KCalendarSystemGregorian: public KCalendarSystem
+ {
+ public:
+- explicit KCalendarSystemGregorian ( const KLocale *locale = 0 );
+- explicit KCalendarSystemGregorian( const KSharedConfig::Ptr config, const KLocale *locale = 0 );
+- virtual ~KCalendarSystemGregorian ();
++ explicit KCalendarSystemGregorian(const KLocale *locale = 0);
++ explicit KCalendarSystemGregorian(const KSharedConfig::Ptr config, const KLocale *locale = 0);
++ virtual ~KCalendarSystemGregorian();
+
+ virtual QString calendarType() const;
+
+ virtual QDate epoch() const;
+ virtual QDate earliestValidDate() const;
+ virtual QDate latestValidDate() const;
+- virtual bool isValid( int year, int month, int day ) const;
+- virtual bool isValid( const QDate &date ) const;
+-
+- virtual bool setDate( QDate &date, int year, int month, int day ) const;
+- /** @deprecated */
+- virtual bool setYMD( QDate &date, int year, int month, int day ) const;
+-
+- virtual int year( const QDate &date ) const;
+- virtual int month( const QDate &date ) const;
+- virtual int day( const QDate &date ) const;
+-
+- virtual QDate addYears( const QDate &date, int nyears ) const;
+- virtual QDate addMonths( const QDate &date, int nmonths ) const;
+- virtual QDate addDays( const QDate &date, int ndays ) const;
+-
+- virtual int monthsInYear( const QDate &date ) const;
+- virtual int weeksInYear( const QDate &date ) const;
+- virtual int weeksInYear( int year ) const;
+- virtual int daysInYear( const QDate &date ) const;
+- virtual int daysInMonth( const QDate &date ) const;
+- virtual int daysInWeek( const QDate &date ) const;
+-
+- virtual int dayOfYear( const QDate &date ) const;
+- virtual int dayOfWeek( const QDate &date ) const;
+-
+- virtual int weekNumber( const QDate &date, int *yearNum = 0 ) const;
+-
+- virtual bool isLeapYear( int year ) const;
+- virtual bool isLeapYear( const QDate &date ) const;
+-
+- virtual QString monthName( int month, int year, MonthNameFormat format = LongName ) const;
+- virtual QString monthName( const QDate &date, MonthNameFormat format = LongName ) const;
+-
+- virtual QString weekDayName( int weekDay, WeekDayNameFormat format = LongDayName ) const;
+- virtual QString weekDayName( const QDate &date, WeekDayNameFormat format = LongDayName ) const;
++ virtual bool isValid(int year, int month, int day) const;
++ virtual bool isValid(const QDate &date) const;
+
+- virtual QString yearString( const QDate & pDate, StringFormat format = LongFormat ) const;
+- virtual QString monthString( const QDate &pDate, StringFormat format = LongFormat ) const;
+- virtual QString dayString( const QDate &pDate, StringFormat format = LongFormat ) const;
++ virtual bool isLeapYear(int year) const;
++ virtual bool isLeapYear(const QDate &date) const;
+
+- virtual int yearStringToInteger( const QString &sNum, int &iLength ) const;
+- virtual int monthStringToInteger( const QString &sNum, int &iLength ) const;
+- virtual int dayStringToInteger( const QString &sNum, int &iLength ) const;
++ virtual QString monthName(int month, int year, MonthNameFormat format = LongName) const;
++ virtual QString monthName(const QDate &date, MonthNameFormat format = LongName) const;
+
+- virtual QString formatDate( const QDate &fromDate, KLocale::DateFormat toFormat = KLocale::LongDate ) const;
++ virtual QString weekDayName(int weekDay, WeekDayNameFormat format = LongDayName) const;
++ virtual QString weekDayName(const QDate &date, WeekDayNameFormat format = LongDayName) const;
+
+- virtual QDate readDate( const QString &str, bool *ok = 0 ) const;
+- virtual QDate readDate( const QString &dateString, const QString &dateFormat, bool *ok = 0 ) const;
+- virtual QDate readDate( const QString &str, KLocale::ReadDateFlags flags, bool *ok = 0 ) const;
++ virtual int yearStringToInteger(const QString &sNum, int &iLength) const;
+
+- virtual int weekStartDay() const;
+- virtual int weekDayOfPray () const;
++ virtual int weekDayOfPray() const;
+
+ virtual bool isLunar() const;
+ virtual bool isLunisolar() const;
+@@ -113,15 +73,15 @@ public:
+ virtual bool isProleptic() const;
+
+ protected:
+- virtual bool julianDayToDate( int jd, int &year, int &month, int &day ) const;
+- virtual bool dateToJulianDay( int year, int month, int day, int &jd ) const;
+- KCalendarSystemGregorian( KCalendarSystemGregorianPrivate &dd,
+- const KSharedConfig::Ptr config = KSharedConfig::Ptr(),
+- const KLocale *locale = 0 );
++ virtual bool julianDayToDate(int jd, int &year, int &month, int &day) const;
++ virtual bool dateToJulianDay(int year, int month, int day, int &jd) const;
++ KCalendarSystemGregorian(KCalendarSystemGregorianPrivate &dd,
++ const KSharedConfig::Ptr config = KSharedConfig::Ptr(),
++ const KLocale *locale = 0);
+
+ private:
+- Q_DECLARE_PRIVATE( KCalendarSystemGregorian )
+- KCalendarSystemGregorianPrivate * const dont_use; // KDE5 remove, use shared d
++ friend class KCalendarSystemIndianNational; // To allow access to julianDayToDate() and dateToJulianDay()
++ Q_DECLARE_PRIVATE(KCalendarSystemGregorian)
+ };
+
+-#endif
++#endif // KCALENDARSYSTEMGREGORIAN_H
+diff --git a/kdecore/date/kcalendarsystemgregorianprivate_p.h b/kdecore/date/kcalendarsystemgregorianprivate_p.h
+new file mode 100644
+index 0000000..61d6646
+--- /dev/null
++++ b/kdecore/date/kcalendarsystemgregorianprivate_p.h
+@@ -0,0 +1,54 @@
++/*
++ Copyright 2009, 2010 John Layt <john@layt.net>
++
++ This library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Library General Public
++ License as published by the Free Software Foundation; either
++ version 2 of the License, or (at your option) any later version.
++
++ This library is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Library General Public License for more details.
++
++ You should have received a copy of the GNU Library General Public License
++ along with this library; see the file COPYING.LIB. If not, write to
++ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
++ Boston, MA 02110-1301, USA.
++*/
++
++#ifndef KCALENDARSYSTEMGREGORIANPRIVATE_H
++#define KCALENDARSYSTEMGREGORIANPRIVATE_H
++
++// Derived gregorian kde calendar class
++
++#include "kcalendarsystemprivate_p.h"
++
++class KCalendarSystemGregorianPrivate : public KCalendarSystemPrivate
++{
++public:
++ explicit KCalendarSystemGregorianPrivate(KCalendarSystemGregorian *q);
++
++ virtual ~KCalendarSystemGregorianPrivate();
++
++ // Virtual methods each calendar system must re-implement
++ virtual KLocale::CalendarSystem calendarSystem() const;
++ virtual void loadDefaultEraList();
++ virtual int monthsInYear(int year) const;
++ virtual int daysInMonth(int year, int month) const;
++ virtual int daysInYear(int year) const;
++ virtual int daysInWeek() const;
++ virtual bool isLeapYear(int year) const;
++ virtual bool hasLeapMonths() const;
++ virtual bool hasYearZero() const;
++ virtual int maxDaysInWeek() const;
++ virtual int maxMonthsInYear() const;
++ virtual int earliestValidYear() const;
++ virtual int latestValidYear() const;
++ virtual QString monthName(int month, int year, KLocale::DateTimeComponentFormat format, bool possessive) const;
++ virtual QString weekDayName(int weekDay, KLocale::DateTimeComponentFormat format) const;
++
++ bool m_useCommonEra;
++};
++
++#endif // KCALENDARSYSTEMGREGORIANPRIVATE_H
+diff --git a/kdecore/date/kcalendarsystemgregorianproleptic.cpp b/kdecore/date/kcalendarsystemgregorianproleptic.cpp
+deleted file mode 100644
+index 32ffeb4..0000000
+--- a/kdecore/date/kcalendarsystemgregorianproleptic.cpp
++++ /dev/null
+@@ -1,706 +0,0 @@
+-/*
+- Copyright 2009, 2010 John Layt <john@layt.net>
+-
+- This library is free software; you can redistribute it and/or
+- modify it under the terms of the GNU Library General Public
+- License as published by the Free Software Foundation; either
+- version 2 of the License, or (at your option) any later version.
+-
+- This library is distributed in the hope that it will be useful,
+- but WITHOUT ANY WARRANTY; without even the implied warranty of
+- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+- Library General Public License for more details.
+-
+- You should have received a copy of the GNU Library General Public License
+- along with this library; see the file COPYING.LIB. If not, write to
+- the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+- Boston, MA 02110-1301, USA.
+-*/
+-
+-// Derived gregorian kde calendar class
+-
+-#include "kcalendarsystemgregorianproleptic_p.h"
+-#include "kcalendarsystemgregorianprolepticprivate_p.h"
+-#include "kcalendarera_p.h"
+-
+-#include "kdebug.h"
+-#include "klocale.h"
+-#include "kglobal.h"
+-#include "kconfiggroup.h"
+-
+-#include <QtCore/QDate>
+-#include <QtCore/QCharRef>
+-
+-// Shared d pointer base class definitions
+-
+-KCalendarSystemGregorianProlepticPrivate::KCalendarSystemGregorianProlepticPrivate( KCalendarSystemGregorianProleptic *q )
+- :KCalendarSystemPrivate( q )
+-{
+-}
+-
+-KCalendarSystemGregorianProlepticPrivate::~KCalendarSystemGregorianProlepticPrivate()
+-{
+-}
+-
+-KLocale::CalendarSystem KCalendarSystemGregorianProlepticPrivate::calendarSystem() const
+-{
+- return KLocale::GregorianCalendar;
+-}
+-
+-// Dummy version using Gregorian as an example
+-// This method MUST be re-implemented in any new Calendar System
+-void KCalendarSystemGregorianProlepticPrivate::loadDefaultEraList()
+-{
+- QString name, shortName, format;
+-
+- KConfigGroup cg( config(), QString::fromLatin1( "KCalendarSystem %1" ).arg( q->calendarType() ) );
+- m_useCommonEra = cg.readEntry( "UseCommonEra", false );
+-
+- if ( m_useCommonEra ) {
+- name = i18nc( "Calendar Era: Gregorian Common Era, years < 0, LongFormat", "Before Common Era" );
+- shortName = i18nc( "Calendar Era: Gregorian Common Era, years < 0, ShortFormat", "BCE" );
+- } else {
+- name = i18nc( "Calendar Era: Gregorian Christian Era, years < 0, LongFormat", "Before Christ" );
+- shortName = i18nc( "Calendar Era: Gregorian Christian Era, years < 0, ShortFormat", "BC" );
+- }
+- format = i18nc( "(kdedt-format) Gregorian, BC, full era year format used for %EY, e.g. 2000 BC", "%Ey %EC" );
+- addEra( '-', 1, q->epoch().addDays( -1 ), -1, q->earliestValidDate(), name, shortName, format );
+-
+- if ( m_useCommonEra ) {
+- name = i18nc( "Calendar Era: Gregorian Common Era, years > 0, LongFormat", "Common Era" );
+- shortName = i18nc( "Calendar Era: Gregorian Common Era, years > 0, ShortFormat", "CE" );
+- } else {
+- name = i18nc( "Calendar Era: Gregorian Christian Era, years > 0, LongFormat", "Anno Domini" );
+- shortName = i18nc( "Calendar Era: Gregorian Christian Era, years > 0, ShortFormat", "AD" );
+- }
+- format = i18nc( "(kdedt-format) Gregorian, AD, full era year format used for %EY, e.g. 2000 AD", "%Ey %EC" );
+- addEra( '+', 1, q->epoch(), 1, q->latestValidDate(), name, shortName, format );
+-}
+-
+-int KCalendarSystemGregorianProlepticPrivate::monthsInYear( int year ) const
+-{
+- Q_UNUSED( year )
+- return 12;
+-}
+-
+-int KCalendarSystemGregorianProlepticPrivate::daysInMonth( int year, int month ) const
+-{
+- if ( month == 2 ) {
+- if ( isLeapYear( year ) ) {
+- return 29;
+- } else {
+- return 28;
+- }
+- }
+-
+- if ( month == 4 || month == 6 || month == 9 || month == 11 ) {
+- return 30;
+- }
+-
+- return 31;
+-}
+-
+-int KCalendarSystemGregorianProlepticPrivate::daysInYear( int year ) const
+-{
+- if ( isLeapYear( year ) ) {
+- return 366;
+- } else {
+- return 365;
+- }
+-}
+-
+-int KCalendarSystemGregorianProlepticPrivate::daysInWeek() const
+-{
+- return 7;
+-}
+-
+-bool KCalendarSystemGregorianProlepticPrivate::isLeapYear( int year ) const
+-{
+- if ( !hasYearZero() && year < 1 ) {
+- year = year + 1;
+- }
+-
+- if ( year % 4 == 0 ) {
+- if ( year % 100 != 0 ) {
+- return true;
+- } else if ( year % 400 == 0 ) {
+- return true;
+- }
+- }
+-
+- return false;
+-}
+-
+-bool KCalendarSystemGregorianProlepticPrivate::hasLeapMonths() const
+-{
+- return false;
+-}
+-
+-bool KCalendarSystemGregorianProlepticPrivate::hasYearZero() const
+-{
+- return false;
+-}
+-
+-int KCalendarSystemGregorianProlepticPrivate::maxDaysInWeek() const
+-{
+- return 7;
+-}
+-
+-int KCalendarSystemGregorianProlepticPrivate::maxMonthsInYear() const
+-{
+- return 12;
+-}
+-
+-int KCalendarSystemGregorianProlepticPrivate::earliestValidYear() const
+-{
+- return -4713;
+-}
+-
+-int KCalendarSystemGregorianProlepticPrivate::latestValidYear() const
+-{
+- return 9999;
+-}
+-
+-QString KCalendarSystemGregorianProlepticPrivate::monthName( int month, int year, KLocale::DateTimeComponentFormat format, bool possessive ) const
+-{
+- Q_UNUSED( year );
+-
+- if ( format == KLocale::NarrowName ) {
+- switch ( month ) {
+- case 1:
+- return ki18nc( "Gregorian month 1 - KLocale::NarrowName", "J" ).toString( locale() );
+- case 2:
+- return ki18nc( "Gregorian month 2 - KLocale::NarrowName", "F" ).toString( locale() );
+- case 3:
+- return ki18nc( "Gregorian month 3 - KLocale::NarrowName", "M" ).toString( locale() );
+- case 4:
+- return ki18nc( "Gregorian month 4 - KLocale::NarrowName", "A" ).toString( locale() );
+- case 5:
+- return ki18nc( "Gregorian month 5 - KLocale::NarrowName", "M" ).toString( locale() );
+- case 6:
+- return ki18nc( "Gregorian month 6 - KLocale::NarrowName", "J" ).toString( locale() );
+- case 7:
+- return ki18nc( "Gregorian month 7 - KLocale::NarrowName", "J" ).toString( locale() );
+- case 8:
+- return ki18nc( "Gregorian month 8 - KLocale::NarrowName", "A" ).toString( locale() );
+- case 9:
+- return ki18nc( "Gregorian month 9 - KLocale::NarrowName", "S" ).toString( locale() );
+- case 10:
+- return ki18nc( "Gregorian month 10 - KLocale::NarrowName", "O" ).toString( locale() );
+- case 11:
+- return ki18nc( "Gregorian month 11 - KLocale::NarrowName", "N" ).toString( locale() );
+- case 12:
+- return ki18nc( "Gregorian month 12 - KLocale::NarrowName", "D" ).toString( locale() );
+- default:
+- return QString();
+- }
+- }
+-
+- if ( format == KLocale::ShortName && possessive ) {
+- switch ( month ) {
+- case 1:
+- return ki18nc( "Gregorian month 1 - KLocale::ShortName Possessive", "of Jan" ).toString( locale() );
+- case 2:
+- return ki18nc( "Gregorian month 2 - KLocale::ShortName Possessive", "of Feb" ).toString( locale() );
+- case 3:
+- return ki18nc( "Gregorian month 3 - KLocale::ShortName Possessive", "of Mar" ).toString( locale() );
+- case 4:
+- return ki18nc( "Gregorian month 4 - KLocale::ShortName Possessive", "of Apr" ).toString( locale() );
+- case 5:
+- return ki18nc( "Gregorian month 5 - KLocale::ShortName Possessive", "of May" ).toString( locale() );
+- case 6:
+- return ki18nc( "Gregorian month 6 - KLocale::ShortName Possessive", "of Jun" ).toString( locale() );
+- case 7:
+- return ki18nc( "Gregorian month 7 - KLocale::ShortName Possessive", "of Jul" ).toString( locale() );
+- case 8:
+- return ki18nc( "Gregorian month 8 - KLocale::ShortName Possessive", "of Aug" ).toString( locale() );
+- case 9:
+- return ki18nc( "Gregorian month 9 - KLocale::ShortName Possessive", "of Sep" ).toString( locale() );
+- case 10:
+- return ki18nc( "Gregorian month 10 - KLocale::ShortName Possessive", "of Oct" ).toString( locale() );
+- case 11:
+- return ki18nc( "Gregorian month 11 - KLocale::ShortName Possessive", "of Nov" ).toString( locale() );
+- case 12:
+- return ki18nc( "Gregorian month 12 - KLocale::ShortName Possessive", "of Dec" ).toString( locale() );
+- default:
+- return QString();
+- }
+- }
+-
+- if ( format == KLocale::ShortName && !possessive ) {
+- switch ( month ) {
+- case 1:
+- return ki18nc( "Gregorian month 1 - KLocale::ShortName", "Jan" ).toString( locale() );
+- case 2:
+- return ki18nc( "Gregorian month 2 - KLocale::ShortName", "Feb" ).toString( locale() );
+- case 3:
+- return ki18nc( "Gregorian month 3 - KLocale::ShortName", "Mar" ).toString( locale() );
+- case 4:
+- return ki18nc( "Gregorian month 4 - KLocale::ShortName", "Apr" ).toString( locale() );
+- case 5:
+- return ki18nc( "Gregorian month 5 - KLocale::ShortName", "May" ).toString( locale() );
+- case 6:
+- return ki18nc( "Gregorian month 6 - KLocale::ShortName", "Jun" ).toString( locale() );
+- case 7:
+- return ki18nc( "Gregorian month 7 - KLocale::ShortName", "Jul" ).toString( locale() );
+- case 8:
+- return ki18nc( "Gregorian month 8 - KLocale::ShortName", "Aug" ).toString( locale() );
+- case 9:
+- return ki18nc( "Gregorian month 9 - KLocale::ShortName", "Sep" ).toString( locale() );
+- case 10:
+- return ki18nc( "Gregorian month 10 - KLocale::ShortName", "Oct" ).toString( locale() );
+- case 11:
+- return ki18nc( "Gregorian month 11 - KLocale::ShortName", "Nov" ).toString( locale() );
+- case 12:
+- return ki18nc( "Gregorian month 12 - KLocale::ShortName", "Dec" ).toString( locale() );
+- default:
+- return QString();
+- }
+- }
+-
+- if ( format == KLocale::LongName && possessive ) {
+- switch ( month ) {
+- case 1:
+- return ki18nc( "Gregorian month 1 - KLocale::LongName Possessive", "of January" ).toString( locale() );
+- case 2:
+- return ki18nc( "Gregorian month 2 - KLocale::LongName Possessive", "of February" ).toString( locale() );
+- case 3:
+- return ki18nc( "Gregorian month 3 - KLocale::LongName Possessive", "of March" ).toString( locale() );
+- case 4:
+- return ki18nc( "Gregorian month 4 - KLocale::LongName Possessive", "of April" ).toString( locale() );
+- case 5:
+- return ki18nc( "Gregorian month 5 - KLocale::LongName Possessive", "of May" ).toString( locale() );
+- case 6:
+- return ki18nc( "Gregorian month 6 - KLocale::LongName Possessive", "of June" ).toString( locale() );
+- case 7:
+- return ki18nc( "Gregorian month 7 - KLocale::LongName Possessive", "of July" ).toString( locale() );
+- case 8:
+- return ki18nc( "Gregorian month 8 - KLocale::LongName Possessive", "of August" ).toString( locale() );
+- case 9:
+- return ki18nc( "Gregorian month 9 - KLocale::LongName Possessive", "of September" ).toString( locale() );
+- case 10:
+- return ki18nc( "Gregorian month 10 - KLocale::LongName Possessive", "of October" ).toString( locale() );
+- case 11:
+- return ki18nc( "Gregorian month 11 - KLocale::LongName Possessive", "of November" ).toString( locale() );
+- case 12:
+- return ki18nc( "Gregorian month 12 - KLocale::LongName Possessive", "of December" ).toString( locale() );
+- default:
+- return QString();
+- }
+- }
+-
+- // Default to LongName
+- switch ( month ) {
+- case 1:
+- return ki18nc( "Gregorian month 1 - KLocale::LongName", "January" ).toString( locale() );
+- case 2:
+- return ki18nc( "Gregorian month 2 - KLocale::LongName", "February" ).toString( locale() );
+- case 3:
+- return ki18nc( "Gregorian month 3 - KLocale::LongName", "March" ).toString( locale() );
+- case 4:
+- return ki18nc( "Gregorian month 4 - KLocale::LongName", "April" ).toString( locale() );
+- case 5:
+- return ki18nc( "Gregorian month 5 - KLocale::LongName", "May" ).toString( locale() );
+- case 6:
+- return ki18nc( "Gregorian month 6 - KLocale::LongName", "June" ).toString( locale() );
+- case 7:
+- return ki18nc( "Gregorian month 7 - KLocale::LongName", "July" ).toString( locale() );
+- case 8:
+- return ki18nc( "Gregorian month 8 - KLocale::LongName", "August" ).toString( locale() );
+- case 9:
+- return ki18nc( "Gregorian month 9 - KLocale::LongName", "September" ).toString( locale() );
+- case 10:
+- return ki18nc( "Gregorian month 10 - KLocale::LongName", "October" ).toString( locale() );
+- case 11:
+- return ki18nc( "Gregorian month 11 - KLocale::LongName", "November" ).toString( locale() );
+- case 12:
+- return ki18nc( "Gregorian month 12 - KLocale::LongName", "December" ).toString( locale() );
+- default:
+- return QString();
+- }
+-}
+-
+-QString KCalendarSystemGregorianProlepticPrivate::weekDayName( int weekDay, KLocale::DateTimeComponentFormat format ) const
+-{
+- if ( format == KLocale::NarrowName ) {
+- switch ( weekDay ) {
+- case 1:
+- return ki18nc( "Gregorian weekday 1 - KLocale::NarrowName ", "M" ).toString( locale() );
+- case 2:
+- return ki18nc( "Gregorian weekday 2 - KLocale::NarrowName ", "T" ).toString( locale() );
+- case 3:
+- return ki18nc( "Gregorian weekday 3 - KLocale::NarrowName ", "W" ).toString( locale() );
+- case 4:
+- return ki18nc( "Gregorian weekday 4 - KLocale::NarrowName ", "T" ).toString( locale() );
+- case 5:
+- return ki18nc( "Gregorian weekday 5 - KLocale::NarrowName ", "F" ).toString( locale() );
+- case 6:
+- return ki18nc( "Gregorian weekday 6 - KLocale::NarrowName ", "S" ).toString( locale() );
+- case 7:
+- return ki18nc( "Gregorian weekday 7 - KLocale::NarrowName ", "S" ).toString( locale() );
+- default:
+- return QString();
+- }
+- }
+-
+- if ( format == KLocale::ShortName || format == KLocale:: ShortNumber ) {
+- switch ( weekDay ) {
+- case 1:
+- return ki18nc( "Gregorian weekday 1 - KLocale::ShortName", "Mon" ).toString( locale() );
+- case 2:
+- return ki18nc( "Gregorian weekday 2 - KLocale::ShortName", "Tue" ).toString( locale() );
+- case 3:
+- return ki18nc( "Gregorian weekday 3 - KLocale::ShortName", "Wed" ).toString( locale() );
+- case 4:
+- return ki18nc( "Gregorian weekday 4 - KLocale::ShortName", "Thu" ).toString( locale() );
+- case 5:
+- return ki18nc( "Gregorian weekday 5 - KLocale::ShortName", "Fri" ).toString( locale() );
+- case 6:
+- return ki18nc( "Gregorian weekday 6 - KLocale::ShortName", "Sat" ).toString( locale() );
+- case 7:
+- return ki18nc( "Gregorian weekday 7 - KLocale::ShortName", "Sun" ).toString( locale() );
+- default: return QString();
+- }
+- }
+-
+- switch ( weekDay ) {
+- case 1:
+- return ki18nc( "Gregorian weekday 1 - KLocale::LongName", "Monday" ).toString( locale() );
+- case 2:
+- return ki18nc( "Gregorian weekday 2 - KLocale::LongName", "Tuesday" ).toString( locale() );
+- case 3:
+- return ki18nc( "Gregorian weekday 3 - KLocale::LongName", "Wednesday" ).toString( locale() );
+- case 4:
+- return ki18nc( "Gregorian weekday 4 - KLocale::LongName", "Thursday" ).toString( locale() );
+- case 5:
+- return ki18nc( "Gregorian weekday 5 - KLocale::LongName", "Friday" ).toString( locale() );
+- case 6:
+- return ki18nc( "Gregorian weekday 6 - KLocale::LongName", "Saturday" ).toString( locale() );
+- case 7:
+- return ki18nc( "Gregorian weekday 7 - KLocale::LongName", "Sunday" ).toString( locale() );
+- default:
+- return QString();
+- }
+-}
+-
+-
+-KCalendarSystemGregorianProleptic::KCalendarSystemGregorianProleptic( const KLocale *locale )
+- : KCalendarSystem( *new KCalendarSystemGregorianProlepticPrivate( this ), KSharedConfig::Ptr(), locale ),
+- dont_use( 0 )
+-{
+- d_ptr->loadConfig( calendarType() );
+-}
+-
+-KCalendarSystemGregorianProleptic::KCalendarSystemGregorianProleptic( const KSharedConfig::Ptr config,
+- const KLocale *locale )
+- : KCalendarSystem( *new KCalendarSystemGregorianProlepticPrivate( this ), config, locale ),
+- dont_use( 0 )
+-{
+- d_ptr->loadConfig( calendarType() );
+-}
+-
+-KCalendarSystemGregorianProleptic::KCalendarSystemGregorianProleptic( KCalendarSystemGregorianProlepticPrivate &dd,
+- const KSharedConfig::Ptr config,
+- const KLocale *locale )
+- : KCalendarSystem( dd, config, locale ),
+- dont_use( 0 )
+-{
+- d_ptr->loadConfig( calendarType() );
+-}
+-
+-KCalendarSystemGregorianProleptic::~KCalendarSystemGregorianProleptic()
+-{
+- delete dont_use;
+-}
+-
+-QString KCalendarSystemGregorianProleptic::calendarType() const
+-{
+- return QLatin1String( "gregorian-proleptic" );
+-}
+-
+-QDate KCalendarSystemGregorianProleptic::epoch() const
+-{
+- return QDate::fromJulianDay( 1721426 );
+-}
+-
+-QDate KCalendarSystemGregorianProleptic::earliestValidDate() const
+-{
+- // Gregorian 1 Jan 4713 BC, no year zero
+- return QDate::fromJulianDay( 38 );
+-}
+-
+-QDate KCalendarSystemGregorianProleptic::latestValidDate() const
+-{
+- // Set to last day of year 9999 until confirm date formats & widgets support > 9999
+- // In Gregorian this is 9999-12-31, which is is jd 5373484
+- // Can't call setDate( 9999, 12, 31 ) as it creates circular reference!
+- return QDate::fromJulianDay( 5373484 );
+-}
+-
+-bool KCalendarSystemGregorianProleptic::isValid( int year, int month, int day ) const
+-{
+- return KCalendarSystem::isValid( year, month, day );
+-}
+-
+-bool KCalendarSystemGregorianProleptic::isValid( const QDate &date ) const
+-{
+- return KCalendarSystem::isValid( date );
+-}
+-
+-bool KCalendarSystemGregorianProleptic::setDate( QDate &date, int year, int month, int day ) const
+-{
+- return KCalendarSystem::setDate( date, year, month, day );
+-}
+-
+-// Deprecated
+-bool KCalendarSystemGregorianProleptic::setYMD( QDate &date, int year, int month, int day ) const
+-{
+- return KCalendarSystem::setYMD( date, year, month, day );
+-}
+-
+-int KCalendarSystemGregorianProleptic::year( const QDate &date ) const
+-{
+- return KCalendarSystem::year( date );
+-}
+-
+-int KCalendarSystemGregorianProleptic::month( const QDate &date ) const
+-{
+- return KCalendarSystem::month( date );
+-}
+-
+-int KCalendarSystemGregorianProleptic::day( const QDate &date ) const
+-{
+- return KCalendarSystem::day( date );
+-}
+-
+-QDate KCalendarSystemGregorianProleptic::addYears( const QDate &date, int nyears ) const
+-{
+- return KCalendarSystem::addYears( date, nyears );
+-}
+-
+-QDate KCalendarSystemGregorianProleptic::addMonths( const QDate &date, int nmonths ) const
+-{
+- return KCalendarSystem::addMonths( date, nmonths );
+-}
+-
+-QDate KCalendarSystemGregorianProleptic::addDays( const QDate &date, int ndays ) const
+-{
+- return KCalendarSystem::addDays( date, ndays );
+-}
+-
+-int KCalendarSystemGregorianProleptic::monthsInYear( const QDate &date ) const
+-{
+- return KCalendarSystem::monthsInYear( date );
+-}
+-
+-int KCalendarSystemGregorianProleptic::weeksInYear( const QDate &date ) const
+-{
+- return KCalendarSystem::weeksInYear( date );
+-}
+-
+-int KCalendarSystemGregorianProleptic::weeksInYear( int year ) const
+-{
+- return KCalendarSystem::weeksInYear( year );
+-}
+-
+-int KCalendarSystemGregorianProleptic::daysInYear( const QDate &date ) const
+-{
+- return KCalendarSystem::daysInYear( date );
+-}
+-
+-int KCalendarSystemGregorianProleptic::daysInMonth( const QDate &date ) const
+-{
+- return KCalendarSystem::daysInMonth( date );
+-}
+-
+-int KCalendarSystemGregorianProleptic::daysInWeek( const QDate &date ) const
+-{
+- return KCalendarSystem::daysInWeek( date );
+-}
+-
+-int KCalendarSystemGregorianProleptic::dayOfYear( const QDate &date ) const
+-{
+- return KCalendarSystem::dayOfYear( date );
+-}
+-
+-int KCalendarSystemGregorianProleptic::dayOfWeek( const QDate &date ) const
+-{
+- return KCalendarSystem::dayOfWeek( date );
+-}
+-
+-int KCalendarSystemGregorianProleptic::weekNumber( const QDate &date, int * yearNum ) const
+-{
+- return KCalendarSystem::weekNumber( date, yearNum );
+-}
+-
+-bool KCalendarSystemGregorianProleptic::isLeapYear( int year ) const
+-{
+- return KCalendarSystem::isLeapYear( year );
+-}
+-
+-bool KCalendarSystemGregorianProleptic::isLeapYear( const QDate &date ) const
+-{
+- return KCalendarSystem::isLeapYear( date );
+-}
+-
+-QString KCalendarSystemGregorianProleptic::monthName( int month, int year, MonthNameFormat format ) const
+-{
+- return KCalendarSystem::monthName( month, year, format );
+-}
+-
+-QString KCalendarSystemGregorianProleptic::monthName( const QDate &date, MonthNameFormat format ) const
+-{
+- return KCalendarSystem::monthName( date, format );
+-}
+-
+-QString KCalendarSystemGregorianProleptic::weekDayName( int weekDay, WeekDayNameFormat format ) const
+-{
+- return KCalendarSystem::weekDayName( weekDay, format );
+-}
+-
+-QString KCalendarSystemGregorianProleptic::weekDayName( const QDate &date, WeekDayNameFormat format ) const
+-{
+- return KCalendarSystem::weekDayName( date, format );
+-}
+-
+-QString KCalendarSystemGregorianProleptic::yearString( const QDate &pDate, StringFormat format ) const
+-{
+- return KCalendarSystem::yearString( pDate, format );
+-}
+-
+-QString KCalendarSystemGregorianProleptic::monthString( const QDate &pDate, StringFormat format ) const
+-{
+- return KCalendarSystem::monthString( pDate, format );
+-}
+-
+-QString KCalendarSystemGregorianProleptic::dayString( const QDate &pDate, StringFormat format ) const
+-{
+- return KCalendarSystem::dayString( pDate, format );
+-}
+-
+-int KCalendarSystemGregorianProleptic::yearStringToInteger( const QString &sNum, int &iLength ) const
+-{
+- return KCalendarSystem::yearStringToInteger( sNum, iLength );
+-}
+-
+-int KCalendarSystemGregorianProleptic::monthStringToInteger( const QString &sNum, int &iLength ) const
+-{
+- return KCalendarSystem::monthStringToInteger( sNum, iLength );
+-}
+-
+-int KCalendarSystemGregorianProleptic::dayStringToInteger( const QString &sNum, int &iLength ) const
+-{
+- return KCalendarSystem::dayStringToInteger( sNum, iLength );
+-}
+-
+-QString KCalendarSystemGregorianProleptic::formatDate( const QDate &date, KLocale::DateFormat format ) const
+-{
+- return KCalendarSystem::formatDate( date, format );
+-}
+-
+-QDate KCalendarSystemGregorianProleptic::readDate( const QString &str, bool *ok ) const
+-{
+- return KCalendarSystem::readDate( str, ok );
+-}
+-
+-QDate KCalendarSystemGregorianProleptic::readDate( const QString &intstr, const QString &fmt, bool *ok ) const
+-{
+- return KCalendarSystem::readDate( intstr, fmt, ok );
+-}
+-
+-QDate KCalendarSystemGregorianProleptic::readDate( const QString &str, KLocale::ReadDateFlags flags, bool *ok ) const
+-{
+- return KCalendarSystem::readDate( str, flags, ok );
+-}
+-
+-int KCalendarSystemGregorianProleptic::weekStartDay() const
+-{
+- return KCalendarSystem::weekStartDay();
+-}
+-
+-int KCalendarSystemGregorianProleptic::weekDayOfPray() const
+-{
+- return 7; // sunday
+-}
+-
+-bool KCalendarSystemGregorianProleptic::isLunar() const
+-{
+- return false;
+-}
+-
+-bool KCalendarSystemGregorianProleptic::isLunisolar() const
+-{
+- return false;
+-}
+-
+-bool KCalendarSystemGregorianProleptic::isSolar() const
+-{
+- return true;
+-}
+-
+-bool KCalendarSystemGregorianProleptic::isProleptic() const
+-{
+- return true;
+-}
+-
+-bool KCalendarSystemGregorianProleptic::julianDayToDate( int jd, int &year, int &month, int &day ) const
+-{
+- Q_D( const KCalendarSystemGregorianProleptic );
+-
+- // Formula from The Calendar FAQ by Claus Tondering
+- // http://www.tondering.dk/claus/cal/node3.html#SECTION003161000000000000000
+- // NOTE: Coded from scratch from mathematical formulas, not copied from
+- // the Boost licensed source code
+-
+- int a = jd + 32044;
+- int b = ( ( 4 * a ) + 3 ) / 146097;
+- int c = a - ( ( 146097 * b ) / 4 );
+- int dd = ( ( 4 * c ) + 3 ) / 1461;
+- int e = c - ( ( 1461 * dd ) / 4 );
+- int m = ( ( 5 * e ) + 2 ) / 153;
+- day = e - ( ( (153 * m ) + 2 ) / 5 ) + 1;
+- month = m + 3 - ( 12 * ( m / 10 ) );
+- year = ( 100 * b ) + dd - 4800 + ( m / 10 );
+-
+- // If year is -ve then is BC. In Gregorian there is no year 0, but the maths
+- // is easier if we pretend there is, so internally year of 0 = 1BC = -1 outside
+- // Check for Year 0 support as some Gregorian based calendars do have it, e.g. Thai and ISO
+- if ( !d->hasYearZero() && year < 1 ) {
+- year = year - 1;
+- }
+- return true;
+-}
+-
+-bool KCalendarSystemGregorianProleptic::dateToJulianDay( int year, int month, int day, int &jd ) const
+-{
+- Q_D( const KCalendarSystemGregorianProleptic );
+-
+- // Formula from The Calendar FAQ by Claus Tondering
+- // http://www.tondering.dk/claus/cal/node3.html#SECTION003161000000000000000
+- // NOTE: Coded from scratch from mathematical formulas, not copied from
+- // the Boost licensed source code
+-
+- // If year is -ve then is BC. In Gregorian there is no year 0, but the maths
+- // is easier if we pretend there is, so internally year of -1 = 1BC = 0 internally
+- // Check for Year 0 support as some Gregorian based calendars do have it, e.g. Thai and ISO
+- int y;
+- if ( !d->hasYearZero() && year < 1 ) {
+- y = year + 1;
+- } else {
+- y = year;
+- }
+-
+- int a = ( 14 - month ) / 12;
+- y = y + 4800 - a;
+- int m = month + ( 12 * a ) - 3;
+-
+- jd = day
+- + ( ( ( 153 * m ) + 2 ) / 5 )
+- + ( 365 * y )
+- + ( y / 4 )
+- - ( y / 100 )
+- + ( y / 400 )
+- - 32045;
+-
+- return true;
+-}
+diff --git a/kdecore/date/kcalendarsystemgregorianproleptic_p.h b/kdecore/date/kcalendarsystemgregorianproleptic_p.h
+deleted file mode 100644
+index bbb2f2f..0000000
+--- a/kdecore/date/kcalendarsystemgregorianproleptic_p.h
++++ /dev/null
+@@ -1,125 +0,0 @@
+-/*
+- Copyright 2009, 2010 John Layt <john@layt.net>
+-
+- This library is free software; you can redistribute it and/or
+- modify it under the terms of the GNU Library General Public
+- License as published by the Free Software Foundation; either
+- version 2 of the License, or (at your option) any later version.
+-
+- This library is distributed in the hope that it will be useful,
+- but WITHOUT ANY WARRANTY; without even the implied warranty of
+- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+- Library General Public License for more details.
+-
+- You should have received a copy of the GNU Library General Public License
+- along with this library; see the file COPYING.LIB. If not, write to
+- the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+- Boston, MA 02110-1301, USA.
+-*/
+-
+-#ifndef KCALENDARSYSTEMGREGORIANPROLEPTIC_H
+-#define KCALENDARSYSTEMGREGORIANPROLEPTIC_H
+-
+-#include "kcalendarsystem.h"
+-
+-class KCalendarSystemGregorianProlepticPrivate;
+-
+-/**
+- * @internal
+- * This is the pure Gregorian calendar implementation.
+- *
+- * Note: This is a proleptic version of the Gregorian calendar, it does not
+- * copy the QDate method of using the Julian Calendar for dates before 15
+- * October 1582. This is the traditional proleptic Gregorian calendar
+- * that does not have a year 0, unlike the ISO version which does.
+- *
+- * @b license GNU-LGPL v.2 or later
+- *
+- * @see KLocale,KCalendarSystem
+- *
+- * @author John Layt <john@layt.net>
+- */
+-class KCalendarSystemGregorianProleptic: public KCalendarSystem
+-{
+-public:
+- explicit KCalendarSystemGregorianProleptic( const KLocale *locale = 0 );
+- explicit KCalendarSystemGregorianProleptic( const KSharedConfig::Ptr config, const KLocale *locale = 0 );
+- virtual ~KCalendarSystemGregorianProleptic();
+-
+- virtual QString calendarType() const;
+-
+- virtual QDate epoch() const;
+- virtual QDate earliestValidDate() const;
+- virtual QDate latestValidDate() const;
+- virtual bool isValid( int year, int month, int day ) const;
+- virtual bool isValid( const QDate &date ) const;
+-
+- virtual bool setDate( QDate &date, int year, int month, int day ) const;
+- /** @deprecated */
+- virtual bool setYMD( QDate &date, int year, int month, int day ) const;
+-
+- virtual int year( const QDate &date ) const;
+- virtual int month( const QDate &date ) const;
+- virtual int day( const QDate &date ) const;
+-
+- virtual QDate addYears( const QDate &date, int nyears ) const;
+- virtual QDate addMonths( const QDate &date, int nmonths ) const;
+- virtual QDate addDays( const QDate &date, int ndays ) const;
+-
+- virtual int monthsInYear( const QDate &date ) const;
+- virtual int weeksInYear( const QDate &date ) const;
+- virtual int weeksInYear( int year ) const;
+- virtual int daysInYear( const QDate &date ) const;
+- virtual int daysInMonth( const QDate &date ) const;
+- virtual int daysInWeek( const QDate &date ) const;
+-
+- virtual int dayOfYear( const QDate &date ) const;
+- virtual int dayOfWeek( const QDate &date ) const;
+-
+- virtual int weekNumber( const QDate &date, int *yearNum = 0 ) const;
+-
+- virtual bool isLeapYear( int year ) const;
+- virtual bool isLeapYear( const QDate &date ) const;
+-
+- virtual QString monthName( int month, int year, MonthNameFormat format = LongName ) const;
+- virtual QString monthName( const QDate &date, MonthNameFormat format = LongName ) const;
+-
+- virtual QString weekDayName( int weekDay, WeekDayNameFormat format = LongDayName ) const;
+- virtual QString weekDayName( const QDate &date, WeekDayNameFormat format = LongDayName ) const;
+-
+- virtual QString yearString( const QDate & pDate, StringFormat format = LongFormat ) const;
+- virtual QString monthString( const QDate &pDate, StringFormat format = LongFormat ) const;
+- virtual QString dayString( const QDate &pDate, StringFormat format = LongFormat ) const;
+-
+- virtual int yearStringToInteger( const QString &sNum, int &iLength ) const;
+- virtual int monthStringToInteger( const QString &sNum, int &iLength ) const;
+- virtual int dayStringToInteger( const QString &sNum, int &iLength ) const;
+-
+- virtual QString formatDate( const QDate &fromDate, KLocale::DateFormat toFormat = KLocale::LongDate ) const;
+-
+- virtual QDate readDate( const QString &str, bool *ok = 0 ) const;
+- virtual QDate readDate( const QString &dateString, const QString &dateFormat, bool *ok = 0 ) const;
+- virtual QDate readDate( const QString &str, KLocale::ReadDateFlags flags, bool *ok = 0 ) const;
+-
+- virtual int weekStartDay() const;
+- virtual int weekDayOfPray () const;
+-
+- virtual bool isLunar() const;
+- virtual bool isLunisolar() const;
+- virtual bool isSolar() const;
+- virtual bool isProleptic() const;
+-
+-protected:
+- virtual bool julianDayToDate( int jd, int &year, int &month, int &day ) const;
+- virtual bool dateToJulianDay( int year, int month, int day, int &jd ) const;
+- KCalendarSystemGregorianProleptic( KCalendarSystemGregorianProlepticPrivate &dd,
+- const KSharedConfig::Ptr config = KSharedConfig::Ptr(),
+- const KLocale *locale = 0 );
+-
+-private:
+- friend class KCalendarSystemIndianNational; // To allow access to julianDayToDate() and dateToJulianDay()
+- Q_DECLARE_PRIVATE( KCalendarSystemGregorianProleptic )
+- KCalendarSystemGregorianProlepticPrivate * const dont_use; // KDE5 remove, use shared d
+-};
+-
+-#endif // KCALENDARSYSTEMGREGORIANPROLEPTIC_H
+diff --git a/kdecore/date/kcalendarsystemgregorianprolepticprivate_p.h b/kdecore/date/kcalendarsystemgregorianprolepticprivate_p.h
+deleted file mode 100644
+index e463b92..0000000
+--- a/kdecore/date/kcalendarsystemgregorianprolepticprivate_p.h
++++ /dev/null
+@@ -1,54 +0,0 @@
+-/*
+- Copyright 2009, 2010 John Layt <john@layt.net>
+-
+- This library is free software; you can redistribute it and/or
+- modify it under the terms of the GNU Library General Public
+- License as published by the Free Software Foundation; either
+- version 2 of the License, or (at your option) any later version.
+-
+- This library is distributed in the hope that it will be useful,
+- but WITHOUT ANY WARRANTY; without even the implied warranty of
+- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+- Library General Public License for more details.
+-
+- You should have received a copy of the GNU Library General Public License
+- along with this library; see the file COPYING.LIB. If not, write to
+- the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+- Boston, MA 02110-1301, USA.
+-*/
+-
+-#ifndef KCALENDARSYSTEMGREGORIANPROLEPTICPRIVATE_H
+-#define KCALENDARSYSTEMGREGORIANPROLEPTICPRIVATE_H
+-
+-// Derived gregorian kde calendar class
+-
+-#include "kcalendarsystemprivate_p.h"
+-
+-class KCalendarSystemGregorianProlepticPrivate : public KCalendarSystemPrivate
+-{
+-public:
+- explicit KCalendarSystemGregorianProlepticPrivate( KCalendarSystemGregorianProleptic *q );
+-
+- virtual ~KCalendarSystemGregorianProlepticPrivate();
+-
+- // Virtual methods each calendar system must re-implement
+- virtual KLocale::CalendarSystem calendarSystem() const;
+- virtual void loadDefaultEraList();
+- virtual int monthsInYear( int year ) const;
+- virtual int daysInMonth( int year, int month ) const;
+- virtual int daysInYear( int year ) const;
+- virtual int daysInWeek() const;
+- virtual bool isLeapYear( int year ) const;
+- virtual bool hasLeapMonths() const;
+- virtual bool hasYearZero() const;
+- virtual int maxDaysInWeek() const;
+- virtual int maxMonthsInYear() const;
+- virtual int earliestValidYear() const;
+- virtual int latestValidYear() const;
+- virtual QString monthName( int month, int year, KLocale::DateTimeComponentFormat format, bool possessive ) const;
+- virtual QString weekDayName( int weekDay, KLocale::DateTimeComponentFormat format ) const;
+-
+- bool m_useCommonEra;
+-};
+-
+-#endif // KCALENDARSYSTEMGREGORIANPROLEPTICPRIVATE_H
+diff --git a/kdecore/date/kcalendarsystemhebrew.cpp b/kdecore/date/kcalendarsystemhebrew.cpp
+index b55c6ec..8620055 100644
+--- a/kdecore/date/kcalendarsystemhebrew.cpp
++++ b/kdecore/date/kcalendarsystemhebrew.cpp
+@@ -31,7 +31,7 @@
+ #include <QtCore/QDate>
+ #include <QtCore/QCharRef>
+
+-static int hebrewDaysElapsed( int y );
++static int hebrewDaysElapsed(int y);
+
+ class h_date
+ {
+@@ -46,26 +46,26 @@ public:
+ /*
+ * compute general date structure from hebrew date
+ */
+-static class h_date * hebrewToGregorian( int y, int m, int d )
++static class h_date * hebrewToGregorian(int y, int m, int d)
+ {
+ static class h_date h;
+ int s;
+
+ y -= 3744;
+- s = hebrewDaysElapsed( y );
++ s = hebrewDaysElapsed(y);
+ d += s;
+- s = hebrewDaysElapsed( y + 1 ) - s; /* length of year */
++ s = hebrewDaysElapsed(y + 1) - s; /* length of year */
+
+- if ( s > 365 && m > 6 ) {
++ if (s > 365 && m > 6) {
+ --m;
+ d += 30;
+ }
+- d += ( 59 * ( m - 1 ) + 1 ) / 2; /* regular months */
++ d += (59 * (m - 1) + 1) / 2; /* regular months */
+ /* special cases */
+- if ( s % 10 > 4 && m > 2 ) { /* long Heshvan */
++ if (s % 10 > 4 && m > 2) { /* long Heshvan */
+ d++;
+ }
+- if ( s % 10 < 4 && m > 3 ) { /* short Kislev */
++ if (s % 10 < 4 && m > 3) { /* short Kislev */
+ d--;
+ }
+ // ### HPB: Broken in leap years
+@@ -73,53 +73,53 @@ static class h_date * hebrewToGregorian( int y, int m, int d )
+ // d += 30;
+ d -= 6002;
+
+- y = ( d + 36525 ) * 4 / 146097 - 1;
+- d -= y / 4 * 146097 + ( y % 4 ) * 36524;
++ y = (d + 36525) * 4 / 146097 - 1;
++ d -= y / 4 * 146097 + (y % 4) * 36524;
+ y *= 100;
+
+ /* compute year */
+- s = ( d + 366 )*4 / 1461 - 1;
+- d -= s / 4*1461 + ( s % 4 )*365;
++ s = (d + 366) * 4 / 1461 - 1;
++ d -= s / 4 * 1461 + (s % 4) * 365;
+ y += s;
+ /* compute month */
+- m = ( d + 245 )*12 / 367 - 7;
+- d -= m*367 / 12 - 30;
+- if ( ++m >= 12 ) {
++ m = (d + 245) * 12 / 367 - 7;
++ d -= m * 367 / 12 - 30;
++ if (++m >= 12) {
+ m -= 12;
+ y++;
+ }
+ h.hd_day = d;
+ h.hd_mon = m;
+ h.hd_year = y;
+- return( &h );
++ return(&h);
+ }
+
+ /*
+ * compute date structure from no. of days since 1 Tishrei 3744
+ */
+-static class h_date * gregorianToHebrew( int y, int m, int d )
++static class h_date * gregorianToHebrew(int y, int m, int d)
+ {
+ static class h_date h;
+ int s;
+
+- if ( ( m -= 2 ) <= 0 ) {
++ if ((m -= 2) <= 0) {
+ m += 12;
+ y--;
+ }
+ /* no. of days, Julian calendar */
+- d += 365*y + y / 4 + 367*m / 12 + 5968;
++ d += 365 * y + y / 4 + 367 * m / 12 + 5968;
+ /* Gregorian calendar */
+ d -= y / 100 - y / 400 - 2;
+- h.hd_dw = ( d + 1 ) % 7;
++ h.hd_dw = (d + 1) % 7;
+
+ /* compute the year */
+ y += 16;
+- s = hebrewDaysElapsed( y );
+- m = hebrewDaysElapsed( y + 1 );
+- while( d >= m ) { /* computed year was underestimated */
++ s = hebrewDaysElapsed(y);
++ m = hebrewDaysElapsed(y + 1);
++ while (d >= m) { /* computed year was underestimated */
+ s = m;
+ y++;
+- m = hebrewDaysElapsed( y + 1 );
++ m = hebrewDaysElapsed(y + 1);
+ }
+ d -= s;
+ s = m - s; /* size of current year */
+@@ -128,31 +128,31 @@ static class h_date * gregorianToHebrew( int y, int m, int d )
+ h.hd_flg = s % 10 - 4;
+
+ /* compute day and month */
+- if ( d >= s - 236 ) { /* last 8 months are regular */
++ if (d >= s - 236) { /* last 8 months are regular */
+ d -= s - 236;
+ m = d * 2 / 59;
+- d -= ( m * 59 + 1 ) / 2;
++ d -= (m * 59 + 1) / 2;
+ m += 4;
+- if ( s > 365 && m <= 5 ) { /* Adar of Meuberet */
++ if (s > 365 && m <= 5) { /* Adar of Meuberet */
+ m += 8;
+ }
+ } else {
+ /* first 4 months have 117-119 days */
+ s = 114 + s % 10;
+ m = d * 4 / s;
+- d -= ( m * s + 3 ) / 4;
++ d -= (m * s + 3) / 4;
+ }
+
+ h.hd_day = d;
+ h.hd_mon = m;
+ h.hd_year = y;
+- return( &h );
++ return(&h);
+ }
+
+ /* constants, in 1/18th of minute */
+ static const int HOUR = 1080;
+-static const int DAY = 24*HOUR;
+-static const int WEEK = 7*DAY;
++static const int DAY = 24 * HOUR;
++static const int WEEK = 7 * DAY;
+ #define M(h,p) ((h)*HOUR+p)
+ #define MONTH (DAY+M(12,793))
+
+@@ -160,14 +160,14 @@ static const int WEEK = 7*DAY;
+ * @internal
+ * no. of days in y years
+ */
+-static int hebrewDaysElapsed( int y )
++static int hebrewDaysElapsed(int y)
+ {
+ int m, nm, dw, s, l;
+
+ l = y * 7 + 1; // no. of leap months
+ m = y * 12 + l / 19; // total no. of months
+ l %= 19;
+- nm = m * MONTH + M( 1 + 6, 779 ); // molad new year 3744 (16BC) + 6 hours
++ nm = m * MONTH + M(1 + 6, 779); // molad new year 3744 (16BC) + 6 hours
+ s = m * 28 + nm / DAY - 2;
+
+ nm %= WEEK;
+@@ -175,13 +175,13 @@ static int hebrewDaysElapsed( int y )
+ nm %= DAY;
+
+ // special cases of Molad Zaken
+- if ( (l < 12 && dw == 3 && nm >= M( 9 + 6, 204 )) ||
+- (l < 7 && dw == 2 && nm >= M( 15 + 6, 589 )) ) {
++ if ((l < 12 && dw == 3 && nm >= M(9 + 6, 204)) ||
++ (l < 7 && dw == 2 && nm >= M(15 + 6, 589))) {
+ s++, dw++;
+ }
+
+ /* ADU */
+- if ( dw == 1 || dw == 4 || dw == 6 ) {
++ if (dw == 1 || dw == 4 || dw == 6) {
+ s++;
+ }
+ return s;
+@@ -191,44 +191,44 @@ static int hebrewDaysElapsed( int y )
+ * @internal
+ * true if long Cheshvan
+ */
+-static int long_cheshvan( int year )
++static int long_cheshvan(int year)
+ {
+ QDate first, last;
+ class h_date *gd;
+
+- gd = hebrewToGregorian( year, 1, 1 );
+- first.setYMD( gd->hd_year, gd->hd_mon + 1, gd->hd_day + 1 );
++ gd = hebrewToGregorian(year, 1, 1);
++ first.setYMD(gd->hd_year, gd->hd_mon + 1, gd->hd_day + 1);
+
+- gd = hebrewToGregorian( year + 1, 1, 1 );
+- last.setYMD( gd->hd_year, gd->hd_mon + 1, gd->hd_day + 1 );
++ gd = hebrewToGregorian(year + 1, 1, 1);
++ last.setYMD(gd->hd_year, gd->hd_mon + 1, gd->hd_day + 1);
+
+- return ( first.daysTo( last ) % 10 == 5 );
++ return (first.daysTo(last) % 10 == 5);
+ }
+
+ /**
+ * @internal
+ * true if short Kislev
+ */
+-static int short_kislev( int year )
++static int short_kislev(int year)
+ {
+ QDate first, last;
+ class h_date * gd;
+
+- gd = hebrewToGregorian( year, 1, 1 );
+- first.setYMD( gd->hd_year, gd->hd_mon + 1, gd->hd_day + 1 );
++ gd = hebrewToGregorian(year, 1, 1);
++ first.setYMD(gd->hd_year, gd->hd_mon + 1, gd->hd_day + 1);
+
+- gd = hebrewToGregorian( year + 1, 1, 1 );
+- last.setYMD( gd->hd_year, gd->hd_mon + 1, gd->hd_day + 1 );
++ gd = hebrewToGregorian(year + 1, 1, 1);
++ last.setYMD(gd->hd_year, gd->hd_mon + 1, gd->hd_day + 1);
+
+- return ( first.daysTo( last ) % 10 == 3 );
++ return (first.daysTo(last) % 10 == 3);
+ }
+
+ // Ok
+-static class h_date *toHebrew( const QDate &date )
++static class h_date *toHebrew(const QDate &date)
+ {
+ class h_date *sd;
+
+- sd = gregorianToHebrew( date.year(), date.month(), date.day() );
++ sd = gregorianToHebrew(date.year(), date.month(), date.day());
+ ++sd->hd_mon;
+ ++sd->hd_day;
+
+@@ -238,38 +238,38 @@ static class h_date *toHebrew( const QDate &date )
+ class KCalendarSystemHebrewPrivate : public KCalendarSystemPrivate
+ {
+ public:
+- explicit KCalendarSystemHebrewPrivate( KCalendarSystemHebrew *q );
++ explicit KCalendarSystemHebrewPrivate(KCalendarSystemHebrew *q);
+
+ virtual ~KCalendarSystemHebrewPrivate();
+
+ // Virtual methods each calendar system must re-implement
+ virtual KLocale::CalendarSystem calendarSystem() const;
+ virtual void loadDefaultEraList();
+- virtual int monthsInYear( int year ) const;
+- virtual int daysInMonth( int year, int month ) const;
+- virtual int daysInYear( int year ) const;
++ virtual int monthsInYear(int year) const;
++ virtual int daysInMonth(int year, int month) const;
++ virtual int daysInYear(int year) const;
+ virtual int daysInWeek() const;
+- virtual bool isLeapYear( int year ) const;
++ virtual bool isLeapYear(int year) const;
+ virtual bool hasLeapMonths() const;
+ virtual bool hasYearZero() const;
+ virtual int maxDaysInWeek() const;
+ virtual int maxMonthsInYear() const;
+ virtual int earliestValidYear() const;
+ virtual int latestValidYear() const;
+- virtual QString monthName( int month, int year, KLocale::DateTimeComponentFormat format, bool possessive ) const;
+- virtual QString weekDayName( int weekDay, KLocale::DateTimeComponentFormat format ) const;
++ virtual QString monthName(int month, int year, KLocale::DateTimeComponentFormat format, bool possessive) const;
++ virtual QString weekDayName(int weekDay, KLocale::DateTimeComponentFormat format) const;
+
+- virtual int integerFromString( const QString &string, int maxLength, int &readLength ) const;
+- virtual QString stringFromInteger( int number, int padWidth = 0, QChar padChar = QLatin1Char('0') ) const;
+- virtual QString stringFromInteger( int number, int padWidth, QChar padChar, KLocale::DigitSet digitSet ) const;
++ virtual int integerFromString(const QString &string, int maxLength, int &readLength) const;
++ virtual QString stringFromInteger(int number, int padWidth = 0, QChar padChar = QLatin1Char('0')) const;
++ virtual QString stringFromInteger(int number, int padWidth, QChar padChar, KLocale::DigitSet digitSet) const;
+
+- virtual int monthNumberToMonthIndex( int year, int month ) const;
++ virtual int monthNumberToMonthIndex(int year, int month) const;
+ };
+
+ // Shared d pointer base class definitions
+
+-KCalendarSystemHebrewPrivate::KCalendarSystemHebrewPrivate( KCalendarSystemHebrew *q )
+- :KCalendarSystemPrivate( q )
++KCalendarSystemHebrewPrivate::KCalendarSystemHebrewPrivate(KCalendarSystemHebrew *q)
++ : KCalendarSystemPrivate(q)
+ {
+ }
+
+@@ -286,55 +286,55 @@ void KCalendarSystemHebrewPrivate::loadDefaultEraList()
+ {
+ QString name, shortName, format;
+ // Jewish Era, Anno Mundi, "Year of the World".
+- name = i18nc( "Calendar Era: Hebrew Era, years > 0, LongFormat", "Anno Mundi" );
+- shortName = i18nc( "Calendar Era: Hebrew Era, years > 0, ShortFormat", "AM" );
+- format = i18nc( "(kdedt-format) Hebrew, AM, full era year format used for %EY, e.g. 2000 AM", "%Ey %EC" );
+- addEra( '+', 1, q->epoch(), 1, q->latestValidDate(), name, shortName, format );
++ name = i18nc("Calendar Era: Hebrew Era, years > 0, LongFormat", "Anno Mundi");
++ shortName = i18nc("Calendar Era: Hebrew Era, years > 0, ShortFormat", "AM");
++ format = i18nc("(kdedt-format) Hebrew, AM, full era year format used for %EY, e.g. 2000 AM", "%Ey %EC");
++ addEra('+', 1, q->epoch(), 1, q->latestValidDate(), name, shortName, format);
+ }
+
+-int KCalendarSystemHebrewPrivate::monthsInYear( int year ) const
++int KCalendarSystemHebrewPrivate::monthsInYear(int year) const
+ {
+- if ( isLeapYear( year ) ) {
++ if (isLeapYear(year)) {
+ return 13;
+ } else {
+ return 12;
+ }
+ }
+
+-int KCalendarSystemHebrewPrivate::daysInMonth( int year, int month ) const
++int KCalendarSystemHebrewPrivate::daysInMonth(int year, int month) const
+ {
+- int mi = monthNumberToMonthIndex( year, month );
++ int mi = monthNumberToMonthIndex(year, month);
+
+- if ( mi == 2 && long_cheshvan( year ) ) {
++ if (mi == 2 && long_cheshvan(year)) {
+ return 30;
+ }
+
+- if ( mi == 3 && short_kislev( year ) ) {
++ if (mi == 3 && short_kislev(year)) {
+ return 29;
+ }
+
+- if ( mi % 2 == 0 ) { // Even number months have 29 days
++ if (mi % 2 == 0) { // Even number months have 29 days
+ return 29;
+ } else { // Odd number months have 30 days
+ return 30;
+ }
+ }
+
+-int KCalendarSystemHebrewPrivate::daysInYear( int year ) const
++int KCalendarSystemHebrewPrivate::daysInYear(int year) const
+ {
+ int days;
+
+ // Get Regular year length
+- if ( isLeapYear( year ) ) { // Has 13 months
++ if (isLeapYear(year)) { // Has 13 months
+ days = 384;
+ } else { // Has 12 months
+ days = 354;
+ }
+
+ // Check if is Deficient or Abundant year
+- if ( short_kislev( year ) ) { // Deficient
++ if (short_kislev(year)) { // Deficient
+ days = days - 1;
+- } else if ( long_cheshvan( year ) ) { // Abundant
++ } else if (long_cheshvan(year)) { // Abundant
+ days = days + 1;
+ }
+
+@@ -346,9 +346,9 @@ int KCalendarSystemHebrewPrivate::daysInWeek() const
+ return 7;
+ }
+
+-bool KCalendarSystemHebrewPrivate::isLeapYear( int year ) const
++bool KCalendarSystemHebrewPrivate::isLeapYear(int year) const
+ {
+- return ( ( ( ( 7 * year ) + 1 ) % 19 ) < 7 );
++ return ((((7 * year) + 1) % 19) < 7);
+ }
+
+ bool KCalendarSystemHebrewPrivate::hasLeapMonths() const
+@@ -381,9 +381,9 @@ int KCalendarSystemHebrewPrivate::latestValidYear() const
+ return 8119;
+ }
+
+-int KCalendarSystemHebrewPrivate::integerFromString( const QString &inputString, int maxLength, int &readLength ) const
++int KCalendarSystemHebrewPrivate::integerFromString(const QString &inputString, int maxLength, int &readLength) const
+ {
+- if ( locale()->language() == QLatin1String("he") ) {
++ if (locale()->language() == QLatin1String("he")) {
+
+ // Hebrew numbers are composed of combinations of normal letters which have a numeric value.
+ // This is a non-positional system, the numeric values are simply added together, however
+@@ -420,18 +420,18 @@ int KCalendarSystemHebrewPrivate::integerFromString( const QString &inputString,
+ int result = 0;
+ int value = 0;
+
+- for ( ; position < stringLength ; ++position ) {
++ for (; position < stringLength ; ++position) {
+
+ thisChar = string[position];
+
+- if ( position + 1 < stringLength ) {
++ if (position + 1 < stringLength) {
+ nextChar = string[position + 1];
+ // Ignore any geresh or gershayim chars, we don't bother checking they are in the right place
+- if ( nextChar == QLatin1Char('\'') || nextChar == QChar( 0x05F3 ) || // geresh
+- nextChar == QLatin1Char('\"') || nextChar == QChar( 0x05F4 ) ) { // gershayim
+- string.remove( position + 1, 1 );
++ if (nextChar == QLatin1Char('\'') || nextChar == QChar(0x05F3) || // geresh
++ nextChar == QLatin1Char('\"') || nextChar == QChar(0x05F4)) { // gershayim
++ string.remove(position + 1, 1);
+ stringLength = string.length();
+- if ( position + 1 < stringLength ) {
++ if (position + 1 < stringLength) {
+ nextChar = string[position + 1];
+ } else {
+ nextChar = QChar();
+@@ -442,7 +442,7 @@ int KCalendarSystemHebrewPrivate::integerFromString( const QString &inputString,
+ nextChar = QChar();
+ }
+
+- if ( thisChar >= QChar( 0x05D0 ) && thisChar <= QChar( 0x05D7 ) ) {
++ if (thisChar >= QChar(0x05D0) && thisChar <= QChar(0x05D7)) {
+
+ // If this char Alef to Het, 1 to 8, א to ח
+
+@@ -450,13 +450,13 @@ int KCalendarSystemHebrewPrivate::integerFromString( const QString &inputString,
+ // then this char is a thousands digit
+ // else this char is a ones digit
+
+- if ( nextChar >= QChar( 0x05D0 ) && nextChar <= QChar( 0x05EA ) ) {
+- value = ( thisChar.unicode() - 0x05D0 + 1 ) * 1000;
++ if (nextChar >= QChar(0x05D0) && nextChar <= QChar(0x05EA)) {
++ value = (thisChar.unicode() - 0x05D0 + 1) * 1000;
+ } else {
+ value = thisChar.unicode() - 0x05D0 + 1;
+ }
+
+- } else if ( thisChar == QChar( 0x05D8 ) ) {
++ } else if (thisChar == QChar(0x05D8)) {
+
+ // If this char is Tet, 9, ט
+
+@@ -465,31 +465,31 @@ int KCalendarSystemHebrewPrivate::integerFromString( const QString &inputString,
+ // and next char not 7 (Special case for 97 = 16)
+ // then is a thousands digit else is 9
+
+- if ( nextChar >= QChar( 0x05D0 ) && nextChar <= QChar( 0x05EA ) &&
+- nextChar != QChar( 0x05D5 ) && nextChar != QChar( 0x05D6 ) ) {
++ if (nextChar >= QChar(0x05D0) && nextChar <= QChar(0x05EA) &&
++ nextChar != QChar(0x05D5) && nextChar != QChar(0x05D6)) {
+ value = 9000;
+ } else {
+ value = 9;
+ }
+
+- } else if ( thisChar >= QChar( 0x05D9 ) && thisChar <= QChar( 0x05E6 ) ) {
++ } else if (thisChar >= QChar(0x05D9) && thisChar <= QChar(0x05E6)) {
+
+ // If this char Yod to Tsadi, 10 to 90, י to צ
+
+ // If next char is a tens or hundreds char then is an error
+ // Else is a tens digit
+
+- if ( nextChar >= QChar( 0x05D9 ) ) {
++ if (nextChar >= QChar(0x05D9)) {
+ return -1;
+ } else {
+ value = decadeValues[thisChar.unicode() - 0x05D9];
+ }
+
+- } else if ( thisChar >= QChar( 0x05E7 ) && thisChar <= QChar( 0x05EA ) ) {
++ } else if (thisChar >= QChar(0x05E7) && thisChar <= QChar(0x05EA)) {
+
+ // If this char Qof to Tav, 100 to 400, ק to ת, then is hundreds digit
+
+- value = ( thisChar.unicode() - 0x05E7 + 1 ) * 100;
++ value = (thisChar.unicode() - 0x05E7 + 1) * 100;
+
+ } else {
+
+@@ -508,18 +508,18 @@ int KCalendarSystemHebrewPrivate::integerFromString( const QString &inputString,
+ return result;
+
+ } else {
+- return KCalendarSystemPrivate::integerFromString( inputString, maxLength, readLength );
++ return KCalendarSystemPrivate::integerFromString(inputString, maxLength, readLength);
+ }
+ }
+
+-QString KCalendarSystemHebrewPrivate::stringFromInteger( int number, int padWidth, QChar padChar ) const
++QString KCalendarSystemHebrewPrivate::stringFromInteger(int number, int padWidth, QChar padChar) const
+ {
+- return KCalendarSystemPrivate::stringFromInteger( number, padWidth, padChar );
++ return KCalendarSystemPrivate::stringFromInteger(number, padWidth, padChar);
+ }
+
+-QString KCalendarSystemHebrewPrivate::stringFromInteger( int number, int padWidth, QChar padChar, KLocale::DigitSet digitSet ) const
++QString KCalendarSystemHebrewPrivate::stringFromInteger(int number, int padWidth, QChar padChar, KLocale::DigitSet digitSet) const
+ {
+- if ( locale()->language() == QLatin1String("he") ) {
++ if (locale()->language() == QLatin1String("he")) {
+
+ // Hebrew numbers are composed of combinations of normal letters which have a numeric value.
+ // This is a non-positional system, the numeric values are simply added together, however
+@@ -546,8 +546,8 @@ QString KCalendarSystemHebrewPrivate::stringFromInteger( int number, int padWidt
+ */
+
+ const QChar decade[] = {
+- // Tet = ט, Yod = י, Kaf = כ, Lamed = ל, Mem = מ
+- // Nun = נ, Samekh = ס, Ayin = ע, Pe = פ, Tsadi = צ
++ // Tet = ט, Yod = י, Kaf = כ, Lamed = ל, Mem = מ
++ // Nun = נ, Samekh = ס, Ayin = ע, Pe = פ, Tsadi = צ
+ 0x05D8, 0x05D9, 0x05DB, 0x05DC, 0x05DE,
+ 0x05E0, 0x05E1, 0x05E2, 0x05E4, 0x05E6
+ };
+@@ -555,15 +555,15 @@ QString KCalendarSystemHebrewPrivate::stringFromInteger( int number, int padWidt
+ QString result;
+
+ // We have no rules for coping with numbers outside this range
+- if ( number < 1 || number > 9999 ) {
+- return KCalendarSystemPrivate::stringFromInteger( number, padWidth, padChar, digitSet );
++ if (number < 1 || number > 9999) {
++ return KCalendarSystemPrivate::stringFromInteger(number, padWidth, padChar, digitSet);
+ }
+
+ // Translate the thousands digit, just uses letter for number 1..9 ( א to ט, Alef to Tet )
+ // Years 5001-5999 do not have the thousands by convention
+- if ( number >= 1000 ) {
+- if ( number <= 5000 || number >= 6000 ) {
+- result += QChar( 0x05D0 - 1 + number / 1000 ); // Alef א to Tet ט
++ if (number >= 1000) {
++ if (number <= 5000 || number >= 6000) {
++ result += QChar(0x05D0 - 1 + number / 1000); // Alef א to Tet ט
+ }
+ number %= 1000;
+ }
+@@ -571,28 +571,28 @@ QString KCalendarSystemHebrewPrivate::stringFromInteger( int number, int padWidt
+ // Translate the hundreds digit
+ // Use traditional method where we only have letters assigned values for 100, 200, 300 and 400
+ // so may need to repeat 400 twice to make up the required number
+- if ( number >= 100 ) {
+- while ( number >= 500 ) {
+- result += QChar( 0x05EA ); // Tav = ת
++ if (number >= 100) {
++ while (number >= 500) {
++ result += QChar(0x05EA); // Tav = ת
+ number -= 400;
+ }
+- result += QChar( 0x05E7 - 1 + number / 100 ); // Qof = ק to xxx
++ result += QChar(0x05E7 - 1 + number / 100); // Qof = ק to xxx
+ number %= 100;
+ }
+
+ // Translate the tens digit
+ // The numbers 15 and 16 translate to letters that spell out the name of God which is
+ // forbidden, so require special treatment where 15 = 9 + 6 and 1 = 9 + 7.
+- if ( number >= 10 ) {
+- if ( number == 15 || number == 16 )
++ if (number >= 10) {
++ if (number == 15 || number == 16)
+ number -= 9;
+ result += decade[number / 10];
+ number %= 10;
+ }
+
+ // Translate the ones digit, uses letter for number 1..9 ( א to ט, Alef to Tet )
+- if ( number > 0 ) {
+- result += QChar( 0x05D0 - 1 + number ); // Alef = א to xxx
++ if (number > 0) {
++ result += QChar(0x05D0 - 1 + number); // Alef = א to xxx
+ }
+
+ // When used in a string with mixed names and numbers the numbers need special chars to
+@@ -601,27 +601,27 @@ QString KCalendarSystemHebrewPrivate::stringFromInteger( int number, int padWidt
+ // single quote for convenience.
+ // Multiple digit numbers have a gershayim symbol ? (Unicode = 0x05F4) as second-to-last
+ // char, but we use double quote for convenience.
+- if ( result.length() == 1 ) {
++ if (result.length() == 1) {
+ result += QLatin1Char('\'');
+ } else {
+- result.insert( result.length() - 1, QLatin1Char('\"') );
++ result.insert(result.length() - 1, QLatin1Char('\"'));
+ }
+
+ return result;
+
+ } else {
+- return KCalendarSystemPrivate::stringFromInteger( number, padWidth, padChar, digitSet );
++ return KCalendarSystemPrivate::stringFromInteger(number, padWidth, padChar, digitSet);
+ }
+ }
+
+-int KCalendarSystemHebrewPrivate::monthNumberToMonthIndex( int year, int month ) const
++int KCalendarSystemHebrewPrivate::monthNumberToMonthIndex(int year, int month) const
+ {
+- if ( isLeapYear( year ) ) {
+- if ( month == 6 ) {
++ if (isLeapYear(year)) {
++ if (month == 6) {
+ return 13; // Adar I
+- } else if ( month == 7 ) {
++ } else if (month == 7) {
+ return 14; // Adar II
+- } else if ( month > 7 ) {
++ } else if (month > 7) {
+ return month - 1; // Because of Adar II
+ }
+ }
+@@ -629,181 +629,181 @@ int KCalendarSystemHebrewPrivate::monthNumberToMonthIndex( int year, int month )
+ return month;
+ }
+
+-QString KCalendarSystemHebrewPrivate::monthName( int month, int year, KLocale::DateTimeComponentFormat format, bool possessive ) const
++QString KCalendarSystemHebrewPrivate::monthName(int month, int year, KLocale::DateTimeComponentFormat format, bool possessive) const
+ {
+ // We must map month number to month index
+- int monthIndex = monthNumberToMonthIndex( year, month );
++ int monthIndex = monthNumberToMonthIndex(year, month);
+
+- if ( format == KLocale::NarrowName ) {
+- switch ( monthIndex ) {
++ if (format == KLocale::NarrowName) {
++ switch (monthIndex) {
+ case 1:
+- return ki18nc( "Hebrew month 1 - KLocale::NarrowName", "T" ).toString( locale() );
++ return ki18nc("Hebrew month 1 - KLocale::NarrowName", "T").toString(locale());
+ case 2:
+- return ki18nc( "Hebrew month 2 - KLocale::NarrowName", "H" ).toString( locale() );
++ return ki18nc("Hebrew month 2 - KLocale::NarrowName", "H").toString(locale());
+ case 3:
+- return ki18nc( "Hebrew month 3 - KLocale::NarrowName", "K" ).toString( locale() );
++ return ki18nc("Hebrew month 3 - KLocale::NarrowName", "K").toString(locale());
+ case 4:
+- return ki18nc( "Hebrew month 4 - KLocale::NarrowName", "T" ).toString( locale() );
++ return ki18nc("Hebrew month 4 - KLocale::NarrowName", "T").toString(locale());
+ case 5:
+- return ki18nc( "Hebrew month 5 - KLocale::NarrowName", "S" ).toString( locale() );
++ return ki18nc("Hebrew month 5 - KLocale::NarrowName", "S").toString(locale());
+ case 6:
+- return ki18nc( "Hebrew month 6 - KLocale::NarrowName", "A" ).toString( locale() );
++ return ki18nc("Hebrew month 6 - KLocale::NarrowName", "A").toString(locale());
+ case 7:
+- return ki18nc( "Hebrew month 7 - KLocale::NarrowName", "N" ).toString( locale() );
++ return ki18nc("Hebrew month 7 - KLocale::NarrowName", "N").toString(locale());
+ case 8:
+- return ki18nc( "Hebrew month 8 - KLocale::NarrowName", "I" ).toString( locale() );
++ return ki18nc("Hebrew month 8 - KLocale::NarrowName", "I").toString(locale());
+ case 9:
+- return ki18nc( "Hebrew month 9 - KLocale::NarrowName", "S" ).toString( locale() );
++ return ki18nc("Hebrew month 9 - KLocale::NarrowName", "S").toString(locale());
+ case 10:
+- return ki18nc( "Hebrew month 10 - KLocale::NarrowName", "T" ).toString( locale() );
++ return ki18nc("Hebrew month 10 - KLocale::NarrowName", "T").toString(locale());
+ case 11:
+- return ki18nc( "Hebrew month 11 - KLocale::NarrowName", "A" ).toString( locale() );
++ return ki18nc("Hebrew month 11 - KLocale::NarrowName", "A").toString(locale());
+ case 12:
+- return ki18nc( "Hebrew month 12 - KLocale::NarrowName", "E" ).toString( locale() );
++ return ki18nc("Hebrew month 12 - KLocale::NarrowName", "E").toString(locale());
+ case 13:
+- return ki18nc( "Hebrew month 13 - KLocale::NarrowName", "A" ).toString( locale() );
++ return ki18nc("Hebrew month 13 - KLocale::NarrowName", "A").toString(locale());
+ case 14:
+- return ki18nc( "Hebrew month 14 - KLocale::NarrowName", "A" ).toString( locale() );
++ return ki18nc("Hebrew month 14 - KLocale::NarrowName", "A").toString(locale());
+ default:
+ return QString();
+ }
+ }
+
+- if ( format == KLocale::ShortName && possessive ) {
+- switch ( monthIndex ) {
++ if (format == KLocale::ShortName && possessive) {
++ switch (monthIndex) {
+ case 1:
+- return ki18nc( "Hebrew month 1 - KLocale::ShortName Possessive", "of Tis" ).toString( locale() );
++ return ki18nc("Hebrew month 1 - KLocale::ShortName Possessive", "of Tis").toString(locale());
+ case 2:
+- return ki18nc( "Hebrew month 2 - KLocale::ShortName Possessive", "of Hes" ).toString( locale() );
++ return ki18nc("Hebrew month 2 - KLocale::ShortName Possessive", "of Hes").toString(locale());
+ case 3:
+- return ki18nc( "Hebrew month 3 - KLocale::ShortName Possessive", "of Kis" ).toString( locale() );
++ return ki18nc("Hebrew month 3 - KLocale::ShortName Possessive", "of Kis").toString(locale());
+ case 4:
+- return ki18nc( "Hebrew month 4 - KLocale::ShortName Possessive", "of Tev" ).toString( locale() );
++ return ki18nc("Hebrew month 4 - KLocale::ShortName Possessive", "of Tev").toString(locale());
+ case 5:
+- return ki18nc( "Hebrew month 5 - KLocale::ShortName Possessive", "of Shv" ).toString( locale() );
++ return ki18nc("Hebrew month 5 - KLocale::ShortName Possessive", "of Shv").toString(locale());
+ case 6:
+- return ki18nc( "Hebrew month 6 - KLocale::ShortName Possessive", "of Ada" ).toString( locale() );
++ return ki18nc("Hebrew month 6 - KLocale::ShortName Possessive", "of Ada").toString(locale());
+ case 7:
+- return ki18nc( "Hebrew month 7 - KLocale::ShortName Possessive", "of Nis" ).toString( locale() );
++ return ki18nc("Hebrew month 7 - KLocale::ShortName Possessive", "of Nis").toString(locale());
+ case 8:
+- return ki18nc( "Hebrew month 8 - KLocale::ShortName Possessive", "of Iya" ).toString( locale() );
++ return ki18nc("Hebrew month 8 - KLocale::ShortName Possessive", "of Iya").toString(locale());
+ case 9:
+- return ki18nc( "Hebrew month 9 - KLocale::ShortName Possessive", "of Siv" ).toString( locale() );
++ return ki18nc("Hebrew month 9 - KLocale::ShortName Possessive", "of Siv").toString(locale());
+ case 10:
+- return ki18nc( "Hebrew month 10 - KLocale::ShortName Possessive", "of Tam" ).toString( locale() );
++ return ki18nc("Hebrew month 10 - KLocale::ShortName Possessive", "of Tam").toString(locale());
+ case 11:
+- return ki18nc( "Hebrew month 11 - KLocale::ShortName Possessive", "of Av" ).toString( locale() );
++ return ki18nc("Hebrew month 11 - KLocale::ShortName Possessive", "of Av").toString(locale());
+ case 12:
+- return ki18nc( "Hebrew month 12 - KLocale::ShortName Possessive", "of Elu" ).toString( locale() );
++ return ki18nc("Hebrew month 12 - KLocale::ShortName Possessive", "of Elu").toString(locale());
+ case 13:
+- return ki18nc( "Hebrew month 13 - KLocale::ShortName Possessive", "of Ad1" ).toString( locale() );
++ return ki18nc("Hebrew month 13 - KLocale::ShortName Possessive", "of Ad1").toString(locale());
+ case 14:
+- return ki18nc( "Hebrew month 14 - KLocale::ShortName Possessive", "of Ad2" ).toString( locale() );
++ return ki18nc("Hebrew month 14 - KLocale::ShortName Possessive", "of Ad2").toString(locale());
+ default:
+ return QString();
+ }
+ }
+
+- if ( format == KLocale::ShortName && !possessive ) {
+- switch ( monthIndex ) {
++ if (format == KLocale::ShortName && !possessive) {
++ switch (monthIndex) {
+ case 1:
+- return ki18nc( "Hebrew month 1 - KLocale::ShortName", "Tis" ).toString( locale() );
++ return ki18nc("Hebrew month 1 - KLocale::ShortName", "Tis").toString(locale());
+ case 2:
+- return ki18nc( "Hebrew month 2 - KLocale::ShortName", "Hes" ).toString( locale() );
++ return ki18nc("Hebrew month 2 - KLocale::ShortName", "Hes").toString(locale());
+ case 3:
+- return ki18nc( "Hebrew month 3 - KLocale::ShortName", "Kis" ).toString( locale() );
++ return ki18nc("Hebrew month 3 - KLocale::ShortName", "Kis").toString(locale());
+ case 4:
+- return ki18nc( "Hebrew month 4 - KLocale::ShortName", "Tev" ).toString( locale() );
++ return ki18nc("Hebrew month 4 - KLocale::ShortName", "Tev").toString(locale());
+ case 5:
+- return ki18nc( "Hebrew month 5 - KLocale::ShortName", "Shv" ).toString( locale() );
++ return ki18nc("Hebrew month 5 - KLocale::ShortName", "Shv").toString(locale());
+ case 6:
+- return ki18nc( "Hebrew month 6 - KLocale::ShortName", "Ada" ).toString( locale() );
++ return ki18nc("Hebrew month 6 - KLocale::ShortName", "Ada").toString(locale());
+ case 7:
+- return ki18nc( "Hebrew month 7 - KLocale::ShortName", "Nis" ).toString( locale() );
++ return ki18nc("Hebrew month 7 - KLocale::ShortName", "Nis").toString(locale());
+ case 8:
+- return ki18nc( "Hebrew month 8 - KLocale::ShortName", "Iya" ).toString( locale() );
++ return ki18nc("Hebrew month 8 - KLocale::ShortName", "Iya").toString(locale());
+ case 9:
+- return ki18nc( "Hebrew month 9 - KLocale::ShortName", "Siv" ).toString( locale() );
++ return ki18nc("Hebrew month 9 - KLocale::ShortName", "Siv").toString(locale());
+ case 10:
+- return ki18nc( "Hebrew month 10 - KLocale::ShortName", "Tam" ).toString( locale() );
++ return ki18nc("Hebrew month 10 - KLocale::ShortName", "Tam").toString(locale());
+ case 11:
+- return ki18nc( "Hebrew month 11 - KLocale::ShortName", "Av" ).toString( locale() );
++ return ki18nc("Hebrew month 11 - KLocale::ShortName", "Av").toString(locale());
+ case 12:
+- return ki18nc( "Hebrew month 12 - KLocale::ShortName", "Elu" ).toString( locale() );
++ return ki18nc("Hebrew month 12 - KLocale::ShortName", "Elu").toString(locale());
+ case 13:
+- return ki18nc( "Hebrew month 13 - KLocale::ShortName", "Ad1" ).toString( locale() );
++ return ki18nc("Hebrew month 13 - KLocale::ShortName", "Ad1").toString(locale());
+ case 14:
+- return ki18nc( "Hebrew month 14 - KLocale::ShortName", "Ad2" ).toString( locale() );
++ return ki18nc("Hebrew month 14 - KLocale::ShortName", "Ad2").toString(locale());
+ default:
+ return QString();
+ }
+ }
+
+- if ( format == KLocale::LongName && possessive ) {
+- switch ( monthIndex ) {
++ if (format == KLocale::LongName && possessive) {
++ switch (monthIndex) {
+ case 1:
+- return ki18nc( "Hebrew month 1 - KLocale::LongName Possessive", "of Tishrey" ).toString( locale() );
++ return ki18nc("Hebrew month 1 - KLocale::LongName Possessive", "of Tishrey").toString(locale());
+ case 2:
+- return ki18nc( "Hebrew month 2 - KLocale::LongName Possessive", "of Heshvan" ).toString( locale() );
++ return ki18nc("Hebrew month 2 - KLocale::LongName Possessive", "of Heshvan").toString(locale());
+ case 3:
+- return ki18nc( "Hebrew month 3 - KLocale::LongName Possessive", "of Kislev" ).toString( locale() );
++ return ki18nc("Hebrew month 3 - KLocale::LongName Possessive", "of Kislev").toString(locale());
+ case 4:
+- return ki18nc( "Hebrew month 4 - KLocale::LongName Possessive", "of Tevet" ).toString( locale() );
++ return ki18nc("Hebrew month 4 - KLocale::LongName Possessive", "of Tevet").toString(locale());
+ case 5:
+- return ki18nc( "Hebrew month 5 - KLocale::LongName Possessive", "of Shvat" ).toString( locale() );
++ return ki18nc("Hebrew month 5 - KLocale::LongName Possessive", "of Shvat").toString(locale());
+ case 6:
+- return ki18nc( "Hebrew month 6 - KLocale::LongName Possessive", "of Adar" ).toString( locale() );
++ return ki18nc("Hebrew month 6 - KLocale::LongName Possessive", "of Adar").toString(locale());
+ case 7:
+- return ki18nc( "Hebrew month 7 - KLocale::LongName Possessive", "of Nisan" ).toString( locale() );
++ return ki18nc("Hebrew month 7 - KLocale::LongName Possessive", "of Nisan").toString(locale());
+ case 8:
+- return ki18nc( "Hebrew month 8 - KLocale::LongName Possessive", "of Iyar" ).toString( locale() );
++ return ki18nc("Hebrew month 8 - KLocale::LongName Possessive", "of Iyar").toString(locale());
+ case 9:
+- return ki18nc( "Hebrew month 9 - KLocale::LongName Possessive", "of Sivan" ).toString( locale() );
++ return ki18nc("Hebrew month 9 - KLocale::LongName Possessive", "of Sivan").toString(locale());
+ case 10:
+- return ki18nc( "Hebrew month 10 - KLocale::LongName Possessive", "of Tamuz" ).toString( locale() );
++ return ki18nc("Hebrew month 10 - KLocale::LongName Possessive", "of Tamuz").toString(locale());
+ case 11:
+- return ki18nc( "Hebrew month 11 - KLocale::LongName Possessive", "of Av" ).toString( locale() );
++ return ki18nc("Hebrew month 11 - KLocale::LongName Possessive", "of Av").toString(locale());
+ case 12:
+- return ki18nc( "Hebrew month 12 - KLocale::LongName Possessive", "of Elul" ).toString( locale() );
++ return ki18nc("Hebrew month 12 - KLocale::LongName Possessive", "of Elul").toString(locale());
+ case 13:
+- return ki18nc( "Hebrew month 13 - KLocale::LongName Possessive", "of Adar I" ).toString( locale() );
++ return ki18nc("Hebrew month 13 - KLocale::LongName Possessive", "of Adar I").toString(locale());
+ case 14:
+- return ki18nc( "Hebrew month 14 - KLocale::LongName Possessive", "of Adar II" ).toString( locale() );
++ return ki18nc("Hebrew month 14 - KLocale::LongName Possessive", "of Adar II").toString(locale());
+ default:
+ return QString();
+ }
+ }
+
+ // Default to LongName
+- switch ( monthIndex ) {
++ switch (monthIndex) {
+ case 1:
+- return ki18nc( "Hebrew month 1 - KLocale::LongName", "Tishrey" ).toString( locale() );
++ return ki18nc("Hebrew month 1 - KLocale::LongName", "Tishrey").toString(locale());
+ case 2:
+- return ki18nc( "Hebrew month 2 - KLocale::LongName", "Heshvan" ).toString( locale() );
++ return ki18nc("Hebrew month 2 - KLocale::LongName", "Heshvan").toString(locale());
+ case 3:
+- return ki18nc( "Hebrew month 3 - KLocale::LongName", "Kislev" ).toString( locale() );
++ return ki18nc("Hebrew month 3 - KLocale::LongName", "Kislev").toString(locale());
+ case 4:
+- return ki18nc( "Hebrew month 4 - KLocale::LongName", "Tevet" ).toString( locale() );
++ return ki18nc("Hebrew month 4 - KLocale::LongName", "Tevet").toString(locale());
+ case 5:
+- return ki18nc( "Hebrew month 5 - KLocale::LongName", "Shvat" ).toString( locale() );
++ return ki18nc("Hebrew month 5 - KLocale::LongName", "Shvat").toString(locale());
+ case 6:
+- return ki18nc( "Hebrew month 6 - KLocale::LongName", "Adar" ).toString( locale() );
++ return ki18nc("Hebrew month 6 - KLocale::LongName", "Adar").toString(locale());
+ case 7:
+- return ki18nc( "Hebrew month 7 - KLocale::LongName", "Nisan" ).toString( locale() );
++ return ki18nc("Hebrew month 7 - KLocale::LongName", "Nisan").toString(locale());
+ case 8:
+- return ki18nc( "Hebrew month 8 - KLocale::LongName", "Iyar" ).toString( locale() );
++ return ki18nc("Hebrew month 8 - KLocale::LongName", "Iyar").toString(locale());
+ case 9:
+- return ki18nc( "Hebrew month 9 - KLocale::LongName", "Sivan" ).toString( locale() );
++ return ki18nc("Hebrew month 9 - KLocale::LongName", "Sivan").toString(locale());
+ case 10:
+- return ki18nc( "Hebrew month 10 - KLocale::LongName", "Tamuz" ).toString( locale() );
++ return ki18nc("Hebrew month 10 - KLocale::LongName", "Tamuz").toString(locale());
+ case 11:
+- return ki18nc( "Hebrew month 11 - KLocale::LongName", "Av" ).toString( locale() );
++ return ki18nc("Hebrew month 11 - KLocale::LongName", "Av").toString(locale());
+ case 12:
+- return ki18nc( "Hebrew month 12 - KLocale::LongName", "Elul" ).toString( locale() );
++ return ki18nc("Hebrew month 12 - KLocale::LongName", "Elul").toString(locale());
+ case 13:
+- return ki18nc( "Hebrew month 13 - KLocale::LongName", "Adar I" ).toString( locale() );
++ return ki18nc("Hebrew month 13 - KLocale::LongName", "Adar I").toString(locale());
+ case 14:
+- return ki18nc( "Hebrew month 14 - KLocale::LongName", "Adar II" ).toString( locale() );
++ return ki18nc("Hebrew month 14 - KLocale::LongName", "Adar II").toString(locale());
+ default:
+ return QString();
+ }
+@@ -812,106 +812,102 @@ QString KCalendarSystemHebrewPrivate::monthName( int month, int year, KLocale::D
+ // Use Western day names for now as that's what the old version did,
+ // but wouldn't it be better to use the right Hebrew names like Shabbat?
+ // Could make it switchable by adding new enums to WeekDayFormat, e.g. ShortNameWestern?
+-QString KCalendarSystemHebrewPrivate::weekDayName( int weekDay, KLocale::DateTimeComponentFormat format ) const
++QString KCalendarSystemHebrewPrivate::weekDayName(int weekDay, KLocale::DateTimeComponentFormat format) const
+ {
+- if ( format == KLocale::NarrowName ) {
+- switch ( weekDay ) {
++ if (format == KLocale::NarrowName) {
++ switch (weekDay) {
+ case 1:
+- return ki18nc( "Gregorian weekday 1 - KLocale::NarrowName ", "M" ).toString( locale() );
++ return ki18nc("Gregorian weekday 1 - KLocale::NarrowName ", "M").toString(locale());
+ case 2:
+- return ki18nc( "Gregorian weekday 2 - KLocale::NarrowName ", "T" ).toString( locale() );
++ return ki18nc("Gregorian weekday 2 - KLocale::NarrowName ", "T").toString(locale());
+ case 3:
+- return ki18nc( "Gregorian weekday 3 - KLocale::NarrowName ", "W" ).toString( locale() );
++ return ki18nc("Gregorian weekday 3 - KLocale::NarrowName ", "W").toString(locale());
+ case 4:
+- return ki18nc( "Gregorian weekday 4 - KLocale::NarrowName ", "T" ).toString( locale() );
++ return ki18nc("Gregorian weekday 4 - KLocale::NarrowName ", "T").toString(locale());
+ case 5:
+- return ki18nc( "Gregorian weekday 5 - KLocale::NarrowName ", "F" ).toString( locale() );
++ return ki18nc("Gregorian weekday 5 - KLocale::NarrowName ", "F").toString(locale());
+ case 6:
+- return ki18nc( "Gregorian weekday 6 - KLocale::NarrowName ", "S" ).toString( locale() );
++ return ki18nc("Gregorian weekday 6 - KLocale::NarrowName ", "S").toString(locale());
+ case 7:
+- return ki18nc( "Gregorian weekday 7 - KLocale::NarrowName ", "S" ).toString( locale() );
++ return ki18nc("Gregorian weekday 7 - KLocale::NarrowName ", "S").toString(locale());
+ default:
+ return QString();
+ }
+ }
+
+- if ( format == KLocale::ShortName || format == KLocale:: ShortNumber ) {
+- switch ( weekDay ) {
++ if (format == KLocale::ShortName || format == KLocale:: ShortNumber) {
++ switch (weekDay) {
+ case 1:
+- return ki18nc( "Gregorian weekday 1 - KLocale::ShortName", "Mon" ).toString( locale() );
++ return ki18nc("Gregorian weekday 1 - KLocale::ShortName", "Mon").toString(locale());
+ case 2:
+- return ki18nc( "Gregorian weekday 2 - KLocale::ShortName", "Tue" ).toString( locale() );
++ return ki18nc("Gregorian weekday 2 - KLocale::ShortName", "Tue").toString(locale());
+ case 3:
+- return ki18nc( "Gregorian weekday 3 - KLocale::ShortName", "Wed" ).toString( locale() );
++ return ki18nc("Gregorian weekday 3 - KLocale::ShortName", "Wed").toString(locale());
+ case 4:
+- return ki18nc( "Gregorian weekday 4 - KLocale::ShortName", "Thu" ).toString( locale() );
++ return ki18nc("Gregorian weekday 4 - KLocale::ShortName", "Thu").toString(locale());
+ case 5:
+- return ki18nc( "Gregorian weekday 5 - KLocale::ShortName", "Fri" ).toString( locale() );
++ return ki18nc("Gregorian weekday 5 - KLocale::ShortName", "Fri").toString(locale());
+ case 6:
+- return ki18nc( "Gregorian weekday 6 - KLocale::ShortName", "Sat" ).toString( locale() );
++ return ki18nc("Gregorian weekday 6 - KLocale::ShortName", "Sat").toString(locale());
+ case 7:
+- return ki18nc( "Gregorian weekday 7 - KLocale::ShortName", "Sun" ).toString( locale() );
++ return ki18nc("Gregorian weekday 7 - KLocale::ShortName", "Sun").toString(locale());
+ default: return QString();
+ }
+ }
+
+- switch ( weekDay ) {
++ switch (weekDay) {
+ case 1:
+- return ki18nc( "Gregorian weekday 1 - KLocale::LongName", "Monday" ).toString( locale() );
++ return ki18nc("Gregorian weekday 1 - KLocale::LongName", "Monday").toString(locale());
+ case 2:
+- return ki18nc( "Gregorian weekday 2 - KLocale::LongName", "Tuesday" ).toString( locale() );
++ return ki18nc("Gregorian weekday 2 - KLocale::LongName", "Tuesday").toString(locale());
+ case 3:
+- return ki18nc( "Gregorian weekday 3 - KLocale::LongName", "Wednesday" ).toString( locale() );
++ return ki18nc("Gregorian weekday 3 - KLocale::LongName", "Wednesday").toString(locale());
+ case 4:
+- return ki18nc( "Gregorian weekday 4 - KLocale::LongName", "Thursday" ).toString( locale() );
++ return ki18nc("Gregorian weekday 4 - KLocale::LongName", "Thursday").toString(locale());
+ case 5:
+- return ki18nc( "Gregorian weekday 5 - KLocale::LongName", "Friday" ).toString( locale() );
++ return ki18nc("Gregorian weekday 5 - KLocale::LongName", "Friday").toString(locale());
+ case 6:
+- return ki18nc( "Gregorian weekday 6 - KLocale::LongName", "Saturday" ).toString( locale() );
++ return ki18nc("Gregorian weekday 6 - KLocale::LongName", "Saturday").toString(locale());
+ case 7:
+- return ki18nc( "Gregorian weekday 7 - KLocale::LongName", "Sunday" ).toString( locale() );
++ return ki18nc("Gregorian weekday 7 - KLocale::LongName", "Sunday").toString(locale());
+ default:
+ return QString();
+ }
+ }
+
+
+-KCalendarSystemHebrew::KCalendarSystemHebrew( const KLocale *locale )
+- : KCalendarSystem( *new KCalendarSystemHebrewPrivate( this ), KSharedConfig::Ptr(), locale ),
+- dont_use( 0 )
++KCalendarSystemHebrew::KCalendarSystemHebrew(const KLocale *locale)
++ : KCalendarSystem(*new KCalendarSystemHebrewPrivate(this), KSharedConfig::Ptr(), locale)
+ {
+- d_ptr->loadConfig( calendarType() );
++ d_ptr->loadConfig(calendarType());
+ }
+
+-KCalendarSystemHebrew::KCalendarSystemHebrew( const KSharedConfig::Ptr config, const KLocale *locale )
+- : KCalendarSystem( *new KCalendarSystemHebrewPrivate( this ), config, locale ),
+- dont_use( 0 )
++KCalendarSystemHebrew::KCalendarSystemHebrew(const KSharedConfig::Ptr config, const KLocale *locale)
++ : KCalendarSystem(*new KCalendarSystemHebrewPrivate(this), config, locale)
+ {
+- d_ptr->loadConfig( calendarType() );
++ d_ptr->loadConfig(calendarType());
+ }
+
+-KCalendarSystemHebrew::KCalendarSystemHebrew( KCalendarSystemHebrewPrivate &dd,
+- const KSharedConfig::Ptr config, const KLocale *locale )
+- : KCalendarSystem( dd, config, locale ),
+- dont_use( 0 )
++KCalendarSystemHebrew::KCalendarSystemHebrew(KCalendarSystemHebrewPrivate &dd,
++ const KSharedConfig::Ptr config, const KLocale *locale)
++ : KCalendarSystem(dd, config, locale)
+ {
+- d_ptr->loadConfig( calendarType() );
++ d_ptr->loadConfig(calendarType());
+ }
+
+ KCalendarSystemHebrew::~KCalendarSystemHebrew()
+ {
+- delete dont_use;
+ }
+
+ QString KCalendarSystemHebrew::calendarType() const
+ {
+- return QLatin1String( "hebrew" );
++ return QLatin1String("hebrew");
+ }
+
+ QDate KCalendarSystemHebrew::epoch() const
+ {
+ // Hebrew 0001-01-01 (Gregorian -3760-09-07, Julian -3761-10-07)
+- return QDate::fromJulianDay( 347998 );
++ return QDate::fromJulianDay(347998);
+ }
+
+ QDate KCalendarSystemHebrew::earliestValidDate() const
+@@ -919,219 +915,88 @@ QDate KCalendarSystemHebrew::earliestValidDate() const
+ // Current formulas using direct Gregorian <-> Hebrew conversion using Qt
+ // will return invalid results prior to the Gregorian switchover in 1582
+ // Next valid Hebrew year starts 5344-01-01 (Gregorian 1583-09-17)
+- return QDate::fromJulianDay( 2299498 );
++ return QDate::fromJulianDay(2299498);
+ }
+
+ QDate KCalendarSystemHebrew::latestValidDate() const
+ {
+ // Testing shows current formulas only work up to 8119-13-29 (Gregorian 4359-10-07)
+- return QDate::fromJulianDay( 3313431 );
++ return QDate::fromJulianDay(3313431);
+ }
+
+-bool KCalendarSystemHebrew::isValid( int year, int month, int day ) const
++bool KCalendarSystemHebrew::isValid(int year, int month, int day) const
+ {
+- return KCalendarSystem::isValid( year, month, day );
++ return KCalendarSystem::isValid(year, month, day);
+ }
+
+-bool KCalendarSystemHebrew::isValid( const QDate &date ) const
++bool KCalendarSystemHebrew::isValid(const QDate &date) const
+ {
+- return KCalendarSystem::isValid( date );
++ return KCalendarSystem::isValid(date);
+ }
+
+-bool KCalendarSystemHebrew::setDate( QDate &date, int year, int month, int day ) const
++int KCalendarSystemHebrew::dayOfWeek(const QDate &date) const
+ {
+- return KCalendarSystem::setDate( date, year, month, day );
+-}
+-
+-// Deprecated
+-bool KCalendarSystemHebrew::setYMD( QDate &date, int year, int month, int day ) const
+-{
+- return KCalendarSystem::setYMD( date, year, month, day );
+-}
+-
+-int KCalendarSystemHebrew::year( const QDate &date ) const
+-{
+- return KCalendarSystem::year( date );
+-}
+-
+-int KCalendarSystemHebrew::month( const QDate &date ) const
+-{
+- return KCalendarSystem::month( date );
+-}
+-
+-int KCalendarSystemHebrew::day( const QDate &date ) const
+-{
+- return KCalendarSystem::day( date );
+-}
+-
+-QDate KCalendarSystemHebrew::addYears( const QDate &date, int nyears ) const
+-{
+- return KCalendarSystem::addYears( date, nyears );
+-}
+-
+-QDate KCalendarSystemHebrew::addMonths( const QDate &date, int nmonths ) const
+-{
+- return KCalendarSystem::addMonths( date, nmonths );
+-}
+-
+-QDate KCalendarSystemHebrew::addDays( const QDate &date, int ndays ) const
+-{
+- return KCalendarSystem::addDays( date, ndays );
+-}
+-
+-int KCalendarSystemHebrew::monthsInYear( const QDate &date ) const
+-{
+- return KCalendarSystem::monthsInYear( date );
+-}
+-
+-int KCalendarSystemHebrew::weeksInYear( const QDate &date ) const
+-{
+- return KCalendarSystem::weeksInYear( date );
+-}
+-
+-int KCalendarSystemHebrew::weeksInYear( int year ) const
+-{
+- return KCalendarSystem::weeksInYear( year );
+-}
+-
+-int KCalendarSystemHebrew::daysInYear( const QDate &date ) const
+-{
+- return KCalendarSystem::daysInYear( date );
+-}
+-
+-int KCalendarSystemHebrew::daysInMonth( const QDate &date ) const
+-{
+- return KCalendarSystem::daysInMonth( date );
+-}
+-
+-int KCalendarSystemHebrew::daysInWeek( const QDate &date ) const
+-{
+- return KCalendarSystem::daysInWeek( date );
+-}
+-
+-int KCalendarSystemHebrew::dayOfYear( const QDate &date ) const
+-{
+- return KCalendarSystem::dayOfYear( date );
+-}
+-
+-int KCalendarSystemHebrew::dayOfWeek( const QDate &date ) const
+-{
+- class h_date * sd = toHebrew( date );
+- if ( sd->hd_dw == 0 ) {
++ class h_date * sd = toHebrew(date);
++ if (sd->hd_dw == 0) {
+ return 7;
+ } else {
+- return ( sd->hd_dw );
++ return (sd->hd_dw);
+ }
+ }
+
+-int KCalendarSystemHebrew::weekNumber( const QDate &date, int *yearNum ) const
+-{
+- return KCalendarSystem::weekNumber( date, yearNum );
+-}
+-
+-bool KCalendarSystemHebrew::isLeapYear( int year ) const
+-{
+- return KCalendarSystem::isLeapYear( year );
+-}
+-
+-bool KCalendarSystemHebrew::isLeapYear( const QDate &date ) const
+-{
+- return KCalendarSystem::isLeapYear( date );
+-}
+-
+-QString KCalendarSystemHebrew::monthName( int month, int year, MonthNameFormat format ) const
++bool KCalendarSystemHebrew::isLeapYear(int year) const
+ {
+- return KCalendarSystem::monthName( month, year, format );
++ return KCalendarSystem::isLeapYear(year);
+ }
+
+-QString KCalendarSystemHebrew::monthName( const QDate &date, MonthNameFormat format ) const
++bool KCalendarSystemHebrew::isLeapYear(const QDate &date) const
+ {
+- return KCalendarSystem::monthName( date, format );
++ return KCalendarSystem::isLeapYear(date);
+ }
+
+-QString KCalendarSystemHebrew::weekDayName( int weekDay, WeekDayNameFormat format ) const
++QString KCalendarSystemHebrew::monthName(int month, int year, MonthNameFormat format) const
+ {
+- return KCalendarSystem::weekDayName( weekDay, format );
++ return KCalendarSystem::monthName(month, year, format);
+ }
+
+-QString KCalendarSystemHebrew::weekDayName( const QDate &date, WeekDayNameFormat format ) const
++QString KCalendarSystemHebrew::monthName(const QDate &date, MonthNameFormat format) const
+ {
+- return KCalendarSystem::weekDayName( date, format );
++ return KCalendarSystem::monthName(date, format);
+ }
+
+-QString KCalendarSystemHebrew::yearString( const QDate &date, StringFormat format ) const
++QString KCalendarSystemHebrew::weekDayName(int weekDay, WeekDayNameFormat format) const
+ {
+- return KCalendarSystem::yearString( date, format );
++ return KCalendarSystem::weekDayName(weekDay, format);
+ }
+
+-QString KCalendarSystemHebrew::monthString( const QDate &date, StringFormat format ) const
++QString KCalendarSystemHebrew::weekDayName(const QDate &date, WeekDayNameFormat format) const
+ {
+- return KCalendarSystem::monthString( date, format );
++ return KCalendarSystem::weekDayName(date, format);
+ }
+
+-QString KCalendarSystemHebrew::dayString( const QDate &date, StringFormat format ) const
++int KCalendarSystemHebrew::yearStringToInteger(const QString &string, int &readLength) const
+ {
+- return KCalendarSystem::dayString( date, format );
+-}
+-
+-int KCalendarSystemHebrew::yearStringToInteger( const QString &string, int &readLength ) const
+-{
+- int result = KCalendarSystem::yearStringToInteger( string, readLength );
++ int result = KCalendarSystem::yearStringToInteger(string, readLength);
+
+ // Hebrew has no letter for 0, so 5 and 5000 are written the same
+ // Assume if less than 10 then we are in an exact multiple of 1000
+- if ( result < 10 ) {
++ if (result < 10) {
+ result = result * 1000;
+ }
+
+ // Not good just assuming, make configurable
+- if ( result < 1000 ) {
++ if (result < 1000) {
+ result += 5000; // assume we're in the 6th millenium (y6k bug)
+ }
+
+ return result;
+ }
+
+-int KCalendarSystemHebrew::monthStringToInteger( const QString &string, int &readLength ) const
+-{
+- return KCalendarSystem::monthStringToInteger( string, readLength );
+-}
+-
+-int KCalendarSystemHebrew::dayStringToInteger( const QString &string, int &readLength ) const
+-{
+- return KCalendarSystem::yearStringToInteger( string, readLength );
+-}
+-
+-QString KCalendarSystemHebrew::formatDate( const QDate &date, KLocale::DateFormat format ) const
+-{
+- return KCalendarSystem::formatDate( date, format );
+-}
+-
+-QDate KCalendarSystemHebrew::readDate( const QString &str, bool *ok ) const
+-{
+- return KCalendarSystem::readDate( str, ok );
+-}
+-
+-QDate KCalendarSystemHebrew::readDate( const QString &intstr, const QString &fmt, bool *ok ) const
+-{
+- return KCalendarSystem::readDate( intstr, fmt, ok );
+-}
+-
+-QDate KCalendarSystemHebrew::readDate( const QString &str, KLocale::ReadDateFlags flags, bool *ok ) const
+-{
+- return KCalendarSystem::readDate( str, flags, ok );
+-}
+-
+ int KCalendarSystemHebrew::weekDayOfPray() const
+ {
+ return 6; // Saturday
+ }
+
+-int KCalendarSystemHebrew::weekStartDay() const
+-{
+- return KCalendarSystem::weekStartDay();
+-}
+-
+ bool KCalendarSystemHebrew::isLunar() const
+ {
+ return false;
+@@ -1152,19 +1017,19 @@ bool KCalendarSystemHebrew::isProleptic() const
+ return false;
+ }
+
+-bool KCalendarSystemHebrew::julianDayToDate( int jd, int &year, int &month, int &day ) const
++bool KCalendarSystemHebrew::julianDayToDate(int jd, int &year, int &month, int &day) const
+ {
+- class h_date * sd = toHebrew( QDate::fromJulianDay( jd ) );
++ class h_date * sd = toHebrew(QDate::fromJulianDay(jd));
+
+ year = sd->hd_year;
+
+ month = sd->hd_mon;
+- if ( isLeapYear( sd->hd_year ) ) {
+- if( month == 13 /*AdarI*/ ) {
++ if (isLeapYear(sd->hd_year)) {
++ if (month == 13 /*AdarI*/) {
+ month = 6;
+- } else if( month == 14 /*AdarII*/ ) {
++ } else if (month == 14 /*AdarII*/) {
+ month = 7;
+- } else if ( month > 6 && month < 13 ) {
++ } else if (month > 6 && month < 13) {
+ ++month;
+ }
+ }
+@@ -1174,11 +1039,11 @@ bool KCalendarSystemHebrew::julianDayToDate( int jd, int &year, int &month, int
+ return true;
+ }
+
+-bool KCalendarSystemHebrew::dateToJulianDay( int year, int month, int day, int &jd ) const
++bool KCalendarSystemHebrew::dateToJulianDay(int year, int month, int day, int &jd) const
+ {
+- class h_date * gd = hebrewToGregorian( year, month, day );
++ class h_date * gd = hebrewToGregorian(year, month, day);
+
+- QDate tempDate( gd->hd_year, gd->hd_mon + 1, gd->hd_day + 1 );
++ QDate tempDate(gd->hd_year, gd->hd_mon + 1, gd->hd_day + 1);
+
+ jd = tempDate.toJulianDay();
+
+diff --git a/kdecore/date/kcalendarsystemhebrew_p.h b/kdecore/date/kcalendarsystemhebrew_p.h
+index 72e82ec..3c3f7fb 100644
+--- a/kdecore/date/kcalendarsystemhebrew_p.h
++++ b/kdecore/date/kcalendarsystemhebrew_p.h
+@@ -41,8 +41,8 @@ class KCalendarSystemHebrewPrivate;
+ class KCalendarSystemHebrew : public KCalendarSystem
+ {
+ public:
+- explicit KCalendarSystemHebrew( const KLocale * locale = 0 );
+- explicit KCalendarSystemHebrew( const KSharedConfig::Ptr config, const KLocale *locale = 0 );
++ explicit KCalendarSystemHebrew(const KLocale * locale = 0);
++ explicit KCalendarSystemHebrew(const KSharedConfig::Ptr config, const KLocale *locale = 0);
+ virtual ~KCalendarSystemHebrew();
+
+ virtual QString calendarType() const;
+@@ -50,58 +50,23 @@ public:
+ virtual QDate epoch() const;
+ virtual QDate earliestValidDate() const;
+ virtual QDate latestValidDate() const;
+- virtual bool isValid( int year, int month, int day ) const;
+- virtual bool isValid( const QDate &date ) const;
++ virtual bool isValid(int year, int month, int day) const;
++ virtual bool isValid(const QDate &date) const;
+
+- virtual bool setDate( QDate &date, int year, int month, int day ) const;
+- /** @deprecated */
+- virtual bool setYMD( QDate &date, int year, int month, int day ) const;
++ virtual int dayOfWeek(const QDate &date) const;
+
+- virtual int year( const QDate &date ) const;
+- virtual int month( const QDate &date ) const;
+- virtual int day( const QDate &date ) const;
++ virtual bool isLeapYear(int year) const;
++ virtual bool isLeapYear(const QDate &date) const;
+
+- virtual QDate addYears( const QDate &date, int nyears ) const;
+- virtual QDate addMonths( const QDate &date, int nmonths ) const;
+- virtual QDate addDays( const QDate &date, int ndays ) const;
++ virtual QString monthName(int month, int year, MonthNameFormat format = LongName) const;
++ virtual QString monthName(const QDate &date, MonthNameFormat format = LongName) const;
+
+- virtual int monthsInYear( const QDate &date ) const;
+- virtual int weeksInYear( const QDate &date ) const;
+- virtual int weeksInYear( int year ) const;
+- virtual int daysInYear( const QDate &date ) const;
+- virtual int daysInMonth( const QDate &date ) const;
+- virtual int daysInWeek( const QDate &date ) const;
++ virtual QString weekDayName(int weekDay, WeekDayNameFormat format = LongDayName) const;
++ virtual QString weekDayName(const QDate &date, WeekDayNameFormat format = LongDayName) const;
+
+- virtual int dayOfYear( const QDate &date ) const;
+- virtual int dayOfWeek( const QDate &date ) const;
++ virtual int yearStringToInteger(const QString &sNum, int &iLength) const;
+
+- virtual int weekNumber( const QDate &date, int *yearNum = 0 ) const;
+-
+- virtual bool isLeapYear( int year ) const;
+- virtual bool isLeapYear( const QDate &date ) const;
+-
+- virtual QString monthName( int month, int year, MonthNameFormat format = LongName ) const;
+- virtual QString monthName( const QDate &date, MonthNameFormat format = LongName ) const;
+-
+- virtual QString weekDayName( int weekDay, WeekDayNameFormat format = LongDayName ) const;
+- virtual QString weekDayName( const QDate &date, WeekDayNameFormat format = LongDayName ) const;
+-
+- virtual QString yearString( const QDate & pDate, StringFormat format = LongFormat ) const;
+- virtual QString monthString( const QDate &pDate, StringFormat format = LongFormat ) const;
+- virtual QString dayString( const QDate &pDate, StringFormat format = LongFormat ) const;
+-
+- virtual int yearStringToInteger( const QString &sNum, int &iLength ) const;
+- virtual int monthStringToInteger( const QString &sNum, int &iLength ) const;
+- virtual int dayStringToInteger( const QString &sNum, int &iLength ) const;
+-
+- virtual QString formatDate( const QDate &fromDate, KLocale::DateFormat toFormat = KLocale::LongDate ) const;
+-
+- virtual QDate readDate( const QString &str, bool *ok = 0 ) const;
+- virtual QDate readDate( const QString &dateString, const QString &dateFormat, bool *ok = 0 ) const;
+- virtual QDate readDate( const QString &str, KLocale::ReadDateFlags flags, bool *ok = 0 ) const;
+-
+- virtual int weekStartDay() const;
+- virtual int weekDayOfPray () const;
++ virtual int weekDayOfPray() const;
+
+ virtual bool isLunar() const;
+ virtual bool isLunisolar() const;
+@@ -109,15 +74,14 @@ public:
+ virtual bool isProleptic() const;
+
+ protected:
+- virtual bool julianDayToDate( int jd, int &year, int &month, int &day ) const;
+- virtual bool dateToJulianDay( int year, int month, int day, int &jd ) const;
+- KCalendarSystemHebrew( KCalendarSystemHebrewPrivate &dd,
+- const KSharedConfig::Ptr config = KSharedConfig::Ptr(),
+- const KLocale *locale = 0 );
++ virtual bool julianDayToDate(int jd, int &year, int &month, int &day) const;
++ virtual bool dateToJulianDay(int year, int month, int day, int &jd) const;
++ KCalendarSystemHebrew(KCalendarSystemHebrewPrivate &dd,
++ const KSharedConfig::Ptr config = KSharedConfig::Ptr(),
++ const KLocale *locale = 0);
+
+ private:
+- Q_DECLARE_PRIVATE( KCalendarSystemHebrew )
+- KCalendarSystemHebrewPrivate * const dont_use; // KDE5 remove, use shared d
++ Q_DECLARE_PRIVATE(KCalendarSystemHebrew)
+ };
+
+ #endif // KCALENDARSYSTEMHEBREW_H
+diff --git a/kdecore/date/kcalendarsystemhijri.cpp b/kdecore/date/kcalendarsystemhijri.cpp
+deleted file mode 100644
+index 2af04ea..0000000
+--- a/kdecore/date/kcalendarsystemhijri.cpp
++++ /dev/null
+@@ -1,741 +0,0 @@
+-/*
+- Copyright (c) 2002-2003 Carlos Moro <cfmoro@correo.uniovi.es>
+- Copyright (c) 2002-2003 Hans Petter Bieker <bieker@kde.org>
+- Copyright 2007, 2008, 2009, 2010 John Layt <john@layt.net>
+-
+- This library is free software; you can redistribute it and/or
+- modify it under the terms of the GNU Library General Public
+- License as published by the Free Software Foundation; either
+- version 2 of the License, or (at your option) any later version.
+-
+- This library is distributed in the hope that it will be useful,
+- but WITHOUT ANY WARRANTY; without even the implied warranty of
+- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+- Library General Public License for more details.
+-
+- You should have received a copy of the GNU Library General Public License
+- along with this library; see the file COPYING.LIB. If not, write to
+- the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+- Boston, MA 02110-1301, USA.
+-*/
+-
+-#include "kcalendarsystemhijri_p.h"
+-#include "kcalendarsystemprivate_p.h"
+-
+-#include <QtCore/QDate>
+-
+-class KCalendarSystemHijriPrivate : public KCalendarSystemPrivate
+-{
+-public:
+- explicit KCalendarSystemHijriPrivate( KCalendarSystemHijri *q );
+-
+- virtual ~KCalendarSystemHijriPrivate();
+-
+- // Virtual methods each calendar system must re-implement
+- virtual KLocale::CalendarSystem calendarSystem() const;
+- virtual void loadDefaultEraList();
+- virtual int monthsInYear( int year ) const;
+- virtual int daysInMonth( int year, int month ) const;
+- virtual int daysInYear( int year ) const;
+- virtual int daysInWeek() const;
+- virtual bool isLeapYear( int year ) const;
+- virtual bool hasLeapMonths() const;
+- virtual bool hasYearZero() const;
+- virtual int maxDaysInWeek() const;
+- virtual int maxMonthsInYear() const;
+- virtual int earliestValidYear() const;
+- virtual int latestValidYear() const;
+- virtual QString monthName( int month, int year, KLocale::DateTimeComponentFormat format, bool possessive ) const;
+- virtual QString weekDayName( int weekDay, KLocale::DateTimeComponentFormat format ) const;
+-};
+-
+-// Shared d pointer base class definitions
+-
+-KCalendarSystemHijriPrivate::KCalendarSystemHijriPrivate( KCalendarSystemHijri *q )
+- :KCalendarSystemPrivate( q )
+-{
+-}
+-
+-KCalendarSystemHijriPrivate::~KCalendarSystemHijriPrivate()
+-{
+-}
+-
+-KLocale::CalendarSystem KCalendarSystemHijriPrivate::calendarSystem() const
+-{
+- return KLocale::IslamicCivilCalendar;
+-}
+-
+-void KCalendarSystemHijriPrivate::loadDefaultEraList()
+-{
+- QString name, shortName, format;
+- // Islamic Era, Anno Hegirae, "Year of the Hijra".
+- name = i18nc( "Calendar Era: Hijri Islamic Era, years > 0, LongFormat", "Anno Hegirae" );
+- shortName = i18nc( "Calendar Era: Hijri Islamic Era, years > 0, ShortFormat", "AH" );
+- format = i18nc( "(kdedt-format) Hijri, AH, full era year format used for %EY, e.g. 2000 AH", "%Ey %EC" );
+- addEra( '+', 1, q->epoch(), 1, q->latestValidDate(), name, shortName, format );
+-}
+-
+-int KCalendarSystemHijriPrivate::monthsInYear( int year ) const
+-{
+- Q_UNUSED( year )
+- return 12;
+-}
+-
+-int KCalendarSystemHijriPrivate::daysInMonth( int year, int month ) const
+-{
+- if ( month == 12 && isLeapYear( year ) ) {
+- return 30;
+- }
+-
+- if ( month % 2 == 0 ) { // Even number months have 29 days
+- return 29;
+- } else { // Odd number months have 30 days
+- return 30;
+- }
+-}
+-
+-int KCalendarSystemHijriPrivate::daysInYear( int year ) const
+-{
+- if ( isLeapYear( year ) ) {
+- return 355;
+- } else {
+- return 354;
+- }
+-}
+-
+-int KCalendarSystemHijriPrivate::daysInWeek() const
+-{
+- return 7;
+-}
+-
+-bool KCalendarSystemHijriPrivate::isLeapYear( int year ) const
+-{
+- // Years 2, 5, 7, 10, 13, 16, 18, 21, 24, 26, 29 of the 30 year cycle
+-
+- /*
+- The following C++ code is translated from the Lisp code
+- in ``Calendrical Calculations'' by Nachum Dershowitz and
+- Edward M. Reingold, Software---Practice & Experience,
+- vol. 20, no. 9 (September, 1990), pp. 899--928.
+-
+- This code is in the public domain, but any use of it
+- should publically acknowledge its source.
+- */
+-
+- if ( ( ( ( 11 * year ) + 14 ) % 30 ) < 11 ) {
+- return true;
+- } else {
+- return false;
+- }
+-
+- // The following variations will be implemented in separate classes in 4.5
+- // May be cleaner to formally define using a case statement switch on (year % 30)
+-
+- // Variation used by Bar Habraeus / Graves / Birashk / Some Microsoft products
+- // Years 2, 5, 7, 10, 13, 15, 18, 21, 24, 26, 29 of the 30 year cycle
+- // if ( ( ( ( 11 * year ) + 15 ) % 30 ) < 11 ) {
+-
+- // Variation used by Bohras / Sahifa with epoch 15 July 622 jd = 1948440
+- // Years 2, 5, 8, 10, 13, 16, 19, 21, 24, 27, 29 of the 30 year cycle
+- // if ( ( ( ( 11 * year ) + 1 ) % 30 ) < 11 ) {
+-}
+-
+-bool KCalendarSystemHijriPrivate::hasLeapMonths() const
+-{
+- return false;
+-}
+-
+-bool KCalendarSystemHijriPrivate::hasYearZero() const
+-{
+- return false;
+-}
+-
+-int KCalendarSystemHijriPrivate::maxDaysInWeek() const
+-{
+- return 7;
+-}
+-
+-int KCalendarSystemHijriPrivate::maxMonthsInYear() const
+-{
+- return 12;
+-}
+-
+-int KCalendarSystemHijriPrivate::earliestValidYear() const
+-{
+- return 1;
+-}
+-
+-int KCalendarSystemHijriPrivate::latestValidYear() const
+-{
+- return 9999;
+-}
+-
+-QString KCalendarSystemHijriPrivate::monthName( int month, int year, KLocale::DateTimeComponentFormat format, bool possessive ) const
+-{
+- Q_UNUSED( year );
+-
+- if ( format == KLocale::NarrowName ) {
+- switch ( month ) {
+- case 1:
+- return ki18nc( "Hijri month 1 - KLocale::NarrowName", "M" ).toString( locale() );
+- case 2:
+- return ki18nc( "Hijri month 2 - KLocale::NarrowName", "S" ).toString( locale() );
+- case 3:
+- return ki18nc( "Hijri month 3 - KLocale::NarrowName", "A" ).toString( locale() );
+- case 4:
+- return ki18nc( "Hijri month 4 - KLocale::NarrowName", "T" ).toString( locale() );
+- case 5:
+- return ki18nc( "Hijri month 5 - KLocale::NarrowName", "A" ).toString( locale() );
+- case 6:
+- return ki18nc( "Hijri month 6 - KLocale::NarrowName", "T" ).toString( locale() );
+- case 7:
+- return ki18nc( "Hijri month 7 - KLocale::NarrowName", "R" ).toString( locale() );
+- case 8:
+- return ki18nc( "Hijri month 8 - KLocale::NarrowName", "S" ).toString( locale() );
+- case 9:
+- return ki18nc( "Hijri month 9 - KLocale::NarrowName", "R" ).toString( locale() );
+- case 10:
+- return ki18nc( "Hijri month 10 - KLocale::NarrowName", "S" ).toString( locale() );
+- case 11:
+- return ki18nc( "Hijri month 11 - KLocale::NarrowName", "Q" ).toString( locale() );
+- case 12:
+- return ki18nc( "Hijri month 12 - KLocale::NarrowName", "H" ).toString( locale() );
+- default:
+- return QString();
+- }
+- }
+-
+- if ( format == KLocale::ShortName && possessive ) {
+- switch ( month ) {
+- case 1:
+- return ki18nc( "Hijri month 1 - KLocale::ShortName Possessive", "of Muh" ).toString( locale() );
+- case 2:
+- return ki18nc( "Hijri month 2 - KLocale::ShortName Possessive", "of Saf" ).toString( locale() );
+- case 3:
+- return ki18nc( "Hijri month 3 - KLocale::ShortName Possessive", "of R.A" ).toString( locale() );
+- case 4:
+- return ki18nc( "Hijri month 4 - KLocale::ShortName Possessive", "of R.T" ).toString( locale() );
+- case 5:
+- return ki18nc( "Hijri month 5 - KLocale::ShortName Possessive", "of J.A" ).toString( locale() );
+- case 6:
+- return ki18nc( "Hijri month 6 - KLocale::ShortName Possessive", "of J.T" ).toString( locale() );
+- case 7:
+- return ki18nc( "Hijri month 7 - KLocale::ShortName Possessive", "of Raj" ).toString( locale() );
+- case 8:
+- return ki18nc( "Hijri month 8 - KLocale::ShortName Possessive", "of Sha" ).toString( locale() );
+- case 9:
+- return ki18nc( "Hijri month 9 - KLocale::ShortName Possessive", "of Ram" ).toString( locale() );
+- case 10:
+- return ki18nc( "Hijri month 10 - KLocale::ShortName Possessive", "of Shw" ).toString( locale() );
+- case 11:
+- return ki18nc( "Hijri month 11 - KLocale::ShortName Possessive", "of Qid" ).toString( locale() );
+- case 12:
+- return ki18nc( "Hijri month 12 - KLocale::ShortName Possessive", "of Hij" ).toString( locale() );
+- default:
+- return QString();
+- }
+- }
+-
+- if ( format == KLocale::ShortName && !possessive ) {
+- switch ( month ) {
+- case 1:
+- return ki18nc( "Hijri month 1 - KLocale::ShortName", "Muh" ).toString( locale() );
+- case 2:
+- return ki18nc( "Hijri month 2 - KLocale::ShortName", "Saf" ).toString( locale() );
+- case 3:
+- return ki18nc( "Hijri month 3 - KLocale::ShortName", "R.A" ).toString( locale() );
+- case 4:
+- return ki18nc( "Hijri month 4 - KLocale::ShortName", "R.T" ).toString( locale() );
+- case 5:
+- return ki18nc( "Hijri month 5 - KLocale::ShortName", "J.A" ).toString( locale() );
+- case 6:
+- return ki18nc( "Hijri month 6 - KLocale::ShortName", "J.T" ).toString( locale() );
+- case 7:
+- return ki18nc( "Hijri month 7 - KLocale::ShortName", "Raj" ).toString( locale() );
+- case 8:
+- return ki18nc( "Hijri month 8 - KLocale::ShortName", "Sha" ).toString( locale() );
+- case 9:
+- return ki18nc( "Hijri month 9 - KLocale::ShortName", "Ram" ).toString( locale() );
+- case 10:
+- return ki18nc( "Hijri month 10 - KLocale::ShortName", "Shw" ).toString( locale() );
+- case 11:
+- return ki18nc( "Hijri month 11 - KLocale::ShortName", "Qid" ).toString( locale() );
+- case 12:
+- return ki18nc( "Hijri month 12 - KLocale::ShortName", "Hij" ).toString( locale() );
+- default:
+- return QString();
+- }
+- }
+-
+- if ( format == KLocale::LongName && possessive ) {
+- switch ( month ) {
+- case 1:
+- return ki18nc( "Hijri month 1 - KLocale::LongName Possessive", "of Muharram" ).toString( locale() );
+- case 2:
+- return ki18nc( "Hijri month 2 - KLocale::LongName Possessive", "of Safar" ).toString( locale() );
+- case 3:
+- return ki18nc( "Hijri month 3 - KLocale::LongName Possessive", "of Rabi` al-Awal" ).toString( locale() );
+- case 4:
+- return ki18nc( "Hijri month 4 - KLocale::LongName Possessive", "of Rabi` al-Thaani" ).toString( locale() );
+- case 5:
+- return ki18nc( "Hijri month 5 - KLocale::LongName Possessive", "of Jumaada al-Awal" ).toString( locale() );
+- case 6:
+- return ki18nc( "Hijri month 6 - KLocale::LongName Possessive", "of Jumaada al-Thaani" ).toString( locale() );
+- case 7:
+- return ki18nc( "Hijri month 7 - KLocale::LongName Possessive", "of Rajab" ).toString( locale() );
+- case 8:
+- return ki18nc( "Hijri month 8 - KLocale::LongName Possessive", "of Sha`ban" ).toString( locale() );
+- case 9:
+- return ki18nc( "Hijri month 9 - KLocale::LongName Possessive", "of Ramadan" ).toString( locale() );
+- case 10:
+- return ki18nc( "Hijri month 10 - KLocale::LongName Possessive", "of Shawwal" ).toString( locale() );
+- case 11:
+- return ki18nc( "Hijri month 11 - KLocale::LongName Possessive", "of Thu al-Qi`dah" ).toString( locale() );
+- case 12:
+- return ki18nc( "Hijri month 12 - KLocale::LongName Possessive", "of Thu al-Hijjah" ).toString( locale() );
+- default:
+- return QString();
+- }
+- }
+-
+- // Default to LongName
+- switch ( month ) {
+- case 1:
+- return ki18nc( "Hijri month 1 - KLocale::LongName", "Muharram" ).toString( locale() );
+- case 2:
+- return ki18nc( "Hijri month 2 - KLocale::LongName", "Safar" ).toString( locale() );
+- case 3:
+- return ki18nc( "Hijri month 3 - KLocale::LongName", "Rabi` al-Awal" ).toString( locale() );
+- case 4:
+- return ki18nc( "Hijri month 4 - KLocale::LongName", "Rabi` al-Thaani" ).toString( locale() );
+- case 5:
+- return ki18nc( "Hijri month 5 - KLocale::LongName", "Jumaada al-Awal" ).toString( locale() );
+- case 6:
+- return ki18nc( "Hijri month 6 - KLocale::LongName", "Jumaada al-Thaani" ).toString( locale() );
+- case 7:
+- return ki18nc( "Hijri month 7 - KLocale::LongName", "Rajab" ).toString( locale() );
+- case 8:
+- return ki18nc( "Hijri month 8 - KLocale::LongName", "Sha`ban" ).toString( locale() );
+- case 9:
+- return ki18nc( "Hijri month 9 - KLocale::LongName", "Ramadan" ).toString( locale() );
+- case 10:
+- return ki18nc( "Hijri month 10 - KLocale::LongName", "Shawwal" ).toString( locale() );
+- case 11:
+- return ki18nc( "Hijri month 11 - KLocale::LongName", "Thu al-Qi`dah" ).toString( locale() );
+- case 12:
+- return ki18nc( "Hijri month 12 - KLocale::LongName", "Thu al-Hijjah" ).toString( locale() );
+- default:
+- return QString();
+- }
+-}
+-
+-QString KCalendarSystemHijriPrivate::weekDayName( int weekDay, KLocale::DateTimeComponentFormat format ) const
+-{
+- if ( format == KLocale::NarrowName ) {
+- switch ( weekDay ) {
+- case 1:
+- return ki18nc( "Hijri weekday 1 - KLocale::NarrowName ", "I" ).toString( locale() );
+- case 2:
+- return ki18nc( "Hijri weekday 2 - KLocale::NarrowName ", "T" ).toString( locale() );
+- case 3:
+- return ki18nc( "Hijri weekday 3 - KLocale::NarrowName ", "A" ).toString( locale() );
+- case 4:
+- return ki18nc( "Hijri weekday 4 - KLocale::NarrowName ", "K" ).toString( locale() );
+- case 5:
+- return ki18nc( "Hijri weekday 5 - KLocale::NarrowName ", "J" ).toString( locale() );
+- case 6:
+- return ki18nc( "Hijri weekday 6 - KLocale::NarrowName ", "S" ).toString( locale() );
+- case 7:
+- return ki18nc( "Hijri weekday 7 - KLocale::NarrowName ", "A" ).toString( locale() );
+- default:
+- return QString();
+- }
+- }
+-
+- if ( format == KLocale::ShortName || format == KLocale:: ShortNumber ) {
+- switch ( weekDay ) {
+- case 1:
+- return ki18nc( "Hijri weekday 1 - KLocale::ShortName", "Ith" ).toString( locale() );
+- case 2:
+- return ki18nc( "Hijri weekday 2 - KLocale::ShortName", "Thl" ).toString( locale() );
+- case 3:
+- return ki18nc( "Hijri weekday 3 - KLocale::ShortName", "Arb" ).toString( locale() );
+- case 4:
+- return ki18nc( "Hijri weekday 4 - KLocale::ShortName", "Kha" ).toString( locale() );
+- case 5:
+- return ki18nc( "Hijri weekday 5 - KLocale::ShortName", "Jum" ).toString( locale() );
+- case 6:
+- return ki18nc( "Hijri weekday 6 - KLocale::ShortName", "Sab" ).toString( locale() );
+- case 7:
+- return ki18nc( "Hijri weekday 7 - KLocale::ShortName", "Ahd" ).toString( locale() );
+- default: return QString();
+- }
+- }
+-
+- switch ( weekDay ) {
+- case 1:
+- return ki18nc( "Hijri weekday 1 - KLocale::LongName", "Yaum al-Ithnain" ).toString( locale() );
+- case 2:
+- return ki18nc( "Hijri weekday 2 - KLocale::LongName", "Yau al-Thulatha" ).toString( locale() );
+- case 3:
+- return ki18nc( "Hijri weekday 3 - KLocale::LongName", "Yaum al-Arbi'a" ).toString( locale() );
+- case 4:
+- return ki18nc( "Hijri weekday 4 - KLocale::LongName", "Yaum al-Khamees" ).toString( locale() );
+- case 5:
+- return ki18nc( "Hijri weekday 5 - KLocale::LongName", "Yaum al-Jumma" ).toString( locale() );
+- case 6:
+- return ki18nc( "Hijri weekday 6 - KLocale::LongName", "Yaum al-Sabt" ).toString( locale() );
+- case 7:
+- return ki18nc( "Hijri weekday 7 - KLocale::LongName", "Yaum al-Ahad" ).toString( locale() );
+- default:
+- return QString();
+- }
+-}
+-
+-
+-KCalendarSystemHijri::KCalendarSystemHijri( const KLocale *locale )
+- : KCalendarSystem( *new KCalendarSystemHijriPrivate( this ), KSharedConfig::Ptr(), locale ),
+- dont_use( 0 )
+-{
+- d_ptr->loadConfig( calendarType() );
+-}
+-
+-KCalendarSystemHijri::KCalendarSystemHijri( const KSharedConfig::Ptr config, const KLocale *locale )
+- : KCalendarSystem( *new KCalendarSystemHijriPrivate( this ), config, locale ),
+- dont_use( 0 )
+-{
+- d_ptr->loadConfig( calendarType() );
+-}
+-
+-KCalendarSystemHijri::KCalendarSystemHijri( KCalendarSystemHijriPrivate &dd,
+- const KSharedConfig::Ptr config, const KLocale *locale )
+- : KCalendarSystem( dd, config, locale ),
+- dont_use( 0 )
+-{
+- d_ptr->loadConfig( calendarType() );
+-}
+-
+-KCalendarSystemHijri::~KCalendarSystemHijri()
+-{
+- delete dont_use;
+-}
+-
+-QString KCalendarSystemHijri::calendarType() const
+-{
+- return QLatin1String( "hijri" );
+-}
+-
+-QDate KCalendarSystemHijri::epoch() const
+-{
+- // 16 July 622 in the Julian calendar
+- return QDate::fromJulianDay( 1948440 );
+-}
+-
+-QDate KCalendarSystemHijri::earliestValidDate() const
+-{
+- return epoch();
+-}
+-
+-QDate KCalendarSystemHijri::latestValidDate() const
+-{
+- // Set to last day of year 9999
+- // Last day of Hijri year 9999 is 9999-12-29
+- return QDate::fromJulianDay( 5491751 );
+-}
+-
+-bool KCalendarSystemHijri::isValid( int year, int month, int day ) const
+-{
+- return KCalendarSystem::isValid( year, month, day );
+-}
+-
+-bool KCalendarSystemHijri::isValid( const QDate &date ) const
+-{
+- return KCalendarSystem::isValid( date );
+-}
+-
+-bool KCalendarSystemHijri::setDate( QDate &date, int year, int month, int day ) const
+-{
+- return KCalendarSystem::setDate( date, year, month, day );
+-}
+-
+-// Deprecated
+-bool KCalendarSystemHijri::setYMD( QDate &date, int year, int month, int day ) const
+-{
+- return KCalendarSystem::setYMD( date, year, month, day );
+-}
+-
+-int KCalendarSystemHijri::year( const QDate &date ) const
+-{
+- return KCalendarSystem::year( date );
+-}
+-
+-int KCalendarSystemHijri::month( const QDate &date ) const
+-{
+- return KCalendarSystem::month( date );
+-}
+-
+-int KCalendarSystemHijri::day( const QDate &date ) const
+-{
+- return KCalendarSystem::day( date );
+-}
+-
+-QDate KCalendarSystemHijri::addYears( const QDate &date, int nyears ) const
+-{
+- return KCalendarSystem::addYears( date, nyears );
+-}
+-
+-QDate KCalendarSystemHijri::addMonths( const QDate &date, int nmonths ) const
+-{
+- return KCalendarSystem::addMonths( date, nmonths );
+-}
+-
+-QDate KCalendarSystemHijri::addDays( const QDate &date, int ndays ) const
+-{
+- return KCalendarSystem::addDays( date, ndays );
+-}
+-
+-int KCalendarSystemHijri::monthsInYear( const QDate &date ) const
+-{
+- return KCalendarSystem::monthsInYear( date );
+-}
+-
+-int KCalendarSystemHijri::weeksInYear( const QDate &date ) const
+-{
+- return KCalendarSystem::weeksInYear( date );
+-}
+-
+-int KCalendarSystemHijri::weeksInYear( int year ) const
+-{
+- return KCalendarSystem::weeksInYear( year );
+-}
+-
+-int KCalendarSystemHijri::daysInYear( const QDate &date ) const
+-{
+- return KCalendarSystem::daysInYear( date );
+-}
+-
+-int KCalendarSystemHijri::daysInMonth( const QDate &date ) const
+-{
+- return KCalendarSystem::daysInMonth( date );
+-}
+-
+-int KCalendarSystemHijri::daysInWeek( const QDate &date ) const
+-{
+- return KCalendarSystem::daysInWeek( date );
+-}
+-
+-int KCalendarSystemHijri::dayOfYear( const QDate &date ) const
+-{
+- return KCalendarSystem::dayOfYear( date );
+-}
+-
+-int KCalendarSystemHijri::dayOfWeek( const QDate &date ) const
+-{
+- return KCalendarSystem::dayOfWeek( date );
+-}
+-
+-int KCalendarSystemHijri::weekNumber( const QDate &date, int *yearNum ) const
+-{
+- return KCalendarSystem::weekNumber( date, yearNum );
+-}
+-
+-bool KCalendarSystemHijri::isLeapYear( int year ) const
+-{
+- return KCalendarSystem::isLeapYear( year );
+-}
+-
+-bool KCalendarSystemHijri::isLeapYear( const QDate &date ) const
+-{
+- return KCalendarSystem::isLeapYear( date );
+-}
+-
+-QString KCalendarSystemHijri::monthName( int month, int year, MonthNameFormat format ) const
+-{
+- return KCalendarSystem::monthName( month, year, format );
+-}
+-
+-QString KCalendarSystemHijri::monthName( const QDate &date, MonthNameFormat format ) const
+-{
+- return KCalendarSystem::monthName( date, format );
+-}
+-
+-QString KCalendarSystemHijri::weekDayName( int weekDay, WeekDayNameFormat format ) const
+-{
+- return KCalendarSystem::weekDayName( weekDay, format );
+-}
+-
+-QString KCalendarSystemHijri::weekDayName( const QDate &date, WeekDayNameFormat format ) const
+-{
+- return KCalendarSystem::weekDayName( date, format );
+-}
+-
+-QString KCalendarSystemHijri::yearString( const QDate &pDate, StringFormat format ) const
+-{
+- return KCalendarSystem::yearString( pDate, format );
+-}
+-
+-QString KCalendarSystemHijri::monthString( const QDate &pDate, StringFormat format ) const
+-{
+- return KCalendarSystem::monthString( pDate, format );
+-}
+-
+-QString KCalendarSystemHijri::dayString( const QDate &pDate, StringFormat format ) const
+-{
+- return KCalendarSystem::dayString( pDate, format );
+-}
+-
+-int KCalendarSystemHijri::yearStringToInteger( const QString &sNum, int &iLength ) const
+-{
+- return KCalendarSystem::yearStringToInteger( sNum, iLength );
+-}
+-
+-int KCalendarSystemHijri::monthStringToInteger( const QString &sNum, int &iLength ) const
+-{
+- return KCalendarSystem::monthStringToInteger( sNum, iLength );
+-}
+-
+-int KCalendarSystemHijri::dayStringToInteger( const QString &sNum, int &iLength ) const
+-{
+- return KCalendarSystem::dayStringToInteger( sNum, iLength );
+-}
+-
+-QString KCalendarSystemHijri::formatDate( const QDate &date, KLocale::DateFormat format ) const
+-{
+- return KCalendarSystem::formatDate( date, format );
+-}
+-
+-QDate KCalendarSystemHijri::readDate( const QString &str, bool *ok ) const
+-{
+- return KCalendarSystem::readDate( str, ok );
+-}
+-
+-QDate KCalendarSystemHijri::readDate( const QString &intstr, const QString &fmt, bool *ok ) const
+-{
+- return KCalendarSystem::readDate( intstr, fmt, ok );
+-}
+-
+-QDate KCalendarSystemHijri::readDate( const QString &str, KLocale::ReadDateFlags flags, bool *ok ) const
+-{
+- return KCalendarSystem::readDate( str, flags, ok );
+-}
+-
+-int KCalendarSystemHijri::weekStartDay() const
+-{
+- return KCalendarSystem::weekStartDay();
+-}
+-
+-int KCalendarSystemHijri::weekDayOfPray() const
+-{
+- return 5; // Friday
+-}
+-
+-bool KCalendarSystemHijri::isLunar() const
+-{
+- return true;
+-}
+-
+-bool KCalendarSystemHijri::isLunisolar() const
+-{
+- return false;
+-}
+-
+-bool KCalendarSystemHijri::isSolar() const
+-{
+- return false;
+-}
+-
+-bool KCalendarSystemHijri::isProleptic() const
+-{
+- return false;
+-}
+-
+-bool KCalendarSystemHijri::julianDayToDate( int jd, int &year, int &month, int &day ) const
+-{
+- Q_D( const KCalendarSystemHijri );
+-
+- /*
+- The following C++ code is translated from the Lisp code
+- in ``Calendrical Calculations'' by Nachum Dershowitz and
+- Edward M. Reingold, Software---Practice & Experience,
+- vol. 20, no. 9 (September, 1990), pp. 899--928.
+-
+- This code is in the public domain, but any use of it
+- should publically acknowledge its source.
+- */
+-
+- // Search forward year by year from approximate year
+- year = ( jd - epoch().toJulianDay() ) / 355;
+- int testJd;
+- dateToJulianDay( year, 12, d->daysInMonth( year, 12 ), testJd );
+- while ( jd > testJd ) {
+- year++;
+- dateToJulianDay( year, 12, d->daysInMonth( year, 12 ), testJd );
+- }
+-
+- // Search forward month by month from Muharram
+- month = 1;
+- dateToJulianDay( year, month, d->daysInMonth( year, month ), testJd );
+- while ( jd > testJd ) {
+- month++;
+- dateToJulianDay( year, month, d->daysInMonth( year, month ), testJd );
+- }
+-
+- dateToJulianDay( year, month, 1, testJd );
+- day = jd - testJd + 1;
+-
+- return true;
+-
+- // Alternative implementations
+-
+- // More recent editions of "Calendrical Calculations" by Dershowitz & Reingold have a more
+- // efficient direct calculation without recusrion, but this cannot be used due to licensing
+-
+- /*
+- Formula from "Explanatory Supplement to the Astronomical Almanac" 2006, derived from Fliegel & Van Flandern 1968
+- int L = jd - epoch().toJulianDay() + 10632;
+- int N = ( L - 1 ) / 10631;
+- L = L - 10631 * N + 354;
+- int J = ( ( 10985 - L ) / 5316 ) x ( ( 50* L ) / 17719 ) + ( L / 5670 ) * ( ( 43 * L ) / 15238 );
+- L = L - ( ( 30 - J ) / 15 ) * ( ( 17719 * J ) / 50 ) - ( J / 16 ) * ( ( 15238 * J ) / 43 ) + 29;
+- year = ( 30 * N ) + J - 30;
+- month = ( 24 * L ) / 709;
+- day = L - ( ( 709 * month ) / 24 );
+- */
+-
+- /*
+- Formula from Fourmilab website
+- jd = Math.floor(jd) + 0.5;
+- year = Math.floor(((30 * (jd - epoch().toJulianDay())) + 10646) / 10631);
+- month = qMin(12, Math.ceil((jd - (29 + islamic_to_jd(year, 1, 1))) / 29.5) + 1);
+- day = (jd - islamic_to_jd(year, month, 1)) + 1;
+- */
+-}
+-
+-bool KCalendarSystemHijri::dateToJulianDay( int year, int month, int day, int &jd ) const
+-{
+- /*
+- The following C++ code is translated from the Lisp code
+- in ``Calendrical Calculations'' by Nachum Dershowitz and
+- Edward M. Reingold, Software---Practice & Experience,
+- vol. 20, no. 9 (September, 1990), pp. 899--928.
+-
+- This code is in the public domain, but any use of it
+- should publically acknowledge its source.
+- */
+-
+- jd = epoch().toJulianDay() - 1 + // days before start of calendar
+- ( year - 1 ) * 354 + // non-leap days in prior years
+- ( 3 + ( 11 * year ) ) / 30 + // leap days in prior years
+- 29 * ( month - 1 ) + // days so far...
+- month / 2 + // ...this year
+- day; // days so far this month
+-
+- return true;
+-
+- // Alternative implementations
+-
+- /*
+- Formula from "Explanatory Supplement to the Astronomical Almanac" 2006, derived from Fliegel & Van Flandern 1968
+- jd = ( 3 + ( 11 * year ) ) / 30 + 354 * year + 30 * month - ( month - 1 ) / 2 + day + epoch().toJulianDay() - 385;
+- */
+-}
+diff --git a/kdecore/date/kcalendarsystemhijri_p.h b/kdecore/date/kcalendarsystemhijri_p.h
+deleted file mode 100644
+index 8204683..0000000
+--- a/kdecore/date/kcalendarsystemhijri_p.h
++++ /dev/null
+@@ -1,124 +0,0 @@
+-/*
+- Copyright (c) 2002 Carlos Moro <cfmoro@correo.uniovi.es>
+- Copyright (c) 2002-2003 Hans Petter Bieker <bieker@kde.org>
+- Copyright 2007, 2010 John Layt <john@layt.net>
+-
+- This library is free software; you can redistribute it and/or
+- modify it under the terms of the GNU Library General Public
+- License as published by the Free Software Foundation; either
+- version 2 of the License, or (at your option) any later version.
+-
+- This library is distributed in the hope that it will be useful,
+- but WITHOUT ANY WARRANTY; without even the implied warranty of
+- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+- Library General Public License for more details.
+-
+- You should have received a copy of the GNU Library General Public License
+- along with this library; see the file COPYING.LIB. If not, write to
+- the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+- Boston, MA 02110-1301, USA.
+-*/
+-
+-#ifndef KCALENDARSYSTEMHIJRI_H
+-#define KCALENDARSYSTEMHIJRI_H
+-
+-#include "kcalendarsystem.h"
+-
+-class KCalendarSystemHijriPrivate;
+-
+-/**
+- * @internal
+- * This is the Hijri calendar implementation.
+- *
+- * The Hijri calendar is the traditional Islamic calendar used in the Middle
+- * East.
+- *
+- * @b license GNU-LGPL v2+
+- *
+- * @see KLocale,KCalendarSystem
+- *
+- * @author Carlos Moro <cfmoro@correo.uniovi.es>
+- */
+-class KCalendarSystemHijri : public KCalendarSystem
+-{
+-public:
+- explicit KCalendarSystemHijri( const KLocale *locale = 0 );
+- explicit KCalendarSystemHijri( const KSharedConfig::Ptr config, const KLocale *locale = 0 );
+- virtual ~KCalendarSystemHijri();
+-
+- virtual QString calendarType() const;
+-
+- virtual QDate epoch() const;
+- virtual QDate earliestValidDate() const;
+- virtual QDate latestValidDate() const;
+- virtual bool isValid( int year, int month, int day ) const;
+- virtual bool isValid( const QDate &date ) const;
+-
+- virtual bool setDate( QDate &date, int year, int month, int day ) const;
+- /** @deprecated */
+- virtual bool setYMD( QDate &date, int year, int month, int day ) const;
+-
+- virtual int year( const QDate &date ) const;
+- virtual int month( const QDate &date ) const;
+- virtual int day( const QDate &date ) const;
+-
+- virtual QDate addYears( const QDate &date, int nyears ) const;
+- virtual QDate addMonths( const QDate &date, int nmonths ) const;
+- virtual QDate addDays( const QDate &date, int ndays ) const;
+-
+- virtual int monthsInYear( const QDate &date ) const;
+- virtual int weeksInYear( const QDate &date ) const;
+- virtual int weeksInYear( int year ) const;
+- virtual int daysInYear( const QDate &date ) const;
+- virtual int daysInMonth( const QDate &date ) const;
+- virtual int daysInWeek( const QDate &date ) const;
+-
+- virtual int dayOfYear( const QDate &date ) const;
+- virtual int dayOfWeek( const QDate &date ) const;
+-
+- virtual int weekNumber( const QDate &date, int *yearNum = 0 ) const;
+-
+- virtual bool isLeapYear( int year ) const;
+- virtual bool isLeapYear( const QDate &date ) const;
+-
+- virtual QString monthName( int month, int year, MonthNameFormat format = LongName ) const;
+- virtual QString monthName( const QDate &date, MonthNameFormat format = LongName ) const;
+-
+- virtual QString weekDayName( int weekDay, WeekDayNameFormat format = LongDayName ) const;
+- virtual QString weekDayName( const QDate &date, WeekDayNameFormat format = LongDayName ) const;
+-
+- virtual QString yearString( const QDate & pDate, StringFormat format = LongFormat ) const;
+- virtual QString monthString( const QDate &pDate, StringFormat format = LongFormat ) const;
+- virtual QString dayString( const QDate &pDate, StringFormat format = LongFormat ) const;
+-
+- virtual int yearStringToInteger( const QString &sNum, int &iLength ) const;
+- virtual int monthStringToInteger( const QString &sNum, int &iLength ) const;
+- virtual int dayStringToInteger( const QString &sNum, int &iLength ) const;
+-
+- virtual QString formatDate( const QDate &fromDate, KLocale::DateFormat toFormat = KLocale::LongDate ) const;
+-
+- virtual QDate readDate( const QString &str, bool *ok = 0 ) const;
+- virtual QDate readDate( const QString &dateString, const QString &dateFormat, bool *ok = 0 ) const;
+- virtual QDate readDate( const QString &str, KLocale::ReadDateFlags flags, bool *ok = 0 ) const;
+-
+- virtual int weekStartDay() const;
+- virtual int weekDayOfPray () const;
+-
+- virtual bool isLunar() const;
+- virtual bool isLunisolar() const;
+- virtual bool isSolar() const;
+- virtual bool isProleptic() const;
+-
+-protected:
+- virtual bool julianDayToDate( int jd, int &year, int &month, int &day ) const;
+- virtual bool dateToJulianDay( int year, int month, int day, int &jd ) const;
+- KCalendarSystemHijri( KCalendarSystemHijriPrivate &dd,
+- const KSharedConfig::Ptr config = KSharedConfig::Ptr(),
+- const KLocale *locale = 0 );
+-
+-private:
+- Q_DECLARE_PRIVATE( KCalendarSystemHijri )
+- KCalendarSystemHijriPrivate * const dont_use; // KDE5 remove, use shared d
+-};
+-
+-#endif // KCALENDARSYSTEMHIJRI_H
+diff --git a/kdecore/date/kcalendarsystemindiannational.cpp b/kdecore/date/kcalendarsystemindiannational.cpp
+index 2bd3643..f5b79f2 100644
+--- a/kdecore/date/kcalendarsystemindiannational.cpp
++++ b/kdecore/date/kcalendarsystemindiannational.cpp
+@@ -29,32 +29,32 @@
+ class KCalendarSystemIndianNationalPrivate : public KCalendarSystemPrivate
+ {
+ public:
+- explicit KCalendarSystemIndianNationalPrivate( KCalendarSystemIndianNational *q );
++ explicit KCalendarSystemIndianNationalPrivate(KCalendarSystemIndianNational *q);
+
+ virtual ~KCalendarSystemIndianNationalPrivate();
+
+ // Virtual methods each calendar system must re-implement
+ virtual KLocale::CalendarSystem calendarSystem() const;
+ virtual void loadDefaultEraList();
+- virtual int monthsInYear( int year ) const;
+- virtual int daysInMonth( int year, int month ) const;
+- virtual int daysInYear( int year ) const;
++ virtual int monthsInYear(int year) const;
++ virtual int daysInMonth(int year, int month) const;
++ virtual int daysInYear(int year) const;
+ virtual int daysInWeek() const;
+- virtual bool isLeapYear( int year ) const;
++ virtual bool isLeapYear(int year) const;
+ virtual bool hasLeapMonths() const;
+ virtual bool hasYearZero() const;
+ virtual int maxDaysInWeek() const;
+ virtual int maxMonthsInYear() const;
+ virtual int earliestValidYear() const;
+ virtual int latestValidYear() const;
+- virtual QString monthName( int month, int year, KLocale::DateTimeComponentFormat format, bool possessive ) const;
+- virtual QString weekDayName( int weekDay, KLocale::DateTimeComponentFormat format ) const;
++ virtual QString monthName(int month, int year, KLocale::DateTimeComponentFormat format, bool possessive) const;
++ virtual QString weekDayName(int weekDay, KLocale::DateTimeComponentFormat format) const;
+ };
+
+ // Shared d pointer base class definitions
+
+-KCalendarSystemIndianNationalPrivate::KCalendarSystemIndianNationalPrivate( KCalendarSystemIndianNational *q )
+- :KCalendarSystemPrivate( q )
++KCalendarSystemIndianNationalPrivate::KCalendarSystemIndianNationalPrivate(KCalendarSystemIndianNational *q)
++ : KCalendarSystemPrivate(q)
+ {
+ }
+
+@@ -71,38 +71,38 @@ void KCalendarSystemIndianNationalPrivate::loadDefaultEraList()
+ {
+ QString name, shortName, format;
+ // Saka Era
+- name = i18nc( "Calendar Era: Indian National Saka Era, years > 0, LongFormat", "Saka Era" );
+- shortName = i18nc( "Calendar Era: Indian National Saka Era, years > 0, ShortFormat", "SE" );
+- format = i18nc( "(kdedt-format) Indian National, SE, full era year format used for %EY, e.g. 2000 SE", "%Ey %EC" );
+- addEra( '+', 1, q->epoch(), 1, q->latestValidDate(), name, shortName, format );
++ name = i18nc("Calendar Era: Indian National Saka Era, years > 0, LongFormat", "Saka Era");
++ shortName = i18nc("Calendar Era: Indian National Saka Era, years > 0, ShortFormat", "SE");
++ format = i18nc("(kdedt-format) Indian National, SE, full era year format used for %EY, e.g. 2000 SE", "%Ey %EC");
++ addEra('+', 1, q->epoch(), 1, q->latestValidDate(), name, shortName, format);
+ }
+
+-int KCalendarSystemIndianNationalPrivate::monthsInYear( int year ) const
++int KCalendarSystemIndianNationalPrivate::monthsInYear(int year) const
+ {
+- Q_UNUSED( year )
++ Q_UNUSED(year)
+ return 12;
+ }
+
+-int KCalendarSystemIndianNationalPrivate::daysInMonth( int year, int month ) const
++int KCalendarSystemIndianNationalPrivate::daysInMonth(int year, int month) const
+ {
+- if ( month == 1 ) {
+- if ( isLeapYear( year ) ) {
++ if (month == 1) {
++ if (isLeapYear(year)) {
+ return 31;
+ } else {
+ return 30;
+ }
+ }
+
+- if ( month >= 2 && month <= 6 ) {
++ if (month >= 2 && month <= 6) {
+ return 31;
+ }
+
+ return 30;
+ }
+
+-int KCalendarSystemIndianNationalPrivate::daysInYear( int year ) const
++int KCalendarSystemIndianNationalPrivate::daysInYear(int year) const
+ {
+- if ( isLeapYear( year ) ) {
++ if (isLeapYear(year)) {
+ return 366;
+ } else {
+ return 365;
+@@ -114,19 +114,19 @@ int KCalendarSystemIndianNationalPrivate::daysInWeek() const
+ return 7;
+ }
+
+-bool KCalendarSystemIndianNationalPrivate::isLeapYear( int year ) const
++bool KCalendarSystemIndianNationalPrivate::isLeapYear(int year) const
+ {
+ //Uses same rule as Gregorian, and is explicitly synchronized to Gregorian
+ //so add 78 years to get Gregorian year and apply Gregorian calculation
+ year = year + 78;
+- if ( !hasYearZero() && year < 1 ) {
++ if (!hasYearZero() && year < 1) {
+ year = year + 1;
+ }
+
+- if ( year % 4 == 0 ) {
+- if ( year % 100 != 0 ) {
++ if (year % 4 == 0) {
++ if (year % 100 != 0) {
+ return true;
+- } else if ( year % 400 == 0 ) {
++ } else if (year % 400 == 0) {
+ return true;
+ }
+ }
+@@ -164,267 +164,263 @@ int KCalendarSystemIndianNationalPrivate::latestValidYear() const
+ return 9999;
+ }
+
+-QString KCalendarSystemIndianNationalPrivate::monthName( int month, int year, KLocale::DateTimeComponentFormat format, bool possessive ) const
++QString KCalendarSystemIndianNationalPrivate::monthName(int month, int year, KLocale::DateTimeComponentFormat format, bool possessive) const
+ {
+- Q_UNUSED( year );
++ Q_UNUSED(year);
+
+- if ( format == KLocale::NarrowName ) {
+- switch ( month ) {
++ if (format == KLocale::NarrowName) {
++ switch (month) {
+ case 1:
+- return ki18nc( "Indian National month 1 - KLocale::NarrowName", "C" ).toString( locale() );
++ return ki18nc("Indian National month 1 - KLocale::NarrowName", "C").toString(locale());
+ case 2:
+- return ki18nc( "Indian National month 2 - KLocale::NarrowName", "V" ).toString( locale() );
++ return ki18nc("Indian National month 2 - KLocale::NarrowName", "V").toString(locale());
+ case 3:
+- return ki18nc( "Indian National month 3 - KLocale::NarrowName", "J" ).toString( locale() );
++ return ki18nc("Indian National month 3 - KLocale::NarrowName", "J").toString(locale());
+ case 4:
+- return ki18nc( "Indian National month 4 - KLocale::NarrowName", "Ā" ).toString( locale() );
++ return ki18nc("Indian National month 4 - KLocale::NarrowName", "Ā").toString(locale());
+ case 5:
+- return ki18nc( "Indian National month 5 - KLocale::NarrowName", "S" ).toString( locale() );
++ return ki18nc("Indian National month 5 - KLocale::NarrowName", "S").toString(locale());
+ case 6:
+- return ki18nc( "Indian National month 6 - KLocale::NarrowName", "B" ).toString( locale() );
++ return ki18nc("Indian National month 6 - KLocale::NarrowName", "B").toString(locale());
+ case 7:
+- return ki18nc( "Indian National month 7 - KLocale::NarrowName", "Ā" ).toString( locale() );
++ return ki18nc("Indian National month 7 - KLocale::NarrowName", "Ā").toString(locale());
+ case 8:
+- return ki18nc( "Indian National month 8 - KLocale::NarrowName", "K" ).toString( locale() );
++ return ki18nc("Indian National month 8 - KLocale::NarrowName", "K").toString(locale());
+ case 9:
+- return ki18nc( "Indian National month 9 - KLocale::NarrowName", "A" ).toString( locale() );
++ return ki18nc("Indian National month 9 - KLocale::NarrowName", "A").toString(locale());
+ case 10:
+- return ki18nc( "Indian National month 10 - KLocale::NarrowName", "P" ).toString( locale() );
++ return ki18nc("Indian National month 10 - KLocale::NarrowName", "P").toString(locale());
+ case 11:
+- return ki18nc( "Indian National month 11 - KLocale::NarrowName", "M" ).toString( locale() );
++ return ki18nc("Indian National month 11 - KLocale::NarrowName", "M").toString(locale());
+ case 12:
+- return ki18nc( "Indian National month 12 - KLocale::NarrowName", "P" ).toString( locale() );
++ return ki18nc("Indian National month 12 - KLocale::NarrowName", "P").toString(locale());
+ default:
+ return QString();
+ }
+ }
+
+- if ( format == KLocale::ShortName && possessive ) {
+- switch ( month ) {
++ if (format == KLocale::ShortName && possessive) {
++ switch (month) {
+ case 1:
+- return ki18nc( "Indian National month 1 - KLocale::ShortName Possessive", "of Cha" ).toString( locale() );
++ return ki18nc("Indian National month 1 - KLocale::ShortName Possessive", "of Cha").toString(locale());
+ case 2:
+- return ki18nc( "Indian National month 2 - KLocale::ShortName Possessive", "of Vai" ).toString( locale() );
++ return ki18nc("Indian National month 2 - KLocale::ShortName Possessive", "of Vai").toString(locale());
+ case 3:
+- return ki18nc( "Indian National month 3 - KLocale::ShortName Possessive", "of Jya" ).toString( locale() );
++ return ki18nc("Indian National month 3 - KLocale::ShortName Possessive", "of Jya").toString(locale());
+ case 4:
+- return ki18nc( "Indian National month 4 - KLocale::ShortName Possessive", "of Āsh" ).toString( locale() );
++ return ki18nc("Indian National month 4 - KLocale::ShortName Possessive", "of Āsh").toString(locale());
+ case 5:
+- return ki18nc( "Indian National month 5 - KLocale::ShortName Possessive", "of Shr" ).toString( locale() );
++ return ki18nc("Indian National month 5 - KLocale::ShortName Possessive", "of Shr").toString(locale());
+ case 6:
+- return ki18nc( "Indian National month 6 - KLocale::ShortName Possessive", "of Bhā" ).toString( locale() );
++ return ki18nc("Indian National month 6 - KLocale::ShortName Possessive", "of Bhā").toString(locale());
+ case 7:
+- return ki18nc( "Indian National month 7 - KLocale::ShortName Possessive", "of Āsw" ).toString( locale() );
++ return ki18nc("Indian National month 7 - KLocale::ShortName Possessive", "of Āsw").toString(locale());
+ case 8:
+- return ki18nc( "Indian National month 8 - KLocale::ShortName Possessive", "of Kār" ).toString( locale() );
++ return ki18nc("Indian National month 8 - KLocale::ShortName Possessive", "of Kār").toString(locale());
+ case 9:
+- return ki18nc( "Indian National month 9 - KLocale::ShortName Possessive", "of Agr" ).toString( locale() );
++ return ki18nc("Indian National month 9 - KLocale::ShortName Possessive", "of Agr").toString(locale());
+ case 10:
+- return ki18nc( "Indian National month 10 - KLocale::ShortName Possessive", "of Pau" ).toString( locale() );
++ return ki18nc("Indian National month 10 - KLocale::ShortName Possessive", "of Pau").toString(locale());
+ case 11:
+- return ki18nc( "Indian National month 11 - KLocale::ShortName Possessive", "of Māg" ).toString( locale() );
++ return ki18nc("Indian National month 11 - KLocale::ShortName Possessive", "of Māg").toString(locale());
+ case 12:
+- return ki18nc( "Indian National month 12 - KLocale::ShortName Possessive", "of Phā" ).toString( locale() );
++ return ki18nc("Indian National month 12 - KLocale::ShortName Possessive", "of Phā").toString(locale());
+ default:
+ return QString();
+ }
+ }
+
+- if ( format == KLocale::ShortName && !possessive ) {
+- switch ( month ) {
++ if (format == KLocale::ShortName && !possessive) {
++ switch (month) {
+ case 1:
+- return ki18nc( "Indian National month 1 - KLocale::ShortName", "Cha" ).toString( locale() );
++ return ki18nc("Indian National month 1 - KLocale::ShortName", "Cha").toString(locale());
+ case 2:
+- return ki18nc( "Indian National month 2 - KLocale::ShortName", "Vai" ).toString( locale() );
++ return ki18nc("Indian National month 2 - KLocale::ShortName", "Vai").toString(locale());
+ case 3:
+- return ki18nc( "Indian National month 3 - KLocale::ShortName", "Jya" ).toString( locale() );
++ return ki18nc("Indian National month 3 - KLocale::ShortName", "Jya").toString(locale());
+ case 4:
+- return ki18nc( "Indian National month 4 - KLocale::ShortName", "Āsh" ).toString( locale() );
++ return ki18nc("Indian National month 4 - KLocale::ShortName", "Āsh").toString(locale());
+ case 5:
+- return ki18nc( "Indian National month 5 - KLocale::ShortName", "Shr" ).toString( locale() );
++ return ki18nc("Indian National month 5 - KLocale::ShortName", "Shr").toString(locale());
+ case 6:
+- return ki18nc( "Indian National month 6 - KLocale::ShortName", "Bhā" ).toString( locale() );
++ return ki18nc("Indian National month 6 - KLocale::ShortName", "Bhā").toString(locale());
+ case 7:
+- return ki18nc( "Indian National month 7 - KLocale::ShortName", "Āsw" ).toString( locale() );
++ return ki18nc("Indian National month 7 - KLocale::ShortName", "Āsw").toString(locale());
+ case 8:
+- return ki18nc( "Indian National month 8 - KLocale::ShortName", "Kār" ).toString( locale() );
++ return ki18nc("Indian National month 8 - KLocale::ShortName", "Kār").toString(locale());
+ case 9:
+- return ki18nc( "Indian National month 9 - KLocale::ShortName", "Agr" ).toString( locale() );
++ return ki18nc("Indian National month 9 - KLocale::ShortName", "Agr").toString(locale());
+ case 10:
+- return ki18nc( "Indian National month 10 - KLocale::ShortName", "Pau" ).toString( locale() );
++ return ki18nc("Indian National month 10 - KLocale::ShortName", "Pau").toString(locale());
+ case 11:
+- return ki18nc( "Indian National month 11 - KLocale::ShortName", "Māg" ).toString( locale() );
++ return ki18nc("Indian National month 11 - KLocale::ShortName", "Māg").toString(locale());
+ case 12:
+- return ki18nc( "Indian National month 12 - KLocale::ShortName", "Phā" ).toString( locale() );
++ return ki18nc("Indian National month 12 - KLocale::ShortName", "Phā").toString(locale());
+ default:
+ return QString();
+ }
+ }
+
+- if ( format == KLocale::LongName && possessive ) {
+- switch ( month ) {
++ if (format == KLocale::LongName && possessive) {
++ switch (month) {
+ case 1:
+- return ki18nc( "Indian National month 1 - KLocale::LongName Possessive", "of Chaitra" ).toString( locale() );
++ return ki18nc("Indian National month 1 - KLocale::LongName Possessive", "of Chaitra").toString(locale());
+ case 2:
+- return ki18nc( "Indian National month 2 - KLocale::LongName Possessive", "of Vaishākh" ).toString( locale() );
++ return ki18nc("Indian National month 2 - KLocale::LongName Possessive", "of Vaishākh").toString(locale());
+ case 3:
+- return ki18nc( "Indian National month 3 - KLocale::LongName Possessive", "of Jyaishtha" ).toString( locale() );
++ return ki18nc("Indian National month 3 - KLocale::LongName Possessive", "of Jyaishtha").toString(locale());
+ case 4:
+- return ki18nc( "Indian National month 4 - KLocale::LongName Possessive", "of Āshādha" ).toString( locale() );
++ return ki18nc("Indian National month 4 - KLocale::LongName Possessive", "of Āshādha").toString(locale());
+ case 5:
+- return ki18nc( "Indian National month 5 - KLocale::LongName Possessive", "of Shrāvana" ).toString( locale() );
++ return ki18nc("Indian National month 5 - KLocale::LongName Possessive", "of Shrāvana").toString(locale());
+ case 6:
+- return ki18nc( "Indian National month 6 - KLocale::LongName Possessive", "of Bhādrapad" ).toString( locale() );
++ return ki18nc("Indian National month 6 - KLocale::LongName Possessive", "of Bhādrapad").toString(locale());
+ case 7:
+- return ki18nc( "Indian National month 7 - KLocale::LongName Possessive", "of Āshwin" ).toString( locale() );
++ return ki18nc("Indian National month 7 - KLocale::LongName Possessive", "of Āshwin").toString(locale());
+ case 8:
+- return ki18nc( "Indian National month 8 - KLocale::LongName Possessive", "of Kārtik" ).toString( locale() );
++ return ki18nc("Indian National month 8 - KLocale::LongName Possessive", "of Kārtik").toString(locale());
+ case 9:
+- return ki18nc( "Indian National month 9 - KLocale::LongName Possessive", "of Agrahayana" ).toString( locale() );
++ return ki18nc("Indian National month 9 - KLocale::LongName Possessive", "of Agrahayana").toString(locale());
+ case 10:
+- return ki18nc( "Indian National month 10 - KLocale::LongName Possessive", "of Paush" ).toString( locale() );
++ return ki18nc("Indian National month 10 - KLocale::LongName Possessive", "of Paush").toString(locale());
+ case 11:
+- return ki18nc( "Indian National month 11 - KLocale::LongName Possessive", "of Māgh" ).toString( locale() );
++ return ki18nc("Indian National month 11 - KLocale::LongName Possessive", "of Māgh").toString(locale());
+ case 12:
+- return ki18nc( "Indian National month 12 - KLocale::LongName Possessive", "of Phālgun" ).toString( locale() );
++ return ki18nc("Indian National month 12 - KLocale::LongName Possessive", "of Phālgun").toString(locale());
+ default:
+ return QString();
+ }
+ }
+
+ // Default to LongName
+- switch ( month ) {
++ switch (month) {
+ case 1:
+- return ki18nc( "Indian National month 1 - KLocale::LongName", "Chaitra" ).toString( locale() );
++ return ki18nc("Indian National month 1 - KLocale::LongName", "Chaitra").toString(locale());
+ case 2:
+- return ki18nc( "Indian National month 2 - KLocale::LongName", "Vaishākh" ).toString( locale() );
++ return ki18nc("Indian National month 2 - KLocale::LongName", "Vaishākh").toString(locale());
+ case 3:
+- return ki18nc( "Indian National month 3 - KLocale::LongName", "Jyaishtha" ).toString( locale() );
++ return ki18nc("Indian National month 3 - KLocale::LongName", "Jyaishtha").toString(locale());
+ case 4:
+- return ki18nc( "Indian National month 4 - KLocale::LongName", "Āshādha" ).toString( locale() );
++ return ki18nc("Indian National month 4 - KLocale::LongName", "Āshādha").toString(locale());
+ case 5:
+- return ki18nc( "Indian National month 5 - KLocale::LongName", "Shrāvana" ).toString( locale() );
++ return ki18nc("Indian National month 5 - KLocale::LongName", "Shrāvana").toString(locale());
+ case 6:
+- return ki18nc( "Indian National month 6 - KLocale::LongName", "Bhādrapad" ).toString( locale() );
++ return ki18nc("Indian National month 6 - KLocale::LongName", "Bhādrapad").toString(locale());
+ case 7:
+- return ki18nc( "Indian National month 7 - KLocale::LongName", "Āshwin" ).toString( locale() );
++ return ki18nc("Indian National month 7 - KLocale::LongName", "Āshwin").toString(locale());
+ case 8:
+- return ki18nc( "Indian National month 8 - KLocale::LongName", "Kārtik" ).toString( locale() );
++ return ki18nc("Indian National month 8 - KLocale::LongName", "Kārtik").toString(locale());
+ case 9:
+- return ki18nc( "Indian National month 9 - KLocale::LongName", "Agrahayana" ).toString( locale() );
++ return ki18nc("Indian National month 9 - KLocale::LongName", "Agrahayana").toString(locale());
+ case 10:
+- return ki18nc( "Indian National month 10 - KLocale::LongName", "Paush" ).toString( locale() );
++ return ki18nc("Indian National month 10 - KLocale::LongName", "Paush").toString(locale());
+ case 11:
+- return ki18nc( "Indian National month 11 - KLocale::LongName", "Māgh" ).toString( locale() );
++ return ki18nc("Indian National month 11 - KLocale::LongName", "Māgh").toString(locale());
+ case 12:
+- return ki18nc( "Indian National month 12 - KLocale::LongName", "Phālgun" ).toString( locale() );
++ return ki18nc("Indian National month 12 - KLocale::LongName", "Phālgun").toString(locale());
+ default:
+ return QString();
+ }
+ }
+
+-QString KCalendarSystemIndianNationalPrivate::weekDayName( int weekDay, KLocale::DateTimeComponentFormat format ) const
++QString KCalendarSystemIndianNationalPrivate::weekDayName(int weekDay, KLocale::DateTimeComponentFormat format) const
+ {
+- if ( format == KLocale::NarrowName ) {
+- switch ( weekDay ) {
++ if (format == KLocale::NarrowName) {
++ switch (weekDay) {
+ case 1:
+- return ki18nc( "Indian National weekday 1 - KLocale::NarrowName ", "S" ).toString( locale() );
++ return ki18nc("Indian National weekday 1 - KLocale::NarrowName ", "S").toString(locale());
+ case 2:
+- return ki18nc( "Indian National weekday 2 - KLocale::NarrowName ", "M" ).toString( locale() );
++ return ki18nc("Indian National weekday 2 - KLocale::NarrowName ", "M").toString(locale());
+ case 3:
+- return ki18nc( "Indian National weekday 3 - KLocale::NarrowName ", "B" ).toString( locale() );
++ return ki18nc("Indian National weekday 3 - KLocale::NarrowName ", "B").toString(locale());
+ case 4:
+- return ki18nc( "Indian National weekday 4 - KLocale::NarrowName ", "G" ).toString( locale() );
++ return ki18nc("Indian National weekday 4 - KLocale::NarrowName ", "G").toString(locale());
+ case 5:
+- return ki18nc( "Indian National weekday 5 - KLocale::NarrowName ", "S" ).toString( locale() );
++ return ki18nc("Indian National weekday 5 - KLocale::NarrowName ", "S").toString(locale());
+ case 6:
+- return ki18nc( "Indian National weekday 6 - KLocale::NarrowName ", "S" ).toString( locale() );
++ return ki18nc("Indian National weekday 6 - KLocale::NarrowName ", "S").toString(locale());
+ case 7:
+- return ki18nc( "Indian National weekday 7 - KLocale::NarrowName ", "R" ).toString( locale() );
++ return ki18nc("Indian National weekday 7 - KLocale::NarrowName ", "R").toString(locale());
+ default:
+ return QString();
+ }
+ }
+
+- if ( format == KLocale::ShortName || format == KLocale:: ShortNumber ) {
+- switch ( weekDay ) {
++ if (format == KLocale::ShortName || format == KLocale:: ShortNumber) {
++ switch (weekDay) {
+ case 1:
+- return ki18nc( "Indian National weekday 1 - KLocale::ShortName", "Som" ).toString( locale() );
++ return ki18nc("Indian National weekday 1 - KLocale::ShortName", "Som").toString(locale());
+ case 2:
+- return ki18nc( "Indian National weekday 2 - KLocale::ShortName", "Mañ" ).toString( locale() );
++ return ki18nc("Indian National weekday 2 - KLocale::ShortName", "Mañ").toString(locale());
+ case 3:
+- return ki18nc( "Indian National weekday 3 - KLocale::ShortName", "Bud" ).toString( locale() );
++ return ki18nc("Indian National weekday 3 - KLocale::ShortName", "Bud").toString(locale());
+ case 4:
+- return ki18nc( "Indian National weekday 4 - KLocale::ShortName", "Gur" ).toString( locale() );
++ return ki18nc("Indian National weekday 4 - KLocale::ShortName", "Gur").toString(locale());
+ case 5:
+- return ki18nc( "Indian National weekday 5 - KLocale::ShortName", "Suk" ).toString( locale() );
++ return ki18nc("Indian National weekday 5 - KLocale::ShortName", "Suk").toString(locale());
+ case 6:
+- return ki18nc( "Indian National weekday 6 - KLocale::ShortName", "San" ).toString( locale() );
++ return ki18nc("Indian National weekday 6 - KLocale::ShortName", "San").toString(locale());
+ case 7:
+- return ki18nc( "Indian National weekday 7 - KLocale::ShortName", "Rav" ).toString( locale() );
++ return ki18nc("Indian National weekday 7 - KLocale::ShortName", "Rav").toString(locale());
+ default: return QString();
+ }
+ }
+
+- switch ( weekDay ) {
++ switch (weekDay) {
+ case 1:
+- return ki18nc( "Indian National weekday 1 - KLocale::LongName", "Somavãra" ).toString( locale() );
++ return ki18nc("Indian National weekday 1 - KLocale::LongName", "Somavãra").toString(locale());
+ case 2:
+- return ki18nc( "Indian National weekday 2 - KLocale::LongName", "Mañgalvã" ).toString( locale() );
++ return ki18nc("Indian National weekday 2 - KLocale::LongName", "Mañgalvã").toString(locale());
+ case 3:
+- return ki18nc( "Indian National weekday 3 - KLocale::LongName", "Budhavãra" ).toString( locale() );
++ return ki18nc("Indian National weekday 3 - KLocale::LongName", "Budhavãra").toString(locale());
+ case 4:
+- return ki18nc( "Indian National weekday 4 - KLocale::LongName", "Guruvãra" ).toString( locale() );
++ return ki18nc("Indian National weekday 4 - KLocale::LongName", "Guruvãra").toString(locale());
+ case 5:
+- return ki18nc( "Indian National weekday 5 - KLocale::LongName", "Sukravãra" ).toString( locale() );
++ return ki18nc("Indian National weekday 5 - KLocale::LongName", "Sukravãra").toString(locale());
+ case 6:
+- return ki18nc( "Indian National weekday 6 - KLocale::LongName", "Sanivãra" ).toString( locale() );
++ return ki18nc("Indian National weekday 6 - KLocale::LongName", "Sanivãra").toString(locale());
+ case 7:
+- return ki18nc( "Indian National weekday 7 - KLocale::LongName", "Raviãra" ).toString( locale() );
++ return ki18nc("Indian National weekday 7 - KLocale::LongName", "Raviãra").toString(locale());
+ default:
+ return QString();
+ }
+ }
+
+
+-KCalendarSystemIndianNational::KCalendarSystemIndianNational( const KLocale *locale )
+- : KCalendarSystem( *new KCalendarSystemIndianNationalPrivate( this ), KSharedConfig::Ptr(), locale ),
+- dont_use( 0 )
++KCalendarSystemIndianNational::KCalendarSystemIndianNational(const KLocale *locale)
++ : KCalendarSystem(*new KCalendarSystemIndianNationalPrivate(this), KSharedConfig::Ptr(), locale)
+ {
+- d_ptr->loadConfig( calendarType() );
++ d_ptr->loadConfig(calendarType());
+ }
+
+-KCalendarSystemIndianNational::KCalendarSystemIndianNational( const KSharedConfig::Ptr config, const KLocale *locale )
+- : KCalendarSystem( *new KCalendarSystemIndianNationalPrivate( this ), config, locale ),
+- dont_use( 0 )
++KCalendarSystemIndianNational::KCalendarSystemIndianNational(const KSharedConfig::Ptr config, const KLocale *locale)
++ : KCalendarSystem(*new KCalendarSystemIndianNationalPrivate(this), config, locale)
+ {
+- d_ptr->loadConfig( calendarType() );
++ d_ptr->loadConfig(calendarType());
+ }
+
+-KCalendarSystemIndianNational::KCalendarSystemIndianNational( KCalendarSystemIndianNationalPrivate &dd,
+- const KSharedConfig::Ptr config,
+- const KLocale *locale )
+- : KCalendarSystem( dd, config, locale ),
+- dont_use( 0 )
++KCalendarSystemIndianNational::KCalendarSystemIndianNational(KCalendarSystemIndianNationalPrivate &dd,
++ const KSharedConfig::Ptr config,
++ const KLocale *locale)
++ : KCalendarSystem(dd, config, locale)
+ {
+- d_ptr->loadConfig( calendarType() );
++ d_ptr->loadConfig(calendarType());
+ }
+
+ KCalendarSystemIndianNational::~KCalendarSystemIndianNational()
+ {
+- delete dont_use;
+ }
+
+ QString KCalendarSystemIndianNational::calendarType() const
+ {
+- return QLatin1String( "indian-national" );
++ return QLatin1String("indian-national");
+ }
+
+ QDate KCalendarSystemIndianNational::epoch() const
+ {
+ //0000-01-01, has Year 0.
+ //0078-03-22 AD Gregorian / 0078-03-24 AD Julian
+- return QDate::fromJulianDay( 1749994 );
++ return QDate::fromJulianDay(1749994);
+ }
+
+ QDate KCalendarSystemIndianNational::earliestValidDate() const
+@@ -432,7 +428,7 @@ QDate KCalendarSystemIndianNational::earliestValidDate() const
+ //0000-01-01, has Year 0.
+ //0078-03-22 AD Gregorian / 0078-03-24 AD Julian
+ //Don't do proleptic yet, need to check
+- return QDate::fromJulianDay( 1749630 );
++ return QDate::fromJulianDay(1749630);
+ }
+
+ QDate KCalendarSystemIndianNational::latestValidDate() const
+@@ -440,188 +436,47 @@ QDate KCalendarSystemIndianNational::latestValidDate() const
+ // Set to last day of year 9999 until confirm date formats & widgets support > 9999
+ //9999-12-30
+ //10078-03-21 AD Gregorian
+- return QDate::fromJulianDay( 5402054 );
++ return QDate::fromJulianDay(5402054);
+ }
+
+-bool KCalendarSystemIndianNational::isValid( int year, int month, int day ) const
++bool KCalendarSystemIndianNational::isValid(int year, int month, int day) const
+ {
+- return KCalendarSystem::isValid( year, month, day );
++ return KCalendarSystem::isValid(year, month, day);
+ }
+
+-bool KCalendarSystemIndianNational::isValid( const QDate &date ) const
++bool KCalendarSystemIndianNational::isValid(const QDate &date) const
+ {
+- return KCalendarSystem::isValid( date );
++ return KCalendarSystem::isValid(date);
+ }
+
+-bool KCalendarSystemIndianNational::setDate( QDate &date, int year, int month, int day ) const
++bool KCalendarSystemIndianNational::isLeapYear(int year) const
+ {
+- return KCalendarSystem::setDate( date, year, month, day );
++ return KCalendarSystem::isLeapYear(year);
+ }
+
+-// Deprecated
+-bool KCalendarSystemIndianNational::setYMD( QDate &date, int y, int m, int d ) const
++bool KCalendarSystemIndianNational::isLeapYear(const QDate &date) const
+ {
+- return KCalendarSystem::setDate( date, y, m, d );
++ return KCalendarSystem::isLeapYear(date);
+ }
+
+-int KCalendarSystemIndianNational::year( const QDate &date ) const
++QString KCalendarSystemIndianNational::monthName(int month, int year, MonthNameFormat format) const
+ {
+- return KCalendarSystem::year( date );
++ return KCalendarSystem::monthName(month, year, format);
+ }
+
+-int KCalendarSystemIndianNational::month( const QDate &date ) const
++QString KCalendarSystemIndianNational::monthName(const QDate &date, MonthNameFormat format) const
+ {
+- return KCalendarSystem::month( date );
++ return KCalendarSystem::monthName(date, format);
+ }
+
+-int KCalendarSystemIndianNational::day( const QDate &date ) const
++QString KCalendarSystemIndianNational::weekDayName(int weekDay, WeekDayNameFormat format) const
+ {
+- return KCalendarSystem::day( date );
++ return KCalendarSystem::weekDayName(weekDay, format);
+ }
+
+-QDate KCalendarSystemIndianNational::addYears( const QDate &date, int nyears ) const
++QString KCalendarSystemIndianNational::weekDayName(const QDate &date, WeekDayNameFormat format) const
+ {
+- return KCalendarSystem::addYears( date, nyears );
+-}
+-
+-QDate KCalendarSystemIndianNational::addMonths( const QDate &date, int nmonths ) const
+-{
+- return KCalendarSystem::addMonths( date, nmonths );
+-}
+-
+-QDate KCalendarSystemIndianNational::addDays( const QDate &date, int ndays ) const
+-{
+- return KCalendarSystem::addDays( date, ndays );
+-}
+-
+-int KCalendarSystemIndianNational::monthsInYear( const QDate &date ) const
+-{
+- return KCalendarSystem::monthsInYear( date );
+-}
+-
+-int KCalendarSystemIndianNational::weeksInYear( const QDate &date ) const
+-{
+- return KCalendarSystem::weeksInYear( date );
+-}
+-
+-int KCalendarSystemIndianNational::weeksInYear( int year ) const
+-{
+- return KCalendarSystem::weeksInYear( year );
+-}
+-
+-int KCalendarSystemIndianNational::daysInYear( const QDate &date ) const
+-{
+- return KCalendarSystem::daysInYear( date );
+-}
+-
+-int KCalendarSystemIndianNational::daysInMonth( const QDate &date ) const
+-{
+- return KCalendarSystem::daysInMonth( date );
+-}
+-
+-int KCalendarSystemIndianNational::daysInWeek( const QDate &date ) const
+-{
+- return KCalendarSystem::daysInWeek( date );
+-}
+-
+-int KCalendarSystemIndianNational::dayOfYear( const QDate &date ) const
+-{
+- return KCalendarSystem::dayOfYear( date );
+-}
+-
+-int KCalendarSystemIndianNational::dayOfWeek( const QDate &date ) const
+-{
+- return KCalendarSystem::dayOfWeek( date );
+-}
+-
+-int KCalendarSystemIndianNational::weekNumber( const QDate &date, int * yearNum ) const
+-{
+- return KCalendarSystem::weekNumber( date, yearNum );
+-}
+-
+-bool KCalendarSystemIndianNational::isLeapYear( int year ) const
+-{
+- return KCalendarSystem::isLeapYear( year );
+-}
+-
+-bool KCalendarSystemIndianNational::isLeapYear( const QDate &date ) const
+-{
+- return KCalendarSystem::isLeapYear( date );
+-}
+-
+-QString KCalendarSystemIndianNational::monthName( int month, int year, MonthNameFormat format ) const
+-{
+- return KCalendarSystem::monthName( month, year, format );
+-}
+-
+-QString KCalendarSystemIndianNational::monthName( const QDate &date, MonthNameFormat format ) const
+-{
+- return KCalendarSystem::monthName( date, format );
+-}
+-
+-QString KCalendarSystemIndianNational::weekDayName( int weekDay, WeekDayNameFormat format ) const
+-{
+- return KCalendarSystem::weekDayName( weekDay, format );
+-}
+-
+-QString KCalendarSystemIndianNational::weekDayName( const QDate &date, WeekDayNameFormat format ) const
+-{
+- return KCalendarSystem::weekDayName( date, format );
+-}
+-
+-QString KCalendarSystemIndianNational::yearString( const QDate &pDate, StringFormat format ) const
+-{
+- return KCalendarSystem::yearString( pDate, format );
+-}
+-
+-QString KCalendarSystemIndianNational::monthString( const QDate &pDate, StringFormat format ) const
+-{
+- return KCalendarSystem::monthString( pDate, format );
+-}
+-
+-QString KCalendarSystemIndianNational::dayString( const QDate &pDate, StringFormat format ) const
+-{
+- return KCalendarSystem::dayString( pDate, format );
+-}
+-
+-int KCalendarSystemIndianNational::yearStringToInteger( const QString &sNum, int &iLength ) const
+-{
+- return KCalendarSystem::yearStringToInteger( sNum, iLength );
+-}
+-
+-int KCalendarSystemIndianNational::monthStringToInteger( const QString &sNum, int &iLength ) const
+-{
+- return KCalendarSystem::monthStringToInteger( sNum, iLength );
+-}
+-
+-int KCalendarSystemIndianNational::dayStringToInteger( const QString &sNum, int &iLength ) const
+-{
+- return KCalendarSystem::dayStringToInteger( sNum, iLength );
+-}
+-
+-QString KCalendarSystemIndianNational::formatDate( const QDate &date, KLocale::DateFormat format ) const
+-{
+- return KCalendarSystem::formatDate( date, format );
+-}
+-
+-QDate KCalendarSystemIndianNational::readDate( const QString &str, bool *ok ) const
+-{
+- return KCalendarSystem::readDate( str, ok );
+-}
+-
+-QDate KCalendarSystemIndianNational::readDate( const QString &intstr, const QString &fmt, bool *ok ) const
+-{
+- return KCalendarSystem::readDate( intstr, fmt, ok );
+-}
+-
+-QDate KCalendarSystemIndianNational::readDate( const QString &str, KLocale::ReadDateFlags flags, bool *ok ) const
+-{
+- return KCalendarSystem::readDate( str, flags, ok );
+-}
+-
+-int KCalendarSystemIndianNational::weekStartDay() const
+-{
+- return KCalendarSystem::weekStartDay();
++ return KCalendarSystem::weekDayName(date, format);
+ }
+
+ int KCalendarSystemIndianNational::weekDayOfPray() const
+@@ -649,22 +504,22 @@ bool KCalendarSystemIndianNational::isProleptic() const
+ return false;
+ }
+
+-bool KCalendarSystemIndianNational::julianDayToDate( int jd, int &year, int &month, int &day ) const
++bool KCalendarSystemIndianNational::julianDayToDate(int jd, int &year, int &month, int &day) const
+ {
+ int L, N, I, J, D, M, Y;
+
+ // "Explanatory Supplement to the Astronomical Almanac" 2006 section 12.94 pp 605-606
+ // Originally from "Report of the Calendar Reform Committee" 1955
+ L = jd + 68518;
+- N = ( 4 * L ) / 146097;
+- L = L - ( 146097 * N + 3 ) / 4;
+- I = ( 4000 * ( L + 1 ) ) / 1461001;
+- L = L - ( 1461 * I ) / 4 + 1;
+- J = ( ( L - 1 ) / 31 ) * ( 1 - L / 185 ) + ( L / 185 ) * ( ( L - 156 ) / 30 + 5 ) - L / 366;
+- D = L - 31 * J + ( ( J + 2 ) / 8 ) * ( J - 5 );
++ N = (4 * L) / 146097;
++ L = L - (146097 * N + 3) / 4;
++ I = (4000 * (L + 1)) / 1461001;
++ L = L - (1461 * I) / 4 + 1;
++ J = ((L - 1) / 31) * (1 - L / 185) + (L / 185) * ((L - 156) / 30 + 5) - L / 366;
++ D = L - 31 * J + ((J + 2) / 8) * (J - 5);
+ L = J / 11;
+ M = J + 2 - 12 * L;
+- Y = 100 * ( N - 49 ) + L + I - 78;
++ Y = 100 * (N - 49) + L + I - 78;
+
+ day = D;
+ month = M;
+@@ -673,7 +528,7 @@ bool KCalendarSystemIndianNational::julianDayToDate( int jd, int &year, int &mon
+ return true;
+ }
+
+-bool KCalendarSystemIndianNational::dateToJulianDay( int year, int month, int day, int &jd ) const
++bool KCalendarSystemIndianNational::dateToJulianDay(int year, int month, int day, int &jd) const
+ {
+ int Y = year;
+ int M = month;
+@@ -682,11 +537,11 @@ bool KCalendarSystemIndianNational::dateToJulianDay( int year, int month, int da
+ // "Explanatory Supplement to the Astronomical Almanac" 2006 section 12.94 pp 605-606
+ // Originally from "Report of the Calendar Reform Committee" 1955
+ jd = 365 * Y
+- + ( Y + 78 - 1 / M ) / 4
++ + (Y + 78 - 1 / M) / 4
+ + 31 * M
+- - ( M + 9 ) / 11
+- - ( M / 7 ) * ( M - 7 )
+- - ( 3 * ( ( Y + 78 - 1 / M ) / 100 + 1 ) ) / 4
++ - (M + 9) / 11
++ - (M / 7) * (M - 7)
++ - (3 * ((Y + 78 - 1 / M) / 100 + 1)) / 4
+ + D
+ + 1749579;
+
+diff --git a/kdecore/date/kcalendarsystemindiannational_p.h b/kdecore/date/kcalendarsystemindiannational_p.h
+index 7399a39..0e8e036 100644
+--- a/kdecore/date/kcalendarsystemindiannational_p.h
++++ b/kdecore/date/kcalendarsystemindiannational_p.h
+@@ -41,8 +41,8 @@ class KCalendarSystemIndianNationalPrivate;
+ class KCalendarSystemIndianNational: public KCalendarSystem
+ {
+ public:
+- explicit KCalendarSystemIndianNational( const KLocale *locale = 0 );
+- explicit KCalendarSystemIndianNational( const KSharedConfig::Ptr config, const KLocale *locale = 0 );
++ explicit KCalendarSystemIndianNational(const KLocale *locale = 0);
++ explicit KCalendarSystemIndianNational(const KSharedConfig::Ptr config, const KLocale *locale = 0);
+ virtual ~KCalendarSystemIndianNational();
+
+ virtual QString calendarType() const;
+@@ -50,58 +50,19 @@ public:
+ virtual QDate epoch() const;
+ virtual QDate earliestValidDate() const;
+ virtual QDate latestValidDate() const;
+- virtual bool isValid( int year, int month, int day ) const;
+- virtual bool isValid( const QDate &date ) const;
++ virtual bool isValid(int year, int month, int day) const;
++ virtual bool isValid(const QDate &date) const;
+
+- virtual bool setDate( QDate &date, int year, int month, int day ) const;
+- /** @deprecated */
+- virtual bool setYMD( QDate &date, int year, int month, int day ) const;
++ virtual bool isLeapYear(int year) const;
++ virtual bool isLeapYear(const QDate &date) const;
+
+- virtual int year( const QDate &date ) const;
+- virtual int month( const QDate &date ) const;
+- virtual int day( const QDate &date ) const;
++ virtual QString monthName(int month, int year, MonthNameFormat format = LongName) const;
++ virtual QString monthName(const QDate &date, MonthNameFormat format = LongName) const;
+
+- virtual QDate addYears( const QDate &date, int nyears ) const;
+- virtual QDate addMonths( const QDate &date, int nmonths ) const;
+- virtual QDate addDays( const QDate &date, int ndays ) const;
++ virtual QString weekDayName(int weekDay, WeekDayNameFormat format = LongDayName) const;
++ virtual QString weekDayName(const QDate &date, WeekDayNameFormat format = LongDayName) const;
+
+- virtual int monthsInYear( const QDate &date ) const;
+- virtual int weeksInYear( const QDate &date ) const;
+- virtual int weeksInYear( int year ) const;
+- virtual int daysInYear( const QDate &date ) const;
+- virtual int daysInMonth( const QDate &date ) const;
+- virtual int daysInWeek( const QDate &date ) const;
+-
+- virtual int dayOfYear( const QDate &date ) const;
+- virtual int dayOfWeek( const QDate &date ) const;
+-
+- virtual int weekNumber( const QDate &date, int *yearNum = 0 ) const;
+-
+- virtual bool isLeapYear( int year ) const;
+- virtual bool isLeapYear( const QDate &date ) const;
+-
+- virtual QString monthName( int month, int year, MonthNameFormat format = LongName ) const;
+- virtual QString monthName( const QDate &date, MonthNameFormat format = LongName ) const;
+-
+- virtual QString weekDayName( int weekDay, WeekDayNameFormat format = LongDayName ) const;
+- virtual QString weekDayName( const QDate &date, WeekDayNameFormat format = LongDayName ) const;
+-
+- virtual QString yearString( const QDate & pDate, StringFormat format = LongFormat ) const;
+- virtual QString monthString( const QDate &pDate, StringFormat format = LongFormat ) const;
+- virtual QString dayString( const QDate &pDate, StringFormat format = LongFormat ) const;
+-
+- virtual int yearStringToInteger( const QString &sNum, int &iLength ) const;
+- virtual int monthStringToInteger( const QString &sNum, int &iLength ) const;
+- virtual int dayStringToInteger( const QString &sNum, int &iLength ) const;
+-
+- virtual QString formatDate( const QDate &fromDate, KLocale::DateFormat toFormat = KLocale::LongDate ) const;
+-
+- virtual QDate readDate( const QString &str, bool *ok = 0 ) const;
+- virtual QDate readDate( const QString &dateString, const QString &dateFormat, bool *ok = 0 ) const;
+- virtual QDate readDate( const QString &str, KLocale::ReadDateFlags flags, bool *ok = 0 ) const;
+-
+- virtual int weekStartDay() const;
+- virtual int weekDayOfPray () const;
++ virtual int weekDayOfPray() const;
+
+ virtual bool isLunar() const;
+ virtual bool isLunisolar() const;
+@@ -109,15 +70,14 @@ public:
+ virtual bool isProleptic() const;
+
+ protected:
+- virtual bool julianDayToDate( int jd, int &year, int &month, int &day ) const;
+- virtual bool dateToJulianDay( int year, int month, int day, int &jd ) const;
+- KCalendarSystemIndianNational( KCalendarSystemIndianNationalPrivate &dd,
+- const KSharedConfig::Ptr config = KSharedConfig::Ptr(),
+- const KLocale *locale = 0 );
++ virtual bool julianDayToDate(int jd, int &year, int &month, int &day) const;
++ virtual bool dateToJulianDay(int year, int month, int day, int &jd) const;
++ KCalendarSystemIndianNational(KCalendarSystemIndianNationalPrivate &dd,
++ const KSharedConfig::Ptr config = KSharedConfig::Ptr(),
++ const KLocale *locale = 0);
+
+ private:
+- Q_DECLARE_PRIVATE( KCalendarSystemIndianNational )
+- KCalendarSystemIndianNationalPrivate * const dont_use; // KDE5 remove, use shared d
++ Q_DECLARE_PRIVATE(KCalendarSystemIndianNational)
+ };
+
+ #endif // KCALENDARSYSTEMINDIANNATIONAL_H
+diff --git a/kdecore/date/kcalendarsystemislamiccivil.cpp b/kdecore/date/kcalendarsystemislamiccivil.cpp
+new file mode 100644
+index 0000000..053ec55
+--- /dev/null
++++ b/kdecore/date/kcalendarsystemislamiccivil.cpp
+@@ -0,0 +1,596 @@
++/*
++ Copyright (c) 2002-2003 Carlos Moro <cfmoro@correo.uniovi.es>
++ Copyright (c) 2002-2003 Hans Petter Bieker <bieker@kde.org>
++ Copyright 2007, 2008, 2009, 2010 John Layt <john@layt.net>
++
++ This library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Library General Public
++ License as published by the Free Software Foundation; either
++ version 2 of the License, or (at your option) any later version.
++
++ This library is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Library General Public License for more details.
++
++ You should have received a copy of the GNU Library General Public License
++ along with this library; see the file COPYING.LIB. If not, write to
++ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
++ Boston, MA 02110-1301, USA.
++*/
++
++#include "kcalendarsystemislamiccivil_p.h"
++#include "kcalendarsystemprivate_p.h"
++
++#include <QtCore/QDate>
++
++class KCalendarSystemIslamicCivilPrivate : public KCalendarSystemPrivate
++{
++public:
++ explicit KCalendarSystemIslamicCivilPrivate(KCalendarSystemIslamicCivil *q);
++
++ virtual ~KCalendarSystemIslamicCivilPrivate();
++
++ // Virtual methods each calendar system must re-implement
++ virtual KLocale::CalendarSystem calendarSystem() const;
++ virtual void loadDefaultEraList();
++ virtual int monthsInYear(int year) const;
++ virtual int daysInMonth(int year, int month) const;
++ virtual int daysInYear(int year) const;
++ virtual int daysInWeek() const;
++ virtual bool isLeapYear(int year) const;
++ virtual bool hasLeapMonths() const;
++ virtual bool hasYearZero() const;
++ virtual int maxDaysInWeek() const;
++ virtual int maxMonthsInYear() const;
++ virtual int earliestValidYear() const;
++ virtual int latestValidYear() const;
++ virtual QString monthName(int month, int year, KLocale::DateTimeComponentFormat format, bool possessive) const;
++ virtual QString weekDayName(int weekDay, KLocale::DateTimeComponentFormat format) const;
++};
++
++// Shared d pointer base class definitions
++
++KCalendarSystemIslamicCivilPrivate::KCalendarSystemIslamicCivilPrivate(KCalendarSystemIslamicCivil *q)
++ : KCalendarSystemPrivate(q)
++{
++}
++
++KCalendarSystemIslamicCivilPrivate::~KCalendarSystemIslamicCivilPrivate()
++{
++}
++
++KLocale::CalendarSystem KCalendarSystemIslamicCivilPrivate::calendarSystem() const
++{
++ return KLocale::IslamicCivilCalendar;
++}
++
++void KCalendarSystemIslamicCivilPrivate::loadDefaultEraList()
++{
++ QString name, shortName, format;
++ // Islamic Era, Anno Hegirae, "Year of the Hijra".
++ name = i18nc("Calendar Era: Hijri Islamic Era, years > 0, LongFormat", "Anno Hegirae");
++ shortName = i18nc("Calendar Era: Hijri Islamic Era, years > 0, ShortFormat", "AH");
++ format = i18nc("(kdedt-format) Hijri, AH, full era year format used for %EY, e.g. 2000 AH", "%Ey %EC");
++ addEra('+', 1, q->epoch(), 1, q->latestValidDate(), name, shortName, format);
++}
++
++int KCalendarSystemIslamicCivilPrivate::monthsInYear(int year) const
++{
++ Q_UNUSED(year)
++ return 12;
++}
++
++int KCalendarSystemIslamicCivilPrivate::daysInMonth(int year, int month) const
++{
++ if (month == 12 && isLeapYear(year)) {
++ return 30;
++ }
++
++ if (month % 2 == 0) { // Even number months have 29 days
++ return 29;
++ } else { // Odd number months have 30 days
++ return 30;
++ }
++}
++
++int KCalendarSystemIslamicCivilPrivate::daysInYear(int year) const
++{
++ if (isLeapYear(year)) {
++ return 355;
++ } else {
++ return 354;
++ }
++}
++
++int KCalendarSystemIslamicCivilPrivate::daysInWeek() const
++{
++ return 7;
++}
++
++bool KCalendarSystemIslamicCivilPrivate::isLeapYear(int year) const
++{
++ // Years 2, 5, 7, 10, 13, 16, 18, 21, 24, 26, 29 of the 30 year cycle
++
++ /*
++ The following C++ code is translated from the Lisp code
++ in ``Calendrical Calculations'' by Nachum Dershowitz and
++ Edward M. Reingold, Software---Practice & Experience,
++ vol. 20, no. 9 (September, 1990), pp. 899--928.
++
++ This code is in the public domain, but any use of it
++ should publically acknowledge its source.
++ */
++
++ if ((((11 * year) + 14) % 30) < 11) {
++ return true;
++ } else {
++ return false;
++ }
++
++ // The following variations will be implemented in separate classes in 4.5
++ // May be cleaner to formally define using a case statement switch on (year % 30)
++
++ // Variation used by Bar Habraeus / Graves / Birashk / Some Microsoft products
++ // Years 2, 5, 7, 10, 13, 15, 18, 21, 24, 26, 29 of the 30 year cycle
++ // if ( ( ( ( 11 * year ) + 15 ) % 30 ) < 11 ) {
++
++ // Variation used by Bohras / Sahifa with epoch 15 July 622 jd = 1948440
++ // Years 2, 5, 8, 10, 13, 16, 19, 21, 24, 27, 29 of the 30 year cycle
++ // if ( ( ( ( 11 * year ) + 1 ) % 30 ) < 11 ) {
++}
++
++bool KCalendarSystemIslamicCivilPrivate::hasLeapMonths() const
++{
++ return false;
++}
++
++bool KCalendarSystemIslamicCivilPrivate::hasYearZero() const
++{
++ return false;
++}
++
++int KCalendarSystemIslamicCivilPrivate::maxDaysInWeek() const
++{
++ return 7;
++}
++
++int KCalendarSystemIslamicCivilPrivate::maxMonthsInYear() const
++{
++ return 12;
++}
++
++int KCalendarSystemIslamicCivilPrivate::earliestValidYear() const
++{
++ return 1;
++}
++
++int KCalendarSystemIslamicCivilPrivate::latestValidYear() const
++{
++ return 9999;
++}
++
++QString KCalendarSystemIslamicCivilPrivate::monthName(int month, int year, KLocale::DateTimeComponentFormat format, bool possessive) const
++{
++ Q_UNUSED(year);
++
++ if (format == KLocale::NarrowName) {
++ switch (month) {
++ case 1:
++ return ki18nc("Hijri month 1 - KLocale::NarrowName", "M").toString(locale());
++ case 2:
++ return ki18nc("Hijri month 2 - KLocale::NarrowName", "S").toString(locale());
++ case 3:
++ return ki18nc("Hijri month 3 - KLocale::NarrowName", "A").toString(locale());
++ case 4:
++ return ki18nc("Hijri month 4 - KLocale::NarrowName", "T").toString(locale());
++ case 5:
++ return ki18nc("Hijri month 5 - KLocale::NarrowName", "A").toString(locale());
++ case 6:
++ return ki18nc("Hijri month 6 - KLocale::NarrowName", "T").toString(locale());
++ case 7:
++ return ki18nc("Hijri month 7 - KLocale::NarrowName", "R").toString(locale());
++ case 8:
++ return ki18nc("Hijri month 8 - KLocale::NarrowName", "S").toString(locale());
++ case 9:
++ return ki18nc("Hijri month 9 - KLocale::NarrowName", "R").toString(locale());
++ case 10:
++ return ki18nc("Hijri month 10 - KLocale::NarrowName", "S").toString(locale());
++ case 11:
++ return ki18nc("Hijri month 11 - KLocale::NarrowName", "Q").toString(locale());
++ case 12:
++ return ki18nc("Hijri month 12 - KLocale::NarrowName", "H").toString(locale());
++ default:
++ return QString();
++ }
++ }
++
++ if (format == KLocale::ShortName && possessive) {
++ switch (month) {
++ case 1:
++ return ki18nc("Hijri month 1 - KLocale::ShortName Possessive", "of Muh").toString(locale());
++ case 2:
++ return ki18nc("Hijri month 2 - KLocale::ShortName Possessive", "of Saf").toString(locale());
++ case 3:
++ return ki18nc("Hijri month 3 - KLocale::ShortName Possessive", "of R.A").toString(locale());
++ case 4:
++ return ki18nc("Hijri month 4 - KLocale::ShortName Possessive", "of R.T").toString(locale());
++ case 5:
++ return ki18nc("Hijri month 5 - KLocale::ShortName Possessive", "of J.A").toString(locale());
++ case 6:
++ return ki18nc("Hijri month 6 - KLocale::ShortName Possessive", "of J.T").toString(locale());
++ case 7:
++ return ki18nc("Hijri month 7 - KLocale::ShortName Possessive", "of Raj").toString(locale());
++ case 8:
++ return ki18nc("Hijri month 8 - KLocale::ShortName Possessive", "of Sha").toString(locale());
++ case 9:
++ return ki18nc("Hijri month 9 - KLocale::ShortName Possessive", "of Ram").toString(locale());
++ case 10:
++ return ki18nc("Hijri month 10 - KLocale::ShortName Possessive", "of Shw").toString(locale());
++ case 11:
++ return ki18nc("Hijri month 11 - KLocale::ShortName Possessive", "of Qid").toString(locale());
++ case 12:
++ return ki18nc("Hijri month 12 - KLocale::ShortName Possessive", "of Hij").toString(locale());
++ default:
++ return QString();
++ }
++ }
++
++ if (format == KLocale::ShortName && !possessive) {
++ switch (month) {
++ case 1:
++ return ki18nc("Hijri month 1 - KLocale::ShortName", "Muh").toString(locale());
++ case 2:
++ return ki18nc("Hijri month 2 - KLocale::ShortName", "Saf").toString(locale());
++ case 3:
++ return ki18nc("Hijri month 3 - KLocale::ShortName", "R.A").toString(locale());
++ case 4:
++ return ki18nc("Hijri month 4 - KLocale::ShortName", "R.T").toString(locale());
++ case 5:
++ return ki18nc("Hijri month 5 - KLocale::ShortName", "J.A").toString(locale());
++ case 6:
++ return ki18nc("Hijri month 6 - KLocale::ShortName", "J.T").toString(locale());
++ case 7:
++ return ki18nc("Hijri month 7 - KLocale::ShortName", "Raj").toString(locale());
++ case 8:
++ return ki18nc("Hijri month 8 - KLocale::ShortName", "Sha").toString(locale());
++ case 9:
++ return ki18nc("Hijri month 9 - KLocale::ShortName", "Ram").toString(locale());
++ case 10:
++ return ki18nc("Hijri month 10 - KLocale::ShortName", "Shw").toString(locale());
++ case 11:
++ return ki18nc("Hijri month 11 - KLocale::ShortName", "Qid").toString(locale());
++ case 12:
++ return ki18nc("Hijri month 12 - KLocale::ShortName", "Hij").toString(locale());
++ default:
++ return QString();
++ }
++ }
++
++ if (format == KLocale::LongName && possessive) {
++ switch (month) {
++ case 1:
++ return ki18nc("Hijri month 1 - KLocale::LongName Possessive", "of Muharram").toString(locale());
++ case 2:
++ return ki18nc("Hijri month 2 - KLocale::LongName Possessive", "of Safar").toString(locale());
++ case 3:
++ return ki18nc("Hijri month 3 - KLocale::LongName Possessive", "of Rabi` al-Awal").toString(locale());
++ case 4:
++ return ki18nc("Hijri month 4 - KLocale::LongName Possessive", "of Rabi` al-Thaani").toString(locale());
++ case 5:
++ return ki18nc("Hijri month 5 - KLocale::LongName Possessive", "of Jumaada al-Awal").toString(locale());
++ case 6:
++ return ki18nc("Hijri month 6 - KLocale::LongName Possessive", "of Jumaada al-Thaani").toString(locale());
++ case 7:
++ return ki18nc("Hijri month 7 - KLocale::LongName Possessive", "of Rajab").toString(locale());
++ case 8:
++ return ki18nc("Hijri month 8 - KLocale::LongName Possessive", "of Sha`ban").toString(locale());
++ case 9:
++ return ki18nc("Hijri month 9 - KLocale::LongName Possessive", "of Ramadan").toString(locale());
++ case 10:
++ return ki18nc("Hijri month 10 - KLocale::LongName Possessive", "of Shawwal").toString(locale());
++ case 11:
++ return ki18nc("Hijri month 11 - KLocale::LongName Possessive", "of Thu al-Qi`dah").toString(locale());
++ case 12:
++ return ki18nc("Hijri month 12 - KLocale::LongName Possessive", "of Thu al-Hijjah").toString(locale());
++ default:
++ return QString();
++ }
++ }
++
++ // Default to LongName
++ switch (month) {
++ case 1:
++ return ki18nc("Hijri month 1 - KLocale::LongName", "Muharram").toString(locale());
++ case 2:
++ return ki18nc("Hijri month 2 - KLocale::LongName", "Safar").toString(locale());
++ case 3:
++ return ki18nc("Hijri month 3 - KLocale::LongName", "Rabi` al-Awal").toString(locale());
++ case 4:
++ return ki18nc("Hijri month 4 - KLocale::LongName", "Rabi` al-Thaani").toString(locale());
++ case 5:
++ return ki18nc("Hijri month 5 - KLocale::LongName", "Jumaada al-Awal").toString(locale());
++ case 6:
++ return ki18nc("Hijri month 6 - KLocale::LongName", "Jumaada al-Thaani").toString(locale());
++ case 7:
++ return ki18nc("Hijri month 7 - KLocale::LongName", "Rajab").toString(locale());
++ case 8:
++ return ki18nc("Hijri month 8 - KLocale::LongName", "Sha`ban").toString(locale());
++ case 9:
++ return ki18nc("Hijri month 9 - KLocale::LongName", "Ramadan").toString(locale());
++ case 10:
++ return ki18nc("Hijri month 10 - KLocale::LongName", "Shawwal").toString(locale());
++ case 11:
++ return ki18nc("Hijri month 11 - KLocale::LongName", "Thu al-Qi`dah").toString(locale());
++ case 12:
++ return ki18nc("Hijri month 12 - KLocale::LongName", "Thu al-Hijjah").toString(locale());
++ default:
++ return QString();
++ }
++}
++
++QString KCalendarSystemIslamicCivilPrivate::weekDayName(int weekDay, KLocale::DateTimeComponentFormat format) const
++{
++ if (format == KLocale::NarrowName) {
++ switch (weekDay) {
++ case 1:
++ return ki18nc("Hijri weekday 1 - KLocale::NarrowName ", "I").toString(locale());
++ case 2:
++ return ki18nc("Hijri weekday 2 - KLocale::NarrowName ", "T").toString(locale());
++ case 3:
++ return ki18nc("Hijri weekday 3 - KLocale::NarrowName ", "A").toString(locale());
++ case 4:
++ return ki18nc("Hijri weekday 4 - KLocale::NarrowName ", "K").toString(locale());
++ case 5:
++ return ki18nc("Hijri weekday 5 - KLocale::NarrowName ", "J").toString(locale());
++ case 6:
++ return ki18nc("Hijri weekday 6 - KLocale::NarrowName ", "S").toString(locale());
++ case 7:
++ return ki18nc("Hijri weekday 7 - KLocale::NarrowName ", "A").toString(locale());
++ default:
++ return QString();
++ }
++ }
++
++ if (format == KLocale::ShortName || format == KLocale:: ShortNumber) {
++ switch (weekDay) {
++ case 1:
++ return ki18nc("Hijri weekday 1 - KLocale::ShortName", "Ith").toString(locale());
++ case 2:
++ return ki18nc("Hijri weekday 2 - KLocale::ShortName", "Thl").toString(locale());
++ case 3:
++ return ki18nc("Hijri weekday 3 - KLocale::ShortName", "Arb").toString(locale());
++ case 4:
++ return ki18nc("Hijri weekday 4 - KLocale::ShortName", "Kha").toString(locale());
++ case 5:
++ return ki18nc("Hijri weekday 5 - KLocale::ShortName", "Jum").toString(locale());
++ case 6:
++ return ki18nc("Hijri weekday 6 - KLocale::ShortName", "Sab").toString(locale());
++ case 7:
++ return ki18nc("Hijri weekday 7 - KLocale::ShortName", "Ahd").toString(locale());
++ default: return QString();
++ }
++ }
++
++ switch (weekDay) {
++ case 1:
++ return ki18nc("Hijri weekday 1 - KLocale::LongName", "Yaum al-Ithnain").toString(locale());
++ case 2:
++ return ki18nc("Hijri weekday 2 - KLocale::LongName", "Yau al-Thulatha").toString(locale());
++ case 3:
++ return ki18nc("Hijri weekday 3 - KLocale::LongName", "Yaum al-Arbi'a").toString(locale());
++ case 4:
++ return ki18nc("Hijri weekday 4 - KLocale::LongName", "Yaum al-Khamees").toString(locale());
++ case 5:
++ return ki18nc("Hijri weekday 5 - KLocale::LongName", "Yaum al-Jumma").toString(locale());
++ case 6:
++ return ki18nc("Hijri weekday 6 - KLocale::LongName", "Yaum al-Sabt").toString(locale());
++ case 7:
++ return ki18nc("Hijri weekday 7 - KLocale::LongName", "Yaum al-Ahad").toString(locale());
++ default:
++ return QString();
++ }
++}
++
++
++KCalendarSystemIslamicCivil::KCalendarSystemIslamicCivil(const KLocale *locale)
++ : KCalendarSystem(*new KCalendarSystemIslamicCivilPrivate(this), KSharedConfig::Ptr(), locale)
++{
++ d_ptr->loadConfig(calendarType());
++}
++
++KCalendarSystemIslamicCivil::KCalendarSystemIslamicCivil(const KSharedConfig::Ptr config, const KLocale *locale)
++ : KCalendarSystem(*new KCalendarSystemIslamicCivilPrivate(this), config, locale)
++{
++ d_ptr->loadConfig(calendarType());
++}
++
++KCalendarSystemIslamicCivil::KCalendarSystemIslamicCivil(KCalendarSystemIslamicCivilPrivate &dd,
++ const KSharedConfig::Ptr config, const KLocale *locale)
++ : KCalendarSystem(dd, config, locale)
++{
++ d_ptr->loadConfig(calendarType());
++}
++
++KCalendarSystemIslamicCivil::~KCalendarSystemIslamicCivil()
++{
++}
++
++QString KCalendarSystemIslamicCivil::calendarType() const
++{
++ return QLatin1String("hijri");
++}
++
++QDate KCalendarSystemIslamicCivil::epoch() const
++{
++ // 16 July 622 in the Julian calendar
++ return QDate::fromJulianDay(1948440);
++}
++
++QDate KCalendarSystemIslamicCivil::earliestValidDate() const
++{
++ return epoch();
++}
++
++QDate KCalendarSystemIslamicCivil::latestValidDate() const
++{
++ // Set to last day of year 9999
++ // Last day of Islamic Civil year 9999 is 9999-12-29
++ return QDate::fromJulianDay(5491751);
++}
++
++bool KCalendarSystemIslamicCivil::isValid(int year, int month, int day) const
++{
++ return KCalendarSystem::isValid(year, month, day);
++}
++
++bool KCalendarSystemIslamicCivil::isValid(const QDate &date) const
++{
++ return KCalendarSystem::isValid(date);
++}
++
++bool KCalendarSystemIslamicCivil::isLeapYear(int year) const
++{
++ return KCalendarSystem::isLeapYear(year);
++}
++
++bool KCalendarSystemIslamicCivil::isLeapYear(const QDate &date) const
++{
++ return KCalendarSystem::isLeapYear(date);
++}
++
++QString KCalendarSystemIslamicCivil::monthName(int month, int year, MonthNameFormat format) const
++{
++ return KCalendarSystem::monthName(month, year, format);
++}
++
++QString KCalendarSystemIslamicCivil::monthName(const QDate &date, MonthNameFormat format) const
++{
++ return KCalendarSystem::monthName(date, format);
++}
++
++QString KCalendarSystemIslamicCivil::weekDayName(int weekDay, WeekDayNameFormat format) const
++{
++ return KCalendarSystem::weekDayName(weekDay, format);
++}
++
++QString KCalendarSystemIslamicCivil::weekDayName(const QDate &date, WeekDayNameFormat format) const
++{
++ return KCalendarSystem::weekDayName(date, format);
++}
++
++int KCalendarSystemIslamicCivil::weekDayOfPray() const
++{
++ return 5; // Friday
++}
++
++bool KCalendarSystemIslamicCivil::isLunar() const
++{
++ return true;
++}
++
++bool KCalendarSystemIslamicCivil::isLunisolar() const
++{
++ return false;
++}
++
++bool KCalendarSystemIslamicCivil::isSolar() const
++{
++ return false;
++}
++
++bool KCalendarSystemIslamicCivil::isProleptic() const
++{
++ return false;
++}
++
++bool KCalendarSystemIslamicCivil::julianDayToDate(int jd, int &year, int &month, int &day) const
++{
++ Q_D(const KCalendarSystemIslamicCivil);
++
++ /*
++ The following C++ code is translated from the Lisp code
++ in ``Calendrical Calculations'' by Nachum Dershowitz and
++ Edward M. Reingold, Software---Practice & Experience,
++ vol. 20, no. 9 (September, 1990), pp. 899--928.
++
++ This code is in the public domain, but any use of it
++ should publically acknowledge its source.
++ */
++
++ // Search forward year by year from approximate year
++ year = (jd - epoch().toJulianDay()) / 355;
++ int testJd;
++ dateToJulianDay(year, 12, d->daysInMonth(year, 12), testJd);
++ while (jd > testJd) {
++ year++;
++ dateToJulianDay(year, 12, d->daysInMonth(year, 12), testJd);
++ }
++
++ // Search forward month by month from Muharram
++ month = 1;
++ dateToJulianDay(year, month, d->daysInMonth(year, month), testJd);
++ while (jd > testJd) {
++ month++;
++ dateToJulianDay(year, month, d->daysInMonth(year, month), testJd);
++ }
++
++ dateToJulianDay(year, month, 1, testJd);
++ day = jd - testJd + 1;
++
++ return true;
++
++ // Alternative implementations
++
++ // More recent editions of "Calendrical Calculations" by Dershowitz & Reingold have a more
++ // efficient direct calculation without recusrion, but this cannot be used due to licensing
++
++ /*
++ Formula from "Explanatory Supplement to the Astronomical Almanac" 2006, derived from Fliegel & Van Flandern 1968
++ int L = jd - epoch().toJulianDay() + 10632;
++ int N = ( L - 1 ) / 10631;
++ L = L - 10631 * N + 354;
++ int J = ( ( 10985 - L ) / 5316 ) x ( ( 50* L ) / 17719 ) + ( L / 5670 ) * ( ( 43 * L ) / 15238 );
++ L = L - ( ( 30 - J ) / 15 ) * ( ( 17719 * J ) / 50 ) - ( J / 16 ) * ( ( 15238 * J ) / 43 ) + 29;
++ year = ( 30 * N ) + J - 30;
++ month = ( 24 * L ) / 709;
++ day = L - ( ( 709 * month ) / 24 );
++ */
++
++ /*
++ Formula from Fourmilab website
++ jd = Math.floor(jd) + 0.5;
++ year = Math.floor(((30 * (jd - epoch().toJulianDay())) + 10646) / 10631);
++ month = qMin(12, Math.ceil((jd - (29 + islamic_to_jd(year, 1, 1))) / 29.5) + 1);
++ day = (jd - islamic_to_jd(year, month, 1)) + 1;
++ */
++}
++
++bool KCalendarSystemIslamicCivil::dateToJulianDay(int year, int month, int day, int &jd) const
++{
++ /*
++ The following C++ code is translated from the Lisp code
++ in ``Calendrical Calculations'' by Nachum Dershowitz and
++ Edward M. Reingold, Software---Practice & Experience,
++ vol. 20, no. 9 (September, 1990), pp. 899--928.
++
++ This code is in the public domain, but any use of it
++ should publically acknowledge its source.
++ */
++
++ jd = epoch().toJulianDay() - 1 + // days before start of calendar
++ (year - 1) * 354 + // non-leap days in prior years
++ (3 + (11 * year)) / 30 + // leap days in prior years
++ 29 * (month - 1) + // days so far...
++ month / 2 + // ...this year
++ day; // days so far this month
++
++ return true;
++
++ // Alternative implementations
++
++ /*
++ Formula from "Explanatory Supplement to the Astronomical Almanac" 2006, derived from Fliegel & Van Flandern 1968
++ jd = ( 3 + ( 11 * year ) ) / 30 + 354 * year + 30 * month - ( month - 1 ) / 2 + day + epoch().toJulianDay() - 385;
++ */
++}
+diff --git a/kdecore/date/kcalendarsystemislamiccivil_p.h b/kdecore/date/kcalendarsystemislamiccivil_p.h
+new file mode 100644
+index 0000000..59629cc
+--- /dev/null
++++ b/kdecore/date/kcalendarsystemislamiccivil_p.h
+@@ -0,0 +1,85 @@
++/*
++ Copyright (c) 2002 Carlos Moro <cfmoro@correo.uniovi.es>
++ Copyright (c) 2002-2003 Hans Petter Bieker <bieker@kde.org>
++ Copyright 2007, 2010 John Layt <john@layt.net>
++
++ This library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Library General Public
++ License as published by the Free Software Foundation; either
++ version 2 of the License, or (at your option) any later version.
++
++ This library is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Library General Public License for more details.
++
++ You should have received a copy of the GNU Library General Public License
++ along with this library; see the file COPYING.LIB. If not, write to
++ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
++ Boston, MA 02110-1301, USA.
++*/
++
++#ifndef KCALENDARSYSTEMISLAMICCIVIL_H
++#define KCALENDARSYSTEMISLAMICCIVIL_H
++
++#include "kcalendarsystem.h"
++
++class KCalendarSystemIslamicCivilPrivate;
++
++/**
++ * @internal
++ * This is the Islamic Civil calendar implementation.
++ *
++ * The Islamic or Hijri calendar is the traditional calendar used in the Middle
++ * East. This implementation is of the civil calculation that does not take
++ * observed sunset into account and so may vary from actual dates by 1-2 days.
++ *
++ * @b license GNU-LGPL v2+
++ *
++ * @see KLocale,KCalendarSystem
++ *
++ * @author Carlos Moro <cfmoro@correo.uniovi.es>
++ */
++class KCalendarSystemIslamicCivil : public KCalendarSystem
++{
++public:
++ explicit KCalendarSystemIslamicCivil(const KLocale *locale = 0);
++ explicit KCalendarSystemIslamicCivil(const KSharedConfig::Ptr config, const KLocale *locale = 0);
++ virtual ~KCalendarSystemIslamicCivil();
++
++ virtual QString calendarType() const;
++
++ virtual QDate epoch() const;
++ virtual QDate earliestValidDate() const;
++ virtual QDate latestValidDate() const;
++ virtual bool isValid(int year, int month, int day) const;
++ virtual bool isValid(const QDate &date) const;
++
++ virtual bool isLeapYear(int year) const;
++ virtual bool isLeapYear(const QDate &date) const;
++
++ virtual QString monthName(int month, int year, MonthNameFormat format = LongName) const;
++ virtual QString monthName(const QDate &date, MonthNameFormat format = LongName) const;
++
++ virtual QString weekDayName(int weekDay, WeekDayNameFormat format = LongDayName) const;
++ virtual QString weekDayName(const QDate &date, WeekDayNameFormat format = LongDayName) const;
++
++ virtual int weekDayOfPray() const;
++
++ virtual bool isLunar() const;
++ virtual bool isLunisolar() const;
++ virtual bool isSolar() const;
++ virtual bool isProleptic() const;
++
++protected:
++ virtual bool julianDayToDate(int jd, int &year, int &month, int &day) const;
++ virtual bool dateToJulianDay(int year, int month, int day, int &jd) const;
++ KCalendarSystemIslamicCivil(KCalendarSystemIslamicCivilPrivate &dd,
++ const KSharedConfig::Ptr config = KSharedConfig::Ptr(),
++ const KLocale *locale = 0);
++
++private:
++ Q_DECLARE_PRIVATE(KCalendarSystemIslamicCivil)
++};
++
++#endif // KCALENDARSYSTEMISLAMICCIVIL_H
+diff --git a/kdecore/date/kcalendarsystemjalali.cpp b/kdecore/date/kcalendarsystemjalali.cpp
+index 543ba5a..1aaa804 100644
+--- a/kdecore/date/kcalendarsystemjalali.cpp
++++ b/kdecore/date/kcalendarsystemjalali.cpp
+@@ -35,32 +35,32 @@
+ class KCalendarSystemJalaliPrivate : public KCalendarSystemPrivate
+ {
+ public:
+- explicit KCalendarSystemJalaliPrivate( KCalendarSystemJalali *q );
++ explicit KCalendarSystemJalaliPrivate(KCalendarSystemJalali *q);
+
+ virtual ~KCalendarSystemJalaliPrivate();
+
+ // Virtual methods each calendar system must re-implement
+ virtual KLocale::CalendarSystem calendarSystem() const;
+ virtual void loadDefaultEraList();
+- virtual int monthsInYear( int year ) const;
+- virtual int daysInMonth( int year, int month ) const;
+- virtual int daysInYear( int year ) const;
++ virtual int monthsInYear(int year) const;
++ virtual int daysInMonth(int year, int month) const;
++ virtual int daysInYear(int year) const;
+ virtual int daysInWeek() const;
+- virtual bool isLeapYear( int year ) const;
++ virtual bool isLeapYear(int year) const;
+ virtual bool hasLeapMonths() const;
+ virtual bool hasYearZero() const;
+ virtual int maxDaysInWeek() const;
+ virtual int maxMonthsInYear() const;
+ virtual int earliestValidYear() const;
+ virtual int latestValidYear() const;
+- virtual QString monthName( int month, int year, KLocale::DateTimeComponentFormat format, bool possessive ) const;
+- virtual QString weekDayName( int weekDay, KLocale::DateTimeComponentFormat format ) const;
++ virtual QString monthName(int month, int year, KLocale::DateTimeComponentFormat format, bool possessive) const;
++ virtual QString weekDayName(int weekDay, KLocale::DateTimeComponentFormat format) const;
+ };
+
+ // Shared d pointer base class definitions
+
+-KCalendarSystemJalaliPrivate::KCalendarSystemJalaliPrivate( KCalendarSystemJalali *q )
+- :KCalendarSystemPrivate( q )
++KCalendarSystemJalaliPrivate::KCalendarSystemJalaliPrivate(KCalendarSystemJalali *q)
++ : KCalendarSystemPrivate(q)
+ {
+ }
+
+@@ -77,38 +77,38 @@ void KCalendarSystemJalaliPrivate::loadDefaultEraList()
+ {
+ QString name, shortName, format;
+ // Islamic Era (Hijri), Anno Persico.
+- name = i18nc( "Calendar Era: Jalali Islamic Era, years > 0, LongFormat", "Anno Persico" );
+- shortName = i18nc( "Calendar Era: Jalali Islamic Era, years > 0, ShortFormat", "AP" );
+- format = i18nc( "(kdedt-format) Jalali, AP, full era year format used for %EY, e.g. 2000 AP", "%Ey %EC" );
+- addEra( '+', 1, q->epoch(), 1, q->latestValidDate(), name, shortName, format );
++ name = i18nc("Calendar Era: Jalali Islamic Era, years > 0, LongFormat", "Anno Persico");
++ shortName = i18nc("Calendar Era: Jalali Islamic Era, years > 0, ShortFormat", "AP");
++ format = i18nc("(kdedt-format) Jalali, AP, full era year format used for %EY, e.g. 2000 AP", "%Ey %EC");
++ addEra('+', 1, q->epoch(), 1, q->latestValidDate(), name, shortName, format);
+ }
+
+-int KCalendarSystemJalaliPrivate::monthsInYear( int year ) const
++int KCalendarSystemJalaliPrivate::monthsInYear(int year) const
+ {
+- Q_UNUSED( year )
++ Q_UNUSED(year)
+ return 12;
+ }
+
+-int KCalendarSystemJalaliPrivate::daysInMonth( int year, int month ) const
++int KCalendarSystemJalaliPrivate::daysInMonth(int year, int month) const
+ {
+- if ( month == 12 ) {
+- if ( isLeapYear( year ) ) {
++ if (month == 12) {
++ if (isLeapYear(year)) {
+ return 30;
+ } else {
+ return 29;
+ }
+ }
+
+- if ( month <= 6 ) {
++ if (month <= 6) {
+ return 31;
+ }
+
+ return 30;
+ }
+
+-int KCalendarSystemJalaliPrivate::daysInYear( int year ) const
++int KCalendarSystemJalaliPrivate::daysInYear(int year) const
+ {
+- if ( isLeapYear( year ) ) {
++ if (isLeapYear(year)) {
+ return 366;
+ } else {
+ return 365;
+@@ -120,26 +120,26 @@ int KCalendarSystemJalaliPrivate::daysInWeek() const
+ return 7;
+ }
+
+-bool KCalendarSystemJalaliPrivate::isLeapYear( int year ) const
++bool KCalendarSystemJalaliPrivate::isLeapYear(int year) const
+ {
+ // From formilab Public Domain code http://www.fourmilab.ch/documents/calendar/
+ // Use Birashk algorithm as it matches the to/from jd code below
+
+ // Birashk algorithm is incorrect in two years in period AP 1244 to 1531,
+ // 1403/1404 and 1436/1437, and so catch them here first
+- if ( year == 1403 || year == 1436 ) {
++ if (year == 1403 || year == 1436) {
+ return true;
+- } else if ( year == 1404 || year == 1437 ) {
++ } else if (year == 1404 || year == 1437) {
+ return false;
+ }
+
+- if ( year >= 0 ) {
++ if (year >= 0) {
+ year = year - 474;
+ } else {
+ year = year - 473;
+ }
+
+- if ( ( ( ( ( ( year % 2820 ) + 474 ) + 38 ) * 682 ) % 2816 ) < 682 ) {
++ if ((((((year % 2820) + 474) + 38) * 682) % 2816) < 682) {
+ return true;
+ } else {
+ return false;
+@@ -176,461 +176,315 @@ int KCalendarSystemJalaliPrivate::latestValidYear() const
+ return 1530;
+ }
+
+-QString KCalendarSystemJalaliPrivate::monthName( int month, int year, KLocale::DateTimeComponentFormat format, bool possessive ) const
++QString KCalendarSystemJalaliPrivate::monthName(int month, int year, KLocale::DateTimeComponentFormat format, bool possessive) const
+ {
+- Q_UNUSED( year );
++ Q_UNUSED(year);
+
+- if ( format == KLocale::NarrowName ) {
+- switch ( month ) {
++ if (format == KLocale::NarrowName) {
++ switch (month) {
+ case 1:
+- return ki18nc( "Jalali month 1 - KLocale::NarrowName", "F" ).toString( locale() );
++ return ki18nc("Jalali month 1 - KLocale::NarrowName", "F").toString(locale());
+ case 2:
+- return ki18nc( "Jalali month 2 - KLocale::NarrowName", "O" ).toString( locale() );
++ return ki18nc("Jalali month 2 - KLocale::NarrowName", "O").toString(locale());
+ case 3:
+- return ki18nc( "Jalali month 3 - KLocale::NarrowName", "K" ).toString( locale() );
++ return ki18nc("Jalali month 3 - KLocale::NarrowName", "K").toString(locale());
+ case 4:
+- return ki18nc( "Jalali month 4 - KLocale::NarrowName", "T" ).toString( locale() );
++ return ki18nc("Jalali month 4 - KLocale::NarrowName", "T").toString(locale());
+ case 5:
+- return ki18nc( "Jalali month 5 - KLocale::NarrowName", "M" ).toString( locale() );
++ return ki18nc("Jalali month 5 - KLocale::NarrowName", "M").toString(locale());
+ case 6:
+- return ki18nc( "Jalali month 6 - KLocale::NarrowName", "S" ).toString( locale() );
++ return ki18nc("Jalali month 6 - KLocale::NarrowName", "S").toString(locale());
+ case 7:
+- return ki18nc( "Jalali month 7 - KLocale::NarrowName", "M" ).toString( locale() );
++ return ki18nc("Jalali month 7 - KLocale::NarrowName", "M").toString(locale());
+ case 8:
+- return ki18nc( "Jalali month 8 - KLocale::NarrowName", "A" ).toString( locale() );
++ return ki18nc("Jalali month 8 - KLocale::NarrowName", "A").toString(locale());
+ case 9:
+- return ki18nc( "Jalali month 9 - KLocale::NarrowName", "A" ).toString( locale() );
++ return ki18nc("Jalali month 9 - KLocale::NarrowName", "A").toString(locale());
+ case 10:
+- return ki18nc( "Jalali month 10 - KLocale::NarrowName", "D" ).toString( locale() );
++ return ki18nc("Jalali month 10 - KLocale::NarrowName", "D").toString(locale());
+ case 11:
+- return ki18nc( "Jalali month 11 - KLocale::NarrowName", "B" ).toString( locale() );
++ return ki18nc("Jalali month 11 - KLocale::NarrowName", "B").toString(locale());
+ case 12:
+- return ki18nc( "Jalali month 12 - KLocale::NarrowName", "E" ).toString( locale() );
++ return ki18nc("Jalali month 12 - KLocale::NarrowName", "E").toString(locale());
+ default:
+ return QString();
+ }
+ }
+
+- if ( format == KLocale::ShortName && possessive ) {
+- switch ( month ) {
++ if (format == KLocale::ShortName && possessive) {
++ switch (month) {
+ case 1:
+- return ki18nc( "Jalali month 1 - KLocale::ShortName Possessive", "of Far" ).toString( locale() );
++ return ki18nc("Jalali month 1 - KLocale::ShortName Possessive", "of Far").toString(locale());
+ case 2:
+- return ki18nc( "Jalali month 2 - KLocale::ShortName Possessive", "of Ord" ).toString( locale() );
++ return ki18nc("Jalali month 2 - KLocale::ShortName Possessive", "of Ord").toString(locale());
+ case 3:
+- return ki18nc( "Jalali month 3 - KLocale::ShortName Possessive", "of Kho" ).toString( locale() );
++ return ki18nc("Jalali month 3 - KLocale::ShortName Possessive", "of Kho").toString(locale());
+ case 4:
+- return ki18nc( "Jalali month 4 - KLocale::ShortName Possessive", "of Tir" ).toString( locale() );
++ return ki18nc("Jalali month 4 - KLocale::ShortName Possessive", "of Tir").toString(locale());
+ case 5:
+- return ki18nc( "Jalali month 5 - KLocale::ShortName Possessive", "of Mor" ).toString( locale() );
++ return ki18nc("Jalali month 5 - KLocale::ShortName Possessive", "of Mor").toString(locale());
+ case 6:
+- return ki18nc( "Jalali month 6 - KLocale::ShortName Possessive", "of Sha" ).toString( locale() );
++ return ki18nc("Jalali month 6 - KLocale::ShortName Possessive", "of Sha").toString(locale());
+ case 7:
+- return ki18nc( "Jalali month 7 - KLocale::ShortName Possessive", "of Meh" ).toString( locale() );
++ return ki18nc("Jalali month 7 - KLocale::ShortName Possessive", "of Meh").toString(locale());
+ case 8:
+- return ki18nc( "Jalali month 8 - KLocale::ShortName Possessive", "of Aba" ).toString( locale() );
++ return ki18nc("Jalali month 8 - KLocale::ShortName Possessive", "of Aba").toString(locale());
+ case 9:
+- return ki18nc( "Jalali month 9 - KLocale::ShortName Possessive", "of Aza" ).toString( locale() );
++ return ki18nc("Jalali month 9 - KLocale::ShortName Possessive", "of Aza").toString(locale());
+ case 10:
+- return ki18nc( "Jalali month 10 - KLocale::ShortName Possessive", "of Dei" ).toString( locale() );
++ return ki18nc("Jalali month 10 - KLocale::ShortName Possessive", "of Dei").toString(locale());
+ case 11:
+- return ki18nc( "Jalali month 11 - KLocale::ShortName Possessive", "of Bah" ).toString( locale() );
++ return ki18nc("Jalali month 11 - KLocale::ShortName Possessive", "of Bah").toString(locale());
+ case 12:
+- return ki18nc( "Jalali month 12 - KLocale::ShortName Possessive", "of Esf" ).toString( locale() );
++ return ki18nc("Jalali month 12 - KLocale::ShortName Possessive", "of Esf").toString(locale());
+ default:
+ return QString();
+ }
+ }
+
+- if ( format == KLocale::ShortName && !possessive ) {
+- switch ( month ) {
++ if (format == KLocale::ShortName && !possessive) {
++ switch (month) {
+ case 1:
+- return ki18nc( "Jalali month 1 - KLocale::ShortName", "Far" ).toString( locale() );
++ return ki18nc("Jalali month 1 - KLocale::ShortName", "Far").toString(locale());
+ case 2:
+- return ki18nc( "Jalali month 2 - KLocale::ShortName", "Ord" ).toString( locale() );
++ return ki18nc("Jalali month 2 - KLocale::ShortName", "Ord").toString(locale());
+ case 3:
+- return ki18nc( "Jalali month 3 - KLocale::ShortName", "Kho" ).toString( locale() );
++ return ki18nc("Jalali month 3 - KLocale::ShortName", "Kho").toString(locale());
+ case 4:
+- return ki18nc( "Jalali month 4 - KLocale::ShortName", "Tir" ).toString( locale() );
++ return ki18nc("Jalali month 4 - KLocale::ShortName", "Tir").toString(locale());
+ case 5:
+- return ki18nc( "Jalali month 5 - KLocale::ShortName", "Mor" ).toString( locale() );
++ return ki18nc("Jalali month 5 - KLocale::ShortName", "Mor").toString(locale());
+ case 6:
+- return ki18nc( "Jalali month 6 - KLocale::ShortName", "Sha" ).toString( locale() );
++ return ki18nc("Jalali month 6 - KLocale::ShortName", "Sha").toString(locale());
+ case 7:
+- return ki18nc( "Jalali month 7 - KLocale::ShortName", "Meh" ).toString( locale() );
++ return ki18nc("Jalali month 7 - KLocale::ShortName", "Meh").toString(locale());
+ case 8:
+- return ki18nc( "Jalali month 8 - KLocale::ShortName", "Aba" ).toString( locale() );
++ return ki18nc("Jalali month 8 - KLocale::ShortName", "Aba").toString(locale());
+ case 9:
+- return ki18nc( "Jalali month 9 - KLocale::ShortName", "Aza" ).toString( locale() );
++ return ki18nc("Jalali month 9 - KLocale::ShortName", "Aza").toString(locale());
+ case 10:
+- return ki18nc( "Jalali month 10 - KLocale::ShortName", "Dei" ).toString( locale() );
++ return ki18nc("Jalali month 10 - KLocale::ShortName", "Dei").toString(locale());
+ case 11:
+- return ki18nc( "Jalali month 11 - KLocale::ShortName", "Bah" ).toString( locale() );
++ return ki18nc("Jalali month 11 - KLocale::ShortName", "Bah").toString(locale());
+ case 12:
+- return ki18nc( "Jalali month 12 - KLocale::ShortName", "Esf" ).toString( locale() );
++ return ki18nc("Jalali month 12 - KLocale::ShortName", "Esf").toString(locale());
+ default:
+ return QString();
+ }
+ }
+
+- if ( format == KLocale::LongName && possessive ) {
+- switch ( month ) {
++ if (format == KLocale::LongName && possessive) {
++ switch (month) {
+ case 1:
+- return ki18nc( "Jalali month 1 - KLocale::LongName Possessive", "of Farvardin" ).toString( locale() );
++ return ki18nc("Jalali month 1 - KLocale::LongName Possessive", "of Farvardin").toString(locale());
+ case 2:
+- return ki18nc( "Jalali month 2 - KLocale::LongName Possessive", "of Ordibehesht" ).toString( locale() );
++ return ki18nc("Jalali month 2 - KLocale::LongName Possessive", "of Ordibehesht").toString(locale());
+ case 3:
+- return ki18nc( "Jalali month 3 - KLocale::LongName Possessive", "of Khordad" ).toString( locale() );
++ return ki18nc("Jalali month 3 - KLocale::LongName Possessive", "of Khordad").toString(locale());
+ case 4:
+- return ki18nc( "Jalali month 4 - KLocale::LongName Possessive", "of Tir" ).toString( locale() );
++ return ki18nc("Jalali month 4 - KLocale::LongName Possessive", "of Tir").toString(locale());
+ case 5:
+- return ki18nc( "Jalali month 5 - KLocale::LongName Possessive", "of Mordad" ).toString( locale() );
++ return ki18nc("Jalali month 5 - KLocale::LongName Possessive", "of Mordad").toString(locale());
+ case 6:
+- return ki18nc( "Jalali month 6 - KLocale::LongName Possessive", "of Shahrivar" ).toString( locale() );
++ return ki18nc("Jalali month 6 - KLocale::LongName Possessive", "of Shahrivar").toString(locale());
+ case 7:
+- return ki18nc( "Jalali month 7 - KLocale::LongName Possessive", "of Mehr" ).toString( locale() );
++ return ki18nc("Jalali month 7 - KLocale::LongName Possessive", "of Mehr").toString(locale());
+ case 8:
+- return ki18nc( "Jalali month 8 - KLocale::LongName Possessive", "of Aban" ).toString( locale() );
++ return ki18nc("Jalali month 8 - KLocale::LongName Possessive", "of Aban").toString(locale());
+ case 9:
+- return ki18nc( "Jalali month 9 - KLocale::LongName Possessive", "of Azar" ).toString( locale() );
++ return ki18nc("Jalali month 9 - KLocale::LongName Possessive", "of Azar").toString(locale());
+ case 10:
+- return ki18nc( "Jalali month 10 - KLocale::LongName Possessive", "of Dei" ).toString( locale() );
++ return ki18nc("Jalali month 10 - KLocale::LongName Possessive", "of Dei").toString(locale());
+ case 11:
+- return ki18nc( "Jalali month 11 - KLocale::LongName Possessive", "of Bahman" ).toString( locale() );
++ return ki18nc("Jalali month 11 - KLocale::LongName Possessive", "of Bahman").toString(locale());
+ case 12:
+- return ki18nc( "Jalali month 12 - KLocale::LongName Possessive", "of Esfand" ).toString( locale() );
++ return ki18nc("Jalali month 12 - KLocale::LongName Possessive", "of Esfand").toString(locale());
+ default:
+ return QString();
+ }
+ }
+
+ // Default to LongName
+- switch ( month ) {
++ switch (month) {
+ case 1:
+- return ki18nc( "Jalali month 1 - KLocale::LongName", "Farvardin" ).toString( locale() );
++ return ki18nc("Jalali month 1 - KLocale::LongName", "Farvardin").toString(locale());
+ case 2:
+- return ki18nc( "Jalali month 2 - KLocale::LongName", "Ordibehesht" ).toString( locale() );
++ return ki18nc("Jalali month 2 - KLocale::LongName", "Ordibehesht").toString(locale());
+ case 3:
+- return ki18nc( "Jalali month 3 - KLocale::LongName", "Khordad" ).toString( locale() );
++ return ki18nc("Jalali month 3 - KLocale::LongName", "Khordad").toString(locale());
+ case 4:
+- return ki18nc( "Jalali month 4 - KLocale::LongName", "Tir" ).toString( locale() );
++ return ki18nc("Jalali month 4 - KLocale::LongName", "Tir").toString(locale());
+ case 5:
+- return ki18nc( "Jalali month 5 - KLocale::LongName", "Mordad" ).toString( locale() );
++ return ki18nc("Jalali month 5 - KLocale::LongName", "Mordad").toString(locale());
+ case 6:
+- return ki18nc( "Jalali month 6 - KLocale::LongName", "Shahrivar" ).toString( locale() );
++ return ki18nc("Jalali month 6 - KLocale::LongName", "Shahrivar").toString(locale());
+ case 7:
+- return ki18nc( "Jalali month 7 - KLocale::LongName", "Mehr" ).toString( locale() );
++ return ki18nc("Jalali month 7 - KLocale::LongName", "Mehr").toString(locale());
+ case 8:
+- return ki18nc( "Jalali month 8 - KLocale::LongName", "Aban" ).toString( locale() );
++ return ki18nc("Jalali month 8 - KLocale::LongName", "Aban").toString(locale());
+ case 9:
+- return ki18nc( "Jalali month 9 - KLocale::LongName", "Azar" ).toString( locale() );
++ return ki18nc("Jalali month 9 - KLocale::LongName", "Azar").toString(locale());
+ case 10:
+- return ki18nc( "Jalali month 10 - KLocale::LongName", "Dei" ).toString( locale() );
++ return ki18nc("Jalali month 10 - KLocale::LongName", "Dei").toString(locale());
+ case 11:
+- return ki18nc( "Jalali month 11 - KLocale::LongName", "Bahman" ).toString( locale() );
++ return ki18nc("Jalali month 11 - KLocale::LongName", "Bahman").toString(locale());
+ case 12:
+- return ki18nc( "Jalali month 12 - KLocale::LongName", "Esfand" ).toString( locale() );
++ return ki18nc("Jalali month 12 - KLocale::LongName", "Esfand").toString(locale());
+ default:
+ return QString();
+ }
+ }
+
+-QString KCalendarSystemJalaliPrivate::weekDayName( int weekDay, KLocale::DateTimeComponentFormat format ) const
++QString KCalendarSystemJalaliPrivate::weekDayName(int weekDay, KLocale::DateTimeComponentFormat format) const
+ {
+- if ( format == KLocale::NarrowName ) {
+- switch ( weekDay ) {
++ if (format == KLocale::NarrowName) {
++ switch (weekDay) {
+ case 1:
+- return ki18nc( "Jalali weekday 1 - KLocale::NarrowName ", "2" ).toString( locale() );
++ return ki18nc("Jalali weekday 1 - KLocale::NarrowName ", "2").toString(locale());
+ case 2:
+- return ki18nc( "Jalali weekday 2 - KLocale::NarrowName ", "3" ).toString( locale() );
++ return ki18nc("Jalali weekday 2 - KLocale::NarrowName ", "3").toString(locale());
+ case 3:
+- return ki18nc( "Jalali weekday 3 - KLocale::NarrowName ", "4" ).toString( locale() );
++ return ki18nc("Jalali weekday 3 - KLocale::NarrowName ", "4").toString(locale());
+ case 4:
+- return ki18nc( "Jalali weekday 4 - KLocale::NarrowName ", "5" ).toString( locale() );
++ return ki18nc("Jalali weekday 4 - KLocale::NarrowName ", "5").toString(locale());
+ case 5:
+- return ki18nc( "Jalali weekday 5 - KLocale::NarrowName ", "J" ).toString( locale() );
++ return ki18nc("Jalali weekday 5 - KLocale::NarrowName ", "J").toString(locale());
+ case 6:
+- return ki18nc( "Jalali weekday 6 - KLocale::NarrowName ", "S" ).toString( locale() );
++ return ki18nc("Jalali weekday 6 - KLocale::NarrowName ", "S").toString(locale());
+ case 7:
+- return ki18nc( "Jalali weekday 7 - KLocale::NarrowName ", "1" ).toString( locale() );
++ return ki18nc("Jalali weekday 7 - KLocale::NarrowName ", "1").toString(locale());
+ default:
+ return QString();
+ }
+ }
+
+- if ( format == KLocale::ShortName || format == KLocale:: ShortNumber ) {
+- switch ( weekDay ) {
++ if (format == KLocale::ShortName || format == KLocale:: ShortNumber) {
++ switch (weekDay) {
+ case 1:
+- return ki18nc( "Jalali weekday 1 - KLocale::ShortName", "2sh" ).toString( locale() );
++ return ki18nc("Jalali weekday 1 - KLocale::ShortName", "2sh").toString(locale());
+ case 2:
+- return ki18nc( "Jalali weekday 2 - KLocale::ShortName", "3sh" ).toString( locale() );
++ return ki18nc("Jalali weekday 2 - KLocale::ShortName", "3sh").toString(locale());
+ case 3:
+- return ki18nc( "Jalali weekday 3 - KLocale::ShortName", "4sh" ).toString( locale() );
++ return ki18nc("Jalali weekday 3 - KLocale::ShortName", "4sh").toString(locale());
+ case 4:
+- return ki18nc( "Jalali weekday 4 - KLocale::ShortName", "5sh" ).toString( locale() );
++ return ki18nc("Jalali weekday 4 - KLocale::ShortName", "5sh").toString(locale());
+ case 5:
+- return ki18nc( "Jalali weekday 5 - KLocale::ShortName", "Jom" ).toString( locale() );
++ return ki18nc("Jalali weekday 5 - KLocale::ShortName", "Jom").toString(locale());
+ case 6:
+- return ki18nc( "Jalali weekday 6 - KLocale::ShortName", "Shn" ).toString( locale() );
++ return ki18nc("Jalali weekday 6 - KLocale::ShortName", "Shn").toString(locale());
+ case 7:
+- return ki18nc( "Jalali weekday 7 - KLocale::ShortName", "1sh" ).toString( locale() );
++ return ki18nc("Jalali weekday 7 - KLocale::ShortName", "1sh").toString(locale());
+ default: return QString();
+ }
+ }
+
+- switch ( weekDay ) {
++ switch (weekDay) {
+ case 1:
+- return ki18nc( "Jalali weekday 1 - KLocale::LongName", "Do shanbe" ).toString( locale() );
++ return ki18nc("Jalali weekday 1 - KLocale::LongName", "Do shanbe").toString(locale());
+ case 2:
+- return ki18nc( "Jalali weekday 2 - KLocale::LongName", "Se shanbe" ).toString( locale() );
++ return ki18nc("Jalali weekday 2 - KLocale::LongName", "Se shanbe").toString(locale());
+ case 3:
+- return ki18nc( "Jalali weekday 3 - KLocale::LongName", "Chahar shanbe" ).toString( locale() );
++ return ki18nc("Jalali weekday 3 - KLocale::LongName", "Chahar shanbe").toString(locale());
+ case 4:
+- return ki18nc( "Jalali weekday 4 - KLocale::LongName", "Panj shanbe" ).toString( locale() );
++ return ki18nc("Jalali weekday 4 - KLocale::LongName", "Panj shanbe").toString(locale());
+ case 5:
+- return ki18nc( "Jalali weekday 5 - KLocale::LongName", "Jumee" ).toString( locale() );
++ return ki18nc("Jalali weekday 5 - KLocale::LongName", "Jumee").toString(locale());
+ case 6:
+- return ki18nc( "Jalali weekday 6 - KLocale::LongName", "Shanbe" ).toString( locale() );
++ return ki18nc("Jalali weekday 6 - KLocale::LongName", "Shanbe").toString(locale());
+ case 7:
+- return ki18nc( "Jalali weekday 7 - KLocale::LongName", "Yek-shanbe" ).toString( locale() );
++ return ki18nc("Jalali weekday 7 - KLocale::LongName", "Yek-shanbe").toString(locale());
+ default:
+ return QString();
+ }
+ }
+
+
+-KCalendarSystemJalali::KCalendarSystemJalali( const KLocale *locale )
+- : KCalendarSystem( *new KCalendarSystemJalaliPrivate( this ), KSharedConfig::Ptr(), locale ),
+- dont_use( 0 )
++KCalendarSystemJalali::KCalendarSystemJalali(const KLocale *locale)
++ : KCalendarSystem(*new KCalendarSystemJalaliPrivate(this), KSharedConfig::Ptr(), locale)
+ {
+- d_ptr->loadConfig( calendarType() );
++ d_ptr->loadConfig(calendarType());
+ }
+
+-KCalendarSystemJalali::KCalendarSystemJalali( const KSharedConfig::Ptr config, const KLocale *locale )
+- : KCalendarSystem( *new KCalendarSystemJalaliPrivate( this ), config, locale ),
+- dont_use( 0 )
++KCalendarSystemJalali::KCalendarSystemJalali(const KSharedConfig::Ptr config, const KLocale *locale)
++ : KCalendarSystem(*new KCalendarSystemJalaliPrivate(this), config, locale)
+ {
+- d_ptr->loadConfig( calendarType() );
++ d_ptr->loadConfig(calendarType());
+ }
+
+-KCalendarSystemJalali::KCalendarSystemJalali( KCalendarSystemJalaliPrivate &dd,
+- const KSharedConfig::Ptr config, const KLocale *locale )
+- : KCalendarSystem( dd, config, locale ),
+- dont_use( 0 )
++KCalendarSystemJalali::KCalendarSystemJalali(KCalendarSystemJalaliPrivate &dd,
++ const KSharedConfig::Ptr config, const KLocale *locale)
++ : KCalendarSystem(dd, config, locale)
+ {
+- d_ptr->loadConfig( calendarType() );
++ d_ptr->loadConfig(calendarType());
+ }
+
+ KCalendarSystemJalali::~KCalendarSystemJalali()
+ {
+- delete dont_use;
+ }
+
+ QString KCalendarSystemJalali::calendarType() const
+ {
+- return QLatin1String( "jalali" );
++ return QLatin1String("jalali");
+ }
+
+ QDate KCalendarSystemJalali::epoch() const
+ {
+ // 19 March 622 in the Julian calendar
+- return QDate::fromJulianDay( 1948321 );
++ return QDate::fromJulianDay(1948321);
+ }
+
+ QDate KCalendarSystemJalali::earliestValidDate() const
+ {
+ // Using the Birashk formula which is accurate in period AP 1244 to 1530 (AD 1865 to 2152)
+ // 1244-01-01 Jalali 1865-03-21 Gregorian
+- return QDate::fromJulianDay( 2402317 );
++ return QDate::fromJulianDay(2402317);
+ }
+
+ QDate KCalendarSystemJalali::latestValidDate() const
+ {
+ // Using the Birashk formula which is accurate in period AP 1244 to 1530 (AD 1865 to 2152)
+ // 1530-12-29 Jalali 2152-03-19 Gregorian
+- return QDate::fromJulianDay( 2507140 );
++ return QDate::fromJulianDay(2507140);
+ }
+
+-bool KCalendarSystemJalali::isValid( int year, int month, int day ) const
++bool KCalendarSystemJalali::isValid(int year, int month, int day) const
+ {
+- return KCalendarSystem::isValid( year, month, day );
++ return KCalendarSystem::isValid(year, month, day);
+ }
+
+-bool KCalendarSystemJalali::isValid( const QDate &date ) const
++bool KCalendarSystemJalali::isValid(const QDate &date) const
+ {
+- return KCalendarSystem::isValid( date );
++ return KCalendarSystem::isValid(date);
+ }
+
+-bool KCalendarSystemJalali::setDate( QDate &date, int year, int month, int day ) const
++bool KCalendarSystemJalali::isLeapYear(int year) const
+ {
+- return KCalendarSystem::setDate( date, year, month, day );
++ return KCalendarSystem::isLeapYear(year);
+ }
+
+-// Deprecated
+-bool KCalendarSystemJalali::setYMD( QDate &date, int year, int month, int day ) const
++bool KCalendarSystemJalali::isLeapYear(const QDate &date) const
+ {
+- return KCalendarSystem::setYMD( date, year, month, day );
++ return KCalendarSystem::isLeapYear(date);
+ }
+
+-int KCalendarSystemJalali::year( const QDate &date ) const
++QString KCalendarSystemJalali::monthName(int month, int year, MonthNameFormat format) const
+ {
+- return KCalendarSystem::year( date );
++ return KCalendarSystem::monthName(month, year, format);
+ }
+
+-int KCalendarSystemJalali::month ( const QDate& date ) const
+-
+-{
+- return KCalendarSystem::month( date );
+-}
+-
+-int KCalendarSystemJalali::day( const QDate &date ) const
+-{
+- return KCalendarSystem::day( date );
+-}
+-
+-QDate KCalendarSystemJalali::addYears( const QDate &date, int nyears ) const
+-{
+- return KCalendarSystem::addYears( date, nyears );
+-}
+-
+-QDate KCalendarSystemJalali::addMonths( const QDate &date, int nmonths ) const
+-{
+- return KCalendarSystem::addMonths( date, nmonths );
+-}
+-
+-QDate KCalendarSystemJalali::addDays( const QDate &date, int ndays ) const
+-{
+- return KCalendarSystem::addDays( date, ndays );
+-}
+-
+-int KCalendarSystemJalali::monthsInYear( const QDate &date ) const
+-{
+- return KCalendarSystem::monthsInYear( date );
+-}
+-
+-int KCalendarSystemJalali::weeksInYear( const QDate &date ) const
+-{
+- return KCalendarSystem::weeksInYear( date );
+-}
+-
+-int KCalendarSystemJalali::weeksInYear( int year ) const
+-{
+- return KCalendarSystem::weeksInYear( year );
+-}
+-
+-int KCalendarSystemJalali::daysInYear( const QDate &date ) const
+-{
+- return KCalendarSystem::daysInYear( date );
+-}
+-
+-int KCalendarSystemJalali::daysInMonth( const QDate &date ) const
+-{
+- return KCalendarSystem::daysInMonth( date );
+-}
+-
+-int KCalendarSystemJalali::daysInWeek( const QDate &date ) const
+-{
+- return KCalendarSystem::daysInWeek( date );
+-}
+-
+-int KCalendarSystemJalali::dayOfYear( const QDate &date ) const
+-{
+- return KCalendarSystem::dayOfYear( date );
+-}
+-
+-int KCalendarSystemJalali::dayOfWeek( const QDate &date ) const
+-{
+- return KCalendarSystem::dayOfWeek( date );
+-}
+-
+-int KCalendarSystemJalali::weekNumber( const QDate &date, int *yearNum ) const
+-{
+- return KCalendarSystem::weekNumber( date, yearNum );
+-}
+-
+-bool KCalendarSystemJalali::isLeapYear( int year ) const
+-{
+- return KCalendarSystem::isLeapYear( year );
+-}
+-
+-bool KCalendarSystemJalali::isLeapYear( const QDate &date ) const
+-{
+- return KCalendarSystem::isLeapYear( date );
+-}
+-
+-QString KCalendarSystemJalali::monthName( int month, int year, MonthNameFormat format ) const
+-{
+- return KCalendarSystem::monthName( month, year, format );
+-}
+-
+-QString KCalendarSystemJalali::monthName( const QDate &date, MonthNameFormat format ) const
+-{
+- return KCalendarSystem::monthName( date, format );
+-}
+-
+-QString KCalendarSystemJalali::weekDayName( int weekDay, WeekDayNameFormat format ) const
+-{
+- return KCalendarSystem::weekDayName( weekDay, format );
+-}
+-
+-QString KCalendarSystemJalali::weekDayName( const QDate &date, WeekDayNameFormat format ) const
+-{
+- return KCalendarSystem::weekDayName( date, format );
+-}
+-
+-QString KCalendarSystemJalali::yearString( const QDate &pDate, StringFormat format ) const
+-{
+- return KCalendarSystem::yearString( pDate, format );
+-}
+-
+-QString KCalendarSystemJalali::monthString( const QDate &pDate, StringFormat format ) const
+-{
+- return KCalendarSystem::monthString( pDate, format );
+-}
+-
+-QString KCalendarSystemJalali::dayString( const QDate &pDate, StringFormat format ) const
+-{
+- return KCalendarSystem::dayString( pDate, format );
+-}
+-
+-int KCalendarSystemJalali::yearStringToInteger( const QString &sNum, int &iLength ) const
+-{
+- return KCalendarSystem::yearStringToInteger( sNum, iLength );
+-}
+-
+-int KCalendarSystemJalali::monthStringToInteger( const QString &sNum, int &iLength ) const
+-{
+- return KCalendarSystem::monthStringToInteger( sNum, iLength );
+-}
+-
+-int KCalendarSystemJalali::dayStringToInteger( const QString & sNum, int & iLength ) const
+-{
+- return KCalendarSystem::dayStringToInteger( sNum, iLength );
+-}
+-
+-QString KCalendarSystemJalali::formatDate( const QDate &date, KLocale::DateFormat format ) const
+-{
+- return KCalendarSystem::formatDate( date, format );
+-}
+-
+-QDate KCalendarSystemJalali::readDate( const QString &str, bool *ok ) const
+-{
+- return KCalendarSystem::readDate( str, ok );
+-}
+-
+-QDate KCalendarSystemJalali::readDate( const QString &intstr, const QString &fmt, bool *ok ) const
++QString KCalendarSystemJalali::monthName(const QDate &date, MonthNameFormat format) const
+ {
+- return KCalendarSystem::readDate( intstr, fmt, ok );
++ return KCalendarSystem::monthName(date, format);
+ }
+
+-QDate KCalendarSystemJalali::readDate( const QString &str, KLocale::ReadDateFlags flags, bool *ok ) const
++QString KCalendarSystemJalali::weekDayName(int weekDay, WeekDayNameFormat format) const
+ {
+- return KCalendarSystem::readDate( str, flags, ok );
++ return KCalendarSystem::weekDayName(weekDay, format);
+ }
+
+-int KCalendarSystemJalali::weekStartDay() const
++QString KCalendarSystemJalali::weekDayName(const QDate &date, WeekDayNameFormat format) const
+ {
+- return KCalendarSystem::weekStartDay();
++ return KCalendarSystem::weekDayName(date, format);
+ }
+
+ int KCalendarSystemJalali::weekDayOfPray() const
+@@ -658,20 +512,20 @@ bool KCalendarSystemJalali::isProleptic() const
+ return false;
+ }
+
+-bool KCalendarSystemJalali::julianDayToDate( int jd, int &year, int &month, int &day ) const
++bool KCalendarSystemJalali::julianDayToDate(int jd, int &year, int &month, int &day) const
+ {
+ // Birashk algorithm is incorrect in two years in period AP 1244 to 1531.
+ // This results in a leap day being added to the end of 1404 instead of 1403
+ // and to the end of 1437 instead of 1436. Check for these dates first and
+ // return accordingly. Relies on later use of dateToJulianDay() to correctly
+ // calculate firstDayOfYear in 1404 and 1437, so no other adjustments needed.
+- if ( jd == 2460755 ) {
++ if (jd == 2460755) {
+ year = 1403;
+ month = 12;
+ day = 30;
+ return true;
+ }
+- if ( jd == 2472808 ) {
++ if (jd == 2472808) {
+ year = 1436;
+ month = 12;
+ day = 30;
+@@ -686,54 +540,54 @@ bool KCalendarSystemJalali::julianDayToDate( int jd, int &year, int &month, int
+ int cycle;
+ int dayInCycle;
+ int yearInCycle;
+- dateToJulianDay( 475, 1, 1, jdCycleStart );
++ dateToJulianDay(475, 1, 1, jdCycleStart);
+ daysSinceCycleStart = jd - jdCycleStart;
+ cycle = daysSinceCycleStart / 1029983;
+ dayInCycle = daysSinceCycleStart % 1029983;
+- if ( dayInCycle == 1029982 ) {
++ if (dayInCycle == 1029982) {
+ yearInCycle = 2820;
+ } else {
+ int aux1 = dayInCycle / 366;
+ int aux2 = dayInCycle % 366;
+- yearInCycle = ( ( ( 2134 * aux1 ) + ( 2816 * aux2 ) + 2815 ) / 1028522 ) + aux1 + 1;
++ yearInCycle = (((2134 * aux1) + (2816 * aux2) + 2815) / 1028522) + aux1 + 1;
+ }
+- year = yearInCycle + ( 2820 * cycle ) + 474;
+- if ( year <= 0 ) {
++ year = yearInCycle + (2820 * cycle) + 474;
++ if (year <= 0) {
+ year = year - 1;
+ }
+
+ int firstDayOfYear;
+- dateToJulianDay( year, 1, 1, firstDayOfYear );
++ dateToJulianDay(year, 1, 1, firstDayOfYear);
+ int dayinYear = jd - firstDayOfYear + 1;
+- if( dayinYear <= 186 ) {
+- month = ( ( dayinYear - 1 ) / 31 ) + 1;
+- day = dayinYear - ( ( month - 1 ) * 31 );
++ if (dayinYear <= 186) {
++ month = ((dayinYear - 1) / 31) + 1;
++ day = dayinYear - ((month - 1) * 31);
+ } else {
+- month = ( ( dayinYear - 7 ) / 30 ) + 1;
+- day = dayinYear - ( ( month - 1 ) * 30 ) - 6;
++ month = ((dayinYear - 7) / 30) + 1;
++ day = dayinYear - ((month - 1) * 30) - 6;
+ }
+
+ return true;
+ }
+
+-bool KCalendarSystemJalali::dateToJulianDay( int year, int month, int day, int &jd ) const
++bool KCalendarSystemJalali::dateToJulianDay(int year, int month, int day, int &jd) const
+ {
+- Q_D( const KCalendarSystemJalali );
++ Q_D(const KCalendarSystemJalali);
+
+ // Birashk algorithm is incorrect in two years in period AP 1244 to 1531.
+ // This results in a leap day being added to the end of 1404 instead of 1403
+ // and to the end of 1437 instead of 1436. Thus all dates in 1404 and 1437
+ // are off by 1 JD. Check for these dates first and adjust accordingly.
+- if ( year == 1403 && month == 12 && day == 30 ) {
++ if (year == 1403 && month == 12 && day == 30) {
+ jd = 2460755;
+ return true;
+ }
+- if ( year == 1436 && month == 12 && day == 30 ) {
++ if (year == 1436 && month == 12 && day == 30) {
+ jd = 2472808;
+ return true;
+ }
+- if ( year == 1404 || year == 1437 ) {
+- if ( month < 12 && day + 1 > d->daysInMonth( year, month ) ) {
++ if (year == 1404 || year == 1437) {
++ if (month < 12 && day + 1 > d->daysInMonth(year, month)) {
+ day = 1;
+ month = month + 1;
+ } else {
+@@ -747,24 +601,24 @@ bool KCalendarSystemJalali::dateToJulianDay( int year, int month, int day, int &
+ long epyear;
+ long monthDays;
+
+- if ( year >= 0 ) {
++ if (year >= 0) {
+ epbase = year - 474;
+ } else {
+ epbase = year - 473;
+ }
+
+- epyear = 474 + ( epbase % 2820 );
++ epyear = 474 + (epbase % 2820);
+
+- if ( month <= 7 ) {
+- monthDays = ( month - 1 ) * 31;
++ if (month <= 7) {
++ monthDays = (month - 1) * 31;
+ } else {
+- monthDays = ( ( month - 1 ) * 30 ) + 6;
++ monthDays = ((month - 1) * 30) + 6;
+ }
+
+- jd = ( epoch().toJulianDay() - 1 ) + // days before epoch
+- ( epyear - 1 ) * 365 + // normal days in previous years
+- ( ( ( epyear * 682 ) - 110 ) / 2816 ) + // leap days in previous years
+- ( epbase / 2820 ) * 1029983 +
++ jd = (epoch().toJulianDay() - 1) + // days before epoch
++ (epyear - 1) * 365 + // normal days in previous years
++ (((epyear * 682) - 110) / 2816) + // leap days in previous years
++ (epbase / 2820) * 1029983 +
+ monthDays + // days in previous months this year
+ day; // days in this month
+
+diff --git a/kdecore/date/kcalendarsystemjalali_p.h b/kdecore/date/kcalendarsystemjalali_p.h
+index d1b8350..6ae44ea 100644
+--- a/kdecore/date/kcalendarsystemjalali_p.h
++++ b/kdecore/date/kcalendarsystemjalali_p.h
+@@ -32,8 +32,8 @@ class KCalendarSystemJalaliPrivate;
+ class KCalendarSystemJalali : public KCalendarSystem
+ {
+ public:
+- explicit KCalendarSystemJalali( const KLocale * locale = 0 );
+- explicit KCalendarSystemJalali( const KSharedConfig::Ptr config, const KLocale *locale = 0 );
++ explicit KCalendarSystemJalali(const KLocale * locale = 0);
++ explicit KCalendarSystemJalali(const KSharedConfig::Ptr config, const KLocale *locale = 0);
+ virtual ~KCalendarSystemJalali();
+
+ virtual QString calendarType() const;
+@@ -41,58 +41,19 @@ public:
+ virtual QDate epoch() const;
+ virtual QDate earliestValidDate() const;
+ virtual QDate latestValidDate() const;
+- virtual bool isValid( int year, int month, int day ) const;
+- virtual bool isValid( const QDate &date ) const;
++ virtual bool isValid(int year, int month, int day) const;
++ virtual bool isValid(const QDate &date) const;
+
+- virtual bool setDate( QDate &date, int year, int month, int day ) const;
+- /** @deprecated */
+- virtual bool setYMD( QDate &date, int year, int month, int day ) const;
++ virtual bool isLeapYear(int year) const;
++ virtual bool isLeapYear(const QDate &date) const;
+
+- virtual int year( const QDate &date ) const;
+- virtual int month( const QDate &date ) const;
+- virtual int day( const QDate &date ) const;
++ virtual QString monthName(int month, int year, MonthNameFormat format = LongName) const;
++ virtual QString monthName(const QDate &date, MonthNameFormat format = LongName) const;
+
+- virtual QDate addYears( const QDate &date, int nyears ) const;
+- virtual QDate addMonths( const QDate &date, int nmonths ) const;
+- virtual QDate addDays( const QDate &date, int ndays ) const;
++ virtual QString weekDayName(int weekDay, WeekDayNameFormat format = LongDayName) const;
++ virtual QString weekDayName(const QDate &date, WeekDayNameFormat format = LongDayName) const;
+
+- virtual int monthsInYear( const QDate &date ) const;
+- virtual int weeksInYear( const QDate &date ) const;
+- virtual int weeksInYear( int year ) const;
+- virtual int daysInYear( const QDate &date ) const;
+- virtual int daysInMonth( const QDate &date ) const;
+- virtual int daysInWeek( const QDate &date ) const;
+-
+- virtual int dayOfYear( const QDate &date ) const;
+- virtual int dayOfWeek( const QDate &date ) const;
+-
+- virtual int weekNumber( const QDate &date, int *yearNum = 0 ) const;
+-
+- virtual bool isLeapYear( int year ) const;
+- virtual bool isLeapYear( const QDate &date ) const;
+-
+- virtual QString monthName( int month, int year, MonthNameFormat format = LongName ) const;
+- virtual QString monthName( const QDate &date, MonthNameFormat format = LongName ) const;
+-
+- virtual QString weekDayName( int weekDay, WeekDayNameFormat format = LongDayName ) const;
+- virtual QString weekDayName( const QDate &date, WeekDayNameFormat format = LongDayName ) const;
+-
+- virtual QString yearString( const QDate & pDate, StringFormat format = LongFormat ) const;
+- virtual QString monthString( const QDate &pDate, StringFormat format = LongFormat ) const;
+- virtual QString dayString( const QDate &pDate, StringFormat format = LongFormat ) const;
+-
+- virtual int yearStringToInteger( const QString &sNum, int &iLength ) const;
+- virtual int monthStringToInteger( const QString &sNum, int &iLength ) const;
+- virtual int dayStringToInteger( const QString &sNum, int &iLength ) const;
+-
+- virtual QString formatDate( const QDate &fromDate, KLocale::DateFormat toFormat = KLocale::LongDate ) const;
+-
+- virtual QDate readDate( const QString &str, bool *ok = 0 ) const;
+- virtual QDate readDate( const QString &dateString, const QString &dateFormat, bool *ok = 0 ) const;
+- virtual QDate readDate( const QString &str, KLocale::ReadDateFlags flags, bool *ok = 0 ) const;
+-
+- virtual int weekStartDay() const;
+- virtual int weekDayOfPray () const;
++ virtual int weekDayOfPray() const;
+
+ virtual bool isLunar() const;
+ virtual bool isLunisolar() const;
+@@ -100,15 +61,14 @@ public:
+ virtual bool isProleptic() const;
+
+ protected:
+- virtual bool julianDayToDate( int jd, int &year, int &month, int &day ) const;
+- virtual bool dateToJulianDay( int year, int month, int day, int &jd ) const;
+- KCalendarSystemJalali( KCalendarSystemJalaliPrivate &dd,
+- const KSharedConfig::Ptr config = KSharedConfig::Ptr(),
+- const KLocale *locale = 0 );
++ virtual bool julianDayToDate(int jd, int &year, int &month, int &day) const;
++ virtual bool dateToJulianDay(int year, int month, int day, int &jd) const;
++ KCalendarSystemJalali(KCalendarSystemJalaliPrivate &dd,
++ const KSharedConfig::Ptr config = KSharedConfig::Ptr(),
++ const KLocale *locale = 0);
+
+ private:
+- Q_DECLARE_PRIVATE( KCalendarSystemJalali )
+- KCalendarSystemJalaliPrivate * const dont_use; // KDE5 remove, use shared d
++ Q_DECLARE_PRIVATE(KCalendarSystemJalali)
+ };
+
+ #endif // KCALENDARSYSTEMJALALI_H
+diff --git a/kdecore/date/kcalendarsystemjapanese.cpp b/kdecore/date/kcalendarsystemjapanese.cpp
+index feabd38..4d4e58a 100644
+--- a/kdecore/date/kcalendarsystemjapanese.cpp
++++ b/kdecore/date/kcalendarsystemjapanese.cpp
+@@ -18,18 +18,18 @@
+ */
+
+ #include "kcalendarsystemjapanese_p.h"
+-#include "kcalendarsystemgregorianprolepticprivate_p.h"
++#include "kcalendarsystemgregorianprivate_p.h"
+
+ #include "kdebug.h"
+ #include "klocale.h"
+
+ #include <QtCore/QDate>
+
+-//Reuse the Gregorian Proleptic private implementation
+-class KCalendarSystemJapanesePrivate : public KCalendarSystemGregorianProlepticPrivate
++//Reuse the Gregorian private implementation
++class KCalendarSystemJapanesePrivate : public KCalendarSystemGregorianPrivate
+ {
+ public:
+- explicit KCalendarSystemJapanesePrivate( KCalendarSystemJapanese *q );
++ explicit KCalendarSystemJapanesePrivate(KCalendarSystemJapanese *q);
+ virtual ~KCalendarSystemJapanesePrivate();
+
+ virtual KLocale::CalendarSystem calendarSystem() const;
+@@ -37,10 +37,10 @@ public:
+ virtual int earliestValidYear() const;
+ };
+
+-//Override only a few of the Gregorian Proleptic private methods
++//Override only a few of the Gregorian private methods
+
+-KCalendarSystemJapanesePrivate::KCalendarSystemJapanesePrivate( KCalendarSystemJapanese *q )
+- : KCalendarSystemGregorianProlepticPrivate( q )
++KCalendarSystemJapanesePrivate::KCalendarSystemJapanesePrivate(KCalendarSystemJapanese *q)
++ : KCalendarSystemGregorianPrivate(q)
+ {
+ }
+
+@@ -60,38 +60,38 @@ void KCalendarSystemJapanesePrivate::loadDefaultEraList()
+ // Nengō, Only do most recent for now, use AD for the rest.
+ // Feel free to add more, but have mercy on the translators :-)
+
+- name = i18nc( "Calendar Era: Gregorian Christian Era, years > 0, LongFormat", "Anno Domini" );
+- shortName = i18nc( "Calendar Era: Gregorian Christian Era, years > 0, ShortFormat", "AD" );
+- format = i18nc( "(kdedt-format) Gregorian, AD, full era year format used for %EY, e.g. 2000 AD", "%Ey %EC" );
+- addEra( '+', 1, q->epoch(), 1, QDate( 1868, 9, 7 ), name, shortName, format );
++ name = i18nc("Calendar Era: Gregorian Christian Era, years > 0, LongFormat", "Anno Domini");
++ shortName = i18nc("Calendar Era: Gregorian Christian Era, years > 0, ShortFormat", "AD");
++ format = i18nc("(kdedt-format) Gregorian, AD, full era year format used for %EY, e.g. 2000 AD", "%Ey %EC");
++ addEra('+', 1, q->epoch(), 1, QDate(1868, 9, 7), name, shortName, format);
+
+- name = i18nc( "Calendar Era: Japanese Nengō, Meiji Era, LongFormat", "Meiji" );
++ name = i18nc("Calendar Era: Japanese Nengō, Meiji Era, LongFormat", "Meiji");
+ shortName = name;
+- format = i18nc( "(kdedt-format) Japanese, Meiji, full era year format used for %EY, year = 1, e.g. Meiji 1", "%EC Gannen" );
+- addEra( '+', 1, QDate( 1868, 9, 8 ), 1868, QDate( 1868, 12, 31 ), name, shortName, format );
+- format = i18nc( "(kdedt-format) Japanese, Meiji, full era year format used for %EY, year > 1, e.g. Meiji 22", "%EC %Ey" );
+- addEra( '+', 2, QDate( 1869, 1, 1 ), 1869, QDate( 1912, 7, 29 ), name, shortName, format );
++ format = i18nc("(kdedt-format) Japanese, Meiji, full era year format used for %EY, year = 1, e.g. Meiji 1", "%EC Gannen");
++ addEra('+', 1, QDate(1868, 9, 8), 1868, QDate(1868, 12, 31), name, shortName, format);
++ format = i18nc("(kdedt-format) Japanese, Meiji, full era year format used for %EY, year > 1, e.g. Meiji 22", "%EC %Ey");
++ addEra('+', 2, QDate(1869, 1, 1), 1869, QDate(1912, 7, 29), name, shortName, format);
+
+- name = i18nc( "Calendar Era: Japanese Nengō, Taishō Era, LongFormat", "Taishō" );
++ name = i18nc("Calendar Era: Japanese Nengō, Taishō Era, LongFormat", "Taishō");
+ shortName = name;
+- format = i18nc( "(kdedt-format) Japanese, Taishō, full era year format used for %EY, year = 1, e.g. Taishō 1", "%EC Gannen" );
+- addEra( '+', 1, QDate( 1912, 7, 30 ), 1912, QDate( 1912, 12, 31 ), name, shortName, format );
+- format = i18nc( "(kdedt-format) Japanese, Taishō, full era year format used for %EY, year > 1, e.g. Taishō 22", "%EC %Ey" );
+- addEra( '+', 2, QDate( 1913, 1, 1 ), 1913, QDate( 1926, 12, 24 ), name, shortName, format );
++ format = i18nc("(kdedt-format) Japanese, Taishō, full era year format used for %EY, year = 1, e.g. Taishō 1", "%EC Gannen");
++ addEra('+', 1, QDate(1912, 7, 30), 1912, QDate(1912, 12, 31), name, shortName, format);
++ format = i18nc("(kdedt-format) Japanese, Taishō, full era year format used for %EY, year > 1, e.g. Taishō 22", "%EC %Ey");
++ addEra('+', 2, QDate(1913, 1, 1), 1913, QDate(1926, 12, 24), name, shortName, format);
+
+- name = i18nc( "Calendar Era: Japanese Nengō, Shōwa Era, LongFormat", "Shōwa" );
++ name = i18nc("Calendar Era: Japanese Nengō, Shōwa Era, LongFormat", "Shōwa");
+ shortName = name;
+- format = i18nc( "(kdedt-format) Japanese, Shōwa, full era year format used for %EY, year = 1, e.g. Shōwa 1", "%EC Gannen" );
+- addEra( '+', 1, QDate( 1926, 12, 25 ), 1926, QDate( 1926, 12, 31 ), name, shortName, format );
+- format = i18nc( "(kdedt-format) Japanese, Shōwa, full era year format used for %EY, year > 1, e.g. Shōwa 22", "%EC %Ey" );
+- addEra( '+', 2, QDate( 1927, 1, 1 ), 1927, QDate( 1989, 1, 7 ), name, shortName, format );
++ format = i18nc("(kdedt-format) Japanese, Shōwa, full era year format used for %EY, year = 1, e.g. Shōwa 1", "%EC Gannen");
++ addEra('+', 1, QDate(1926, 12, 25), 1926, QDate(1926, 12, 31), name, shortName, format);
++ format = i18nc("(kdedt-format) Japanese, Shōwa, full era year format used for %EY, year > 1, e.g. Shōwa 22", "%EC %Ey");
++ addEra('+', 2, QDate(1927, 1, 1), 1927, QDate(1989, 1, 7), name, shortName, format);
+
+- name = i18nc( "Calendar Era: Japanese Nengō, Heisei Era, LongFormat", "Heisei" );
++ name = i18nc("Calendar Era: Japanese Nengō, Heisei Era, LongFormat", "Heisei");
+ shortName = name;
+- format = i18nc( "(kdedt-format) Japanese, Heisei, full era year format used for %EY, year = 1, e.g. Heisei 1", "%EC Gannen" );
+- addEra( '+', 1, QDate( 1989, 1, 8 ), 1989, QDate( 1989, 12, 31 ), name, shortName, format );
+- format = i18nc( "(kdedt-format) Japanese, Heisei, full era year format used for %EY, year > 1, e.g. Heisei 22", "%EC %Ey" );
+- addEra( '+', 2, QDate( 1990, 1, 1 ), 1990, q->latestValidDate(), name, shortName, format );
++ format = i18nc("(kdedt-format) Japanese, Heisei, full era year format used for %EY, year = 1, e.g. Heisei 1", "%EC Gannen");
++ addEra('+', 1, QDate(1989, 1, 8), 1989, QDate(1989, 12, 31), name, shortName, format);
++ format = i18nc("(kdedt-format) Japanese, Heisei, full era year format used for %EY, year > 1, e.g. Heisei 22", "%EC %Ey");
++ addEra('+', 2, QDate(1990, 1, 1), 1990, q->latestValidDate(), name, shortName, format);
+ }
+
+ int KCalendarSystemJapanesePrivate::earliestValidYear() const
+@@ -100,23 +100,23 @@ int KCalendarSystemJapanesePrivate::earliestValidYear() const
+ }
+
+
+-KCalendarSystemJapanese::KCalendarSystemJapanese( const KLocale *locale )
+- : KCalendarSystemGregorianProleptic( *new KCalendarSystemJapanesePrivate( this ), KSharedConfig::Ptr(), locale )
++KCalendarSystemJapanese::KCalendarSystemJapanese(const KLocale *locale)
++ : KCalendarSystemGregorian(*new KCalendarSystemJapanesePrivate(this), KSharedConfig::Ptr(), locale)
+ {
+- d_ptr->loadConfig( calendarType() );
++ d_ptr->loadConfig(calendarType());
+ }
+
+-KCalendarSystemJapanese::KCalendarSystemJapanese( const KSharedConfig::Ptr config, const KLocale *locale )
+- : KCalendarSystemGregorianProleptic( *new KCalendarSystemJapanesePrivate( this ), config, locale )
++KCalendarSystemJapanese::KCalendarSystemJapanese(const KSharedConfig::Ptr config, const KLocale *locale)
++ : KCalendarSystemGregorian(*new KCalendarSystemJapanesePrivate(this), config, locale)
+ {
+- d_ptr->loadConfig( calendarType() );
++ d_ptr->loadConfig(calendarType());
+ }
+
+-KCalendarSystemJapanese::KCalendarSystemJapanese( KCalendarSystemJapanesePrivate &dd,
+- const KSharedConfig::Ptr config, const KLocale *locale )
+- : KCalendarSystemGregorianProleptic( dd, config, locale )
++KCalendarSystemJapanese::KCalendarSystemJapanese(KCalendarSystemJapanesePrivate &dd,
++ const KSharedConfig::Ptr config, const KLocale *locale)
++ : KCalendarSystemGregorian(dd, config, locale)
+ {
+- d_ptr->loadConfig( calendarType() );
++ d_ptr->loadConfig(calendarType());
+ }
+
+ KCalendarSystemJapanese::~KCalendarSystemJapanese()
+@@ -125,215 +125,79 @@ KCalendarSystemJapanese::~KCalendarSystemJapanese()
+
+ QString KCalendarSystemJapanese::calendarType() const
+ {
+- return QLatin1String( "japanese" );
++ return QLatin1String("japanese");
+ }
+
+ QDate KCalendarSystemJapanese::epoch() const
+ {
+ // 0001-01-01 Gregorian for now
+- return QDate::fromJulianDay( 1721426 );
++ return QDate::fromJulianDay(1721426);
+ }
+
+ QDate KCalendarSystemJapanese::earliestValidDate() const
+ {
+ // 0001-01-01 Gregorian for now
+- return QDate::fromJulianDay( 1721426 );
++ return QDate::fromJulianDay(1721426);
+ }
+
+ QDate KCalendarSystemJapanese::latestValidDate() const
+ {
+ // Set to last day of year 9999 until confirm date formats & widgets support > 9999
+ // 9999-12-31 Gregorian
+- return QDate::fromJulianDay( 5373484 );
++ return QDate::fromJulianDay(5373484);
+ }
+
+-bool KCalendarSystemJapanese::isValid( int year, int month, int day ) const
++bool KCalendarSystemJapanese::isValid(int year, int month, int day) const
+ {
+- return KCalendarSystemGregorianProleptic::isValid( year, month, day );
++ return KCalendarSystemGregorian::isValid(year, month, day);
+ }
+
+-bool KCalendarSystemJapanese::isValid( const QDate &date ) const
++bool KCalendarSystemJapanese::isValid(const QDate &date) const
+ {
+- return KCalendarSystemGregorianProleptic::isValid( date );
++ return KCalendarSystemGregorian::isValid(date);
+ }
+
+-bool KCalendarSystemJapanese::setDate( QDate &date, int year, int month, int day ) const
++bool KCalendarSystemJapanese::isLeapYear(int year) const
+ {
+- return KCalendarSystemGregorianProleptic::setDate( date, year, month, day );
++ return KCalendarSystemGregorian::isLeapYear(year);
+ }
+
+-// Deprecated
+-bool KCalendarSystemJapanese::setYMD( QDate &date, int y, int m, int d ) const
++bool KCalendarSystemJapanese::isLeapYear(const QDate &date) const
+ {
+- return KCalendarSystemGregorianProleptic::setDate( date, y, m, d );
++ return KCalendarSystemGregorian::isLeapYear(date);
+ }
+
+-int KCalendarSystemJapanese::year( const QDate &date ) const
++QString KCalendarSystemJapanese::monthName(int month, int year, MonthNameFormat format) const
+ {
+- return KCalendarSystemGregorianProleptic::year( date );
++ return KCalendarSystemGregorian::monthName(month, year, format);
+ }
+
+-int KCalendarSystemJapanese::month( const QDate &date ) const
++QString KCalendarSystemJapanese::monthName(const QDate &date, MonthNameFormat format) const
+ {
+- return KCalendarSystemGregorianProleptic::month( date );
++ return KCalendarSystemGregorian::monthName(date, format);
+ }
+
+-int KCalendarSystemJapanese::day( const QDate &date ) const
++QString KCalendarSystemJapanese::weekDayName(int weekDay, WeekDayNameFormat format) const
+ {
+- return KCalendarSystemGregorianProleptic::day( date );
++ return KCalendarSystemGregorian::weekDayName(weekDay, format);
+ }
+
+-QDate KCalendarSystemJapanese::addYears( const QDate &date, int nyears ) const
++QString KCalendarSystemJapanese::weekDayName(const QDate &date, WeekDayNameFormat format) const
+ {
+- return KCalendarSystemGregorianProleptic::addYears( date, nyears );
++ return KCalendarSystemGregorian::weekDayName(date, format);
+ }
+
+-QDate KCalendarSystemJapanese::addMonths( const QDate &date, int nmonths ) const
++int KCalendarSystemJapanese::yearStringToInteger(const QString &sNum, int &iLength) const
+ {
+- return KCalendarSystemGregorianProleptic::addMonths( date, nmonths );
+-}
+-
+-QDate KCalendarSystemJapanese::addDays( const QDate &date, int ndays ) const
+-{
+- return KCalendarSystemGregorianProleptic::addDays( date, ndays );
+-}
+-
+-int KCalendarSystemJapanese::monthsInYear( const QDate &date ) const
+-{
+- return KCalendarSystemGregorianProleptic::monthsInYear( date );
+-}
+-
+-int KCalendarSystemJapanese::weeksInYear( const QDate &date ) const
+-{
+- return KCalendarSystemGregorianProleptic::weeksInYear( date );
+-}
+-
+-int KCalendarSystemJapanese::weeksInYear( int year ) const
+-{
+- return KCalendarSystemGregorianProleptic::weeksInYear( year );
+-}
+-
+-int KCalendarSystemJapanese::daysInYear( const QDate &date ) const
+-{
+- return KCalendarSystemGregorianProleptic::daysInYear( date );
+-}
+-
+-int KCalendarSystemJapanese::daysInMonth( const QDate &date ) const
+-{
+- return KCalendarSystemGregorianProleptic::daysInMonth( date );
+-}
+-
+-int KCalendarSystemJapanese::daysInWeek( const QDate &date ) const
+-{
+- return KCalendarSystemGregorianProleptic::daysInWeek( date );
+-}
+-
+-int KCalendarSystemJapanese::dayOfYear( const QDate &date ) const
+-{
+- return KCalendarSystemGregorianProleptic::dayOfYear( date );
+-}
+-
+-int KCalendarSystemJapanese::dayOfWeek( const QDate &date ) const
+-{
+- return KCalendarSystemGregorianProleptic::dayOfWeek( date );
+-}
+-
+-int KCalendarSystemJapanese::weekNumber( const QDate &date, int * yearNum ) const
+-{
+- return KCalendarSystemGregorianProleptic::weekNumber( date, yearNum );
+-}
+-
+-bool KCalendarSystemJapanese::isLeapYear( int year ) const
+-{
+- return KCalendarSystemGregorianProleptic::isLeapYear( year );
+-}
+-
+-bool KCalendarSystemJapanese::isLeapYear( const QDate &date ) const
+-{
+- return KCalendarSystemGregorianProleptic::isLeapYear( date );
+-}
+-
+-QString KCalendarSystemJapanese::monthName( int month, int year, MonthNameFormat format ) const
+-{
+- return KCalendarSystemGregorianProleptic::monthName( month, year, format );
+-}
+-
+-QString KCalendarSystemJapanese::monthName( const QDate &date, MonthNameFormat format ) const
+-{
+- return KCalendarSystemGregorianProleptic::monthName( date, format );
+-}
+-
+-QString KCalendarSystemJapanese::weekDayName( int weekDay, WeekDayNameFormat format ) const
+-{
+- return KCalendarSystemGregorianProleptic::weekDayName( weekDay, format );
+-}
+-
+-QString KCalendarSystemJapanese::weekDayName( const QDate &date, WeekDayNameFormat format ) const
+-{
+- return KCalendarSystemGregorianProleptic::weekDayName( date, format );
+-}
+-
+-QString KCalendarSystemJapanese::yearString( const QDate &pDate, StringFormat format ) const
+-{
+- return KCalendarSystemGregorianProleptic::yearString( pDate, format );
+-}
+-
+-QString KCalendarSystemJapanese::monthString( const QDate &pDate, StringFormat format ) const
+-{
+- return KCalendarSystemGregorianProleptic::monthString( pDate, format );
+-}
+-
+-QString KCalendarSystemJapanese::dayString( const QDate &pDate, StringFormat format ) const
+-{
+- return KCalendarSystemGregorianProleptic::dayString( pDate, format );
+-}
+-
+-int KCalendarSystemJapanese::yearStringToInteger( const QString &sNum, int &iLength ) const
+-{
+- QString gannen = i18nc( "Japanese year 1 of era", "Gannen" );
+- if ( sNum.startsWith( gannen, Qt::CaseInsensitive ) ) {
++ QString gannen = i18nc("Japanese year 1 of era", "Gannen");
++ if (sNum.startsWith(gannen, Qt::CaseInsensitive)) {
+ iLength = gannen.length();
+ return 1;
+ } else {
+- return KCalendarSystemGregorianProleptic::yearStringToInteger( sNum, iLength );
++ return KCalendarSystemGregorian::yearStringToInteger(sNum, iLength);
+ }
+ }
+
+-int KCalendarSystemJapanese::monthStringToInteger( const QString &sNum, int &iLength ) const
+-{
+- return KCalendarSystemGregorianProleptic::monthStringToInteger( sNum, iLength );
+-}
+-
+-int KCalendarSystemJapanese::dayStringToInteger( const QString &sNum, int &iLength ) const
+-{
+- return KCalendarSystemGregorianProleptic::dayStringToInteger( sNum, iLength );
+-}
+-
+-QString KCalendarSystemJapanese::formatDate( const QDate &date, KLocale::DateFormat format ) const
+-{
+- return KCalendarSystemGregorianProleptic::formatDate( date, format );
+-}
+-
+-QDate KCalendarSystemJapanese::readDate( const QString &str, bool *ok ) const
+-{
+- return KCalendarSystemGregorianProleptic::readDate( str, ok );
+-}
+-
+-QDate KCalendarSystemJapanese::readDate( const QString &intstr, const QString &fmt, bool *ok ) const
+-{
+- return KCalendarSystemGregorianProleptic::readDate( intstr, fmt, ok );
+-}
+-
+-QDate KCalendarSystemJapanese::readDate( const QString &str, KLocale::ReadDateFlags flags, bool *ok ) const
+-{
+- return KCalendarSystemGregorianProleptic::readDate( str, flags, ok );
+-}
+-
+-int KCalendarSystemJapanese::weekStartDay() const
+-{
+- return KCalendarSystemGregorianProleptic::weekStartDay();
+-}
+-
+ int KCalendarSystemJapanese::weekDayOfPray() const
+ {
+ return 7; // TODO JPL ???
+@@ -341,17 +205,17 @@ int KCalendarSystemJapanese::weekDayOfPray() const
+
+ bool KCalendarSystemJapanese::isLunar() const
+ {
+- return KCalendarSystemGregorianProleptic::isLunar();
++ return KCalendarSystemGregorian::isLunar();
+ }
+
+ bool KCalendarSystemJapanese::isLunisolar() const
+ {
+- return KCalendarSystemGregorianProleptic::isLunisolar();
++ return KCalendarSystemGregorian::isLunisolar();
+ }
+
+ bool KCalendarSystemJapanese::isSolar() const
+ {
+- return KCalendarSystemGregorianProleptic::isSolar();
++ return KCalendarSystemGregorian::isSolar();
+ }
+
+ bool KCalendarSystemJapanese::isProleptic() const
+@@ -359,12 +223,12 @@ bool KCalendarSystemJapanese::isProleptic() const
+ return false;
+ }
+
+-bool KCalendarSystemJapanese::julianDayToDate( int jd, int &year, int &month, int &day ) const
++bool KCalendarSystemJapanese::julianDayToDate(int jd, int &year, int &month, int &day) const
+ {
+- return KCalendarSystemGregorianProleptic::julianDayToDate( jd, year, month, day );
++ return KCalendarSystemGregorian::julianDayToDate(jd, year, month, day);
+ }
+
+-bool KCalendarSystemJapanese::dateToJulianDay( int year, int month, int day, int &jd ) const
++bool KCalendarSystemJapanese::dateToJulianDay(int year, int month, int day, int &jd) const
+ {
+- return KCalendarSystemGregorianProleptic::dateToJulianDay( year, month, day, jd );
++ return KCalendarSystemGregorian::dateToJulianDay(year, month, day, jd);
+ }
+diff --git a/kdecore/date/kcalendarsystemjapanese_p.h b/kdecore/date/kcalendarsystemjapanese_p.h
+index 5409dfc..1781f8e 100644
+--- a/kdecore/date/kcalendarsystemjapanese_p.h
++++ b/kdecore/date/kcalendarsystemjapanese_p.h
+@@ -20,7 +20,7 @@
+ #ifndef KCALENDARSYSTEMJAPANESE_H
+ #define KCALENDARSYSTEMJAPANESE_H
+
+-#include "kcalendarsystemgregorianproleptic_p.h"
++#include "kcalendarsystemgregorian_p.h"
+
+ class KCalendarSystemJapanesePrivate;
+
+@@ -35,11 +35,11 @@ class KCalendarSystemJapanesePrivate;
+ *
+ * @author John Layt <john@layt.net>
+ */
+-class KCalendarSystemJapanese: public KCalendarSystemGregorianProleptic
++class KCalendarSystemJapanese: public KCalendarSystemGregorian
+ {
+ public:
+- explicit KCalendarSystemJapanese( const KLocale *locale = 0 );
+- explicit KCalendarSystemJapanese( const KSharedConfig::Ptr config, const KLocale *locale = 0 );
++ explicit KCalendarSystemJapanese(const KLocale *locale = 0);
++ explicit KCalendarSystemJapanese(const KSharedConfig::Ptr config, const KLocale *locale = 0);
+ virtual ~KCalendarSystemJapanese();
+
+ virtual QString calendarType() const;
+@@ -47,58 +47,21 @@ public:
+ virtual QDate epoch() const;
+ virtual QDate earliestValidDate() const;
+ virtual QDate latestValidDate() const;
+- virtual bool isValid( int year, int month, int day ) const;
+- virtual bool isValid( const QDate &date ) const;
++ virtual bool isValid(int year, int month, int day) const;
++ virtual bool isValid(const QDate &date) const;
+
+- virtual bool setDate( QDate &date, int year, int month, int day ) const;
+- /** @deprecated */
+- virtual bool setYMD( QDate &date, int year, int month, int day ) const;
++ virtual bool isLeapYear(int year) const;
++ virtual bool isLeapYear(const QDate &date) const;
+
+- virtual int year( const QDate &date ) const;
+- virtual int month( const QDate &date ) const;
+- virtual int day( const QDate &date ) const;
++ virtual QString monthName(int month, int year, MonthNameFormat format = LongName) const;
++ virtual QString monthName(const QDate &date, MonthNameFormat format = LongName) const;
+
+- virtual QDate addYears( const QDate &date, int nyears ) const;
+- virtual QDate addMonths( const QDate &date, int nmonths ) const;
+- virtual QDate addDays( const QDate &date, int ndays ) const;
++ virtual QString weekDayName(int weekDay, WeekDayNameFormat format = LongDayName) const;
++ virtual QString weekDayName(const QDate &date, WeekDayNameFormat format = LongDayName) const;
+
+- virtual int monthsInYear( const QDate &date ) const;
+- virtual int weeksInYear( const QDate &date ) const;
+- virtual int weeksInYear( int year ) const;
+- virtual int daysInYear( const QDate &date ) const;
+- virtual int daysInMonth( const QDate &date ) const;
+- virtual int daysInWeek( const QDate &date ) const;
++ virtual int yearStringToInteger(const QString &sNum, int &iLength) const;
+
+- virtual int dayOfYear( const QDate &date ) const;
+- virtual int dayOfWeek( const QDate &date ) const;
+-
+- virtual int weekNumber( const QDate &date, int *yearNum = 0 ) const;
+-
+- virtual bool isLeapYear( int year ) const;
+- virtual bool isLeapYear( const QDate &date ) const;
+-
+- virtual QString monthName( int month, int year, MonthNameFormat format = LongName ) const;
+- virtual QString monthName( const QDate &date, MonthNameFormat format = LongName ) const;
+-
+- virtual QString weekDayName( int weekDay, WeekDayNameFormat format = LongDayName ) const;
+- virtual QString weekDayName( const QDate &date, WeekDayNameFormat format = LongDayName ) const;
+-
+- virtual QString yearString( const QDate & pDate, StringFormat format = LongFormat ) const;
+- virtual QString monthString( const QDate &pDate, StringFormat format = LongFormat ) const;
+- virtual QString dayString( const QDate &pDate, StringFormat format = LongFormat ) const;
+-
+- virtual int yearStringToInteger( const QString &sNum, int &iLength ) const;
+- virtual int monthStringToInteger( const QString &sNum, int &iLength ) const;
+- virtual int dayStringToInteger( const QString &sNum, int &iLength ) const;
+-
+- virtual QString formatDate( const QDate &fromDate, KLocale::DateFormat toFormat = KLocale::LongDate ) const;
+-
+- virtual QDate readDate( const QString &str, bool *ok = 0 ) const;
+- virtual QDate readDate( const QString &dateString, const QString &dateFormat, bool *ok = 0 ) const;
+- virtual QDate readDate( const QString &str, KLocale::ReadDateFlags flags, bool *ok = 0 ) const;
+-
+- virtual int weekStartDay() const;
+- virtual int weekDayOfPray () const;
++ virtual int weekDayOfPray() const;
+
+ virtual bool isLunar() const;
+ virtual bool isLunisolar() const;
+@@ -106,11 +69,11 @@ public:
+ virtual bool isProleptic() const;
+
+ protected:
+- virtual bool julianDayToDate( int jd, int &year, int &month, int &day ) const;
+- virtual bool dateToJulianDay( int year, int month, int day, int &jd ) const;
+- KCalendarSystemJapanese( KCalendarSystemJapanesePrivate &dd,
+- const KSharedConfig::Ptr config = KSharedConfig::Ptr(),
+- const KLocale *locale = 0 );
++ virtual bool julianDayToDate(int jd, int &year, int &month, int &day) const;
++ virtual bool dateToJulianDay(int year, int month, int day, int &jd) const;
++ KCalendarSystemJapanese(KCalendarSystemJapanesePrivate &dd,
++ const KSharedConfig::Ptr config = KSharedConfig::Ptr(),
++ const KLocale *locale = 0);
+
+ private:
+ Q_DECLARE_PRIVATE(KCalendarSystemJapanese)
+diff --git a/kdecore/date/kcalendarsystemjulian.cpp b/kdecore/date/kcalendarsystemjulian.cpp
+index 5dbb71e..3372bb5 100644
+--- a/kdecore/date/kcalendarsystemjulian.cpp
++++ b/kdecore/date/kcalendarsystemjulian.cpp
+@@ -31,34 +31,34 @@
+ class KCalendarSystemJulianPrivate : public KCalendarSystemPrivate
+ {
+ public:
+- explicit KCalendarSystemJulianPrivate( KCalendarSystemJulian *q );
++ explicit KCalendarSystemJulianPrivate(KCalendarSystemJulian *q);
+
+ virtual ~KCalendarSystemJulianPrivate();
+
+ // Virtual methods each calendar system must re-implement
+ virtual KLocale::CalendarSystem calendarSystem() const;
+ virtual void loadDefaultEraList();
+- virtual int monthsInYear( int year ) const;
+- virtual int daysInMonth( int year, int month ) const;
+- virtual int daysInYear( int year ) const;
++ virtual int monthsInYear(int year) const;
++ virtual int daysInMonth(int year, int month) const;
++ virtual int daysInYear(int year) const;
+ virtual int daysInWeek() const;
+- virtual bool isLeapYear( int year ) const;
++ virtual bool isLeapYear(int year) const;
+ virtual bool hasLeapMonths() const;
+ virtual bool hasYearZero() const;
+ virtual int maxDaysInWeek() const;
+ virtual int maxMonthsInYear() const;
+ virtual int earliestValidYear() const;
+ virtual int latestValidYear() const;
+- virtual QString monthName( int month, int year, KLocale::DateTimeComponentFormat format, bool possessive ) const;
+- virtual QString weekDayName( int weekDay, KLocale::DateTimeComponentFormat format ) const;
++ virtual QString monthName(int month, int year, KLocale::DateTimeComponentFormat format, bool possessive) const;
++ virtual QString weekDayName(int weekDay, KLocale::DateTimeComponentFormat format) const;
+
+ bool m_useCommonEra;
+ };
+
+ // Shared d pointer base class definitions
+
+-KCalendarSystemJulianPrivate::KCalendarSystemJulianPrivate( KCalendarSystemJulian *q )
+- :KCalendarSystemPrivate( q )
++KCalendarSystemJulianPrivate::KCalendarSystemJulianPrivate(KCalendarSystemJulian *q)
++ : KCalendarSystemPrivate(q)
+ {
+ }
+
+@@ -75,56 +75,56 @@ void KCalendarSystemJulianPrivate::loadDefaultEraList()
+ {
+ QString name, shortName, format;
+
+- KConfigGroup cg( config(), QString::fromLatin1( "KCalendarSystem %1" ).arg( q->calendarType() ) );
+- m_useCommonEra = cg.readEntry( "UseCommonEra", false );
++ KConfigGroup cg(config(), QString::fromLatin1("KCalendarSystem %1").arg(q->calendarType(q->calendarSystem())));
++ m_useCommonEra = cg.readEntry("UseCommonEra", false);
+
+- if ( m_useCommonEra ) {
+- name = i18nc( "Calendar Era: Julian Common Era, years < 0, LongFormat", "Before Common Era" );
+- shortName = i18nc( "Calendar Era: Julian Common Era, years < 0, ShortFormat", "BCE" );
++ if (m_useCommonEra) {
++ name = i18nc("Calendar Era: Julian Common Era, years < 0, LongFormat", "Before Common Era");
++ shortName = i18nc("Calendar Era: Julian Common Era, years < 0, ShortFormat", "BCE");
+ } else {
+- name = i18nc( "Calendar Era: Julian Christian Era, years < 0, LongFormat", "Before Christ" );
+- shortName = i18nc( "Calendar Era: Julian Christian Era, years < 0, ShortFormat", "BC" );
++ name = i18nc("Calendar Era: Julian Christian Era, years < 0, LongFormat", "Before Christ");
++ shortName = i18nc("Calendar Era: Julian Christian Era, years < 0, ShortFormat", "BC");
+ }
+- format = i18nc( "(kdedt-format) Julian, BC, full era year format used for %EY, e.g. 2000 BC", "%Ey %EC" );
+- addEra( '-', 1, q->epoch().addDays( -1 ), -1, q->earliestValidDate(), name, shortName, format );
++ format = i18nc("(kdedt-format) Julian, BC, full era year format used for %EY, e.g. 2000 BC", "%Ey %EC");
++ addEra('-', 1, q->epoch().addDays(-1), -1, q->earliestValidDate(), name, shortName, format);
+
+- if ( m_useCommonEra ) {
+- name = i18nc( "Calendar Era: Julian Common Era, years > 0, LongFormat", "Common Era" );
+- shortName = i18nc( "Calendar Era: Julian Common Era, years > 0, ShortFormat", "CE" );
++ if (m_useCommonEra) {
++ name = i18nc("Calendar Era: Julian Common Era, years > 0, LongFormat", "Common Era");
++ shortName = i18nc("Calendar Era: Julian Common Era, years > 0, ShortFormat", "CE");
+ } else {
+- name = i18nc( "Calendar Era: Julian Christian Era, years > 0, LongFormat", "Anno Domini" );
+- shortName = i18nc( "Calendar Era: Julian Christian Era, years > 0, ShortFormat", "AD" );
++ name = i18nc("Calendar Era: Julian Christian Era, years > 0, LongFormat", "Anno Domini");
++ shortName = i18nc("Calendar Era: Julian Christian Era, years > 0, ShortFormat", "AD");
+ }
+- format = i18nc( "(kdedt-format) Julian, AD, full era year format used for %EY, e.g. 2000 AD", "%Ey %EC" );
+- addEra( '+', 1, q->epoch(), 1, q->latestValidDate(), name, shortName, format );
++ format = i18nc("(kdedt-format) Julian, AD, full era year format used for %EY, e.g. 2000 AD", "%Ey %EC");
++ addEra('+', 1, q->epoch(), 1, q->latestValidDate(), name, shortName, format);
+ }
+
+-int KCalendarSystemJulianPrivate::monthsInYear( int year ) const
++int KCalendarSystemJulianPrivate::monthsInYear(int year) const
+ {
+- Q_UNUSED( year )
++ Q_UNUSED(year)
+ return 12;
+ }
+
+-int KCalendarSystemJulianPrivate::daysInMonth( int year, int month ) const
++int KCalendarSystemJulianPrivate::daysInMonth(int year, int month) const
+ {
+- if ( month == 2 ) {
+- if ( isLeapYear( year ) ) {
++ if (month == 2) {
++ if (isLeapYear(year)) {
+ return 29;
+ } else {
+ return 28;
+ }
+ }
+
+- if ( month == 4 || month == 6 || month == 9 || month == 11 ) {
++ if (month == 4 || month == 6 || month == 9 || month == 11) {
+ return 30;
+ }
+
+ return 31;
+ }
+
+-int KCalendarSystemJulianPrivate::daysInYear( int year ) const
++int KCalendarSystemJulianPrivate::daysInYear(int year) const
+ {
+- if ( isLeapYear( year ) ) {
++ if (isLeapYear(year)) {
+ return 366;
+ } else {
+ return 365;
+@@ -136,13 +136,13 @@ int KCalendarSystemJulianPrivate::daysInWeek() const
+ return 7;
+ }
+
+-bool KCalendarSystemJulianPrivate::isLeapYear( int year ) const
++bool KCalendarSystemJulianPrivate::isLeapYear(int year) const
+ {
+- if ( year < 1 ) {
++ if (year < 1) {
+ year = year + 1;
+ }
+
+- if ( year % 4 == 0 ) {
++ if (year % 4 == 0) {
+ return true;
+ }
+
+@@ -179,459 +179,314 @@ int KCalendarSystemJulianPrivate::latestValidYear() const
+ return 9999;
+ }
+
+-QString KCalendarSystemJulianPrivate::monthName( int month, int year, KLocale::DateTimeComponentFormat format, bool possessive ) const
++QString KCalendarSystemJulianPrivate::monthName(int month, int year, KLocale::DateTimeComponentFormat format, bool possessive) const
+ {
+- Q_UNUSED( year );
++ Q_UNUSED(year);
+
+- if ( format == KLocale::NarrowName ) {
+- switch ( month ) {
++ if (format == KLocale::NarrowName) {
++ switch (month) {
+ case 1:
+- return ki18nc( "Julian month 1 - KLocale::NarrowName", "J" ).toString( locale() );
++ return ki18nc("Julian month 1 - KLocale::NarrowName", "J").toString(locale());
+ case 2:
+- return ki18nc( "Julian month 2 - KLocale::NarrowName", "F" ).toString( locale() );
++ return ki18nc("Julian month 2 - KLocale::NarrowName", "F").toString(locale());
+ case 3:
+- return ki18nc( "Julian month 3 - KLocale::NarrowName", "M" ).toString( locale() );
++ return ki18nc("Julian month 3 - KLocale::NarrowName", "M").toString(locale());
+ case 4:
+- return ki18nc( "Julian month 4 - KLocale::NarrowName", "A" ).toString( locale() );
++ return ki18nc("Julian month 4 - KLocale::NarrowName", "A").toString(locale());
+ case 5:
+- return ki18nc( "Julian month 5 - KLocale::NarrowName", "M" ).toString( locale() );
++ return ki18nc("Julian month 5 - KLocale::NarrowName", "M").toString(locale());
+ case 6:
+- return ki18nc( "Julian month 6 - KLocale::NarrowName", "J" ).toString( locale() );
++ return ki18nc("Julian month 6 - KLocale::NarrowName", "J").toString(locale());
+ case 7:
+- return ki18nc( "Julian month 7 - KLocale::NarrowName", "J" ).toString( locale() );
++ return ki18nc("Julian month 7 - KLocale::NarrowName", "J").toString(locale());
+ case 8:
+- return ki18nc( "Julian month 8 - KLocale::NarrowName", "A" ).toString( locale() );
++ return ki18nc("Julian month 8 - KLocale::NarrowName", "A").toString(locale());
+ case 9:
+- return ki18nc( "Julian month 9 - KLocale::NarrowName", "S" ).toString( locale() );
++ return ki18nc("Julian month 9 - KLocale::NarrowName", "S").toString(locale());
+ case 10:
+- return ki18nc( "Julian month 10 - KLocale::NarrowName", "O" ).toString( locale() );
++ return ki18nc("Julian month 10 - KLocale::NarrowName", "O").toString(locale());
+ case 11:
+- return ki18nc( "Julian month 11 - KLocale::NarrowName", "N" ).toString( locale() );
++ return ki18nc("Julian month 11 - KLocale::NarrowName", "N").toString(locale());
+ case 12:
+- return ki18nc( "Julian month 12 - KLocale::NarrowName", "D" ).toString( locale() );
++ return ki18nc("Julian month 12 - KLocale::NarrowName", "D").toString(locale());
+ default:
+ return QString();
+ }
+ }
+
+- if ( format == KLocale::ShortName && possessive ) {
+- switch ( month ) {
++ if (format == KLocale::ShortName && possessive) {
++ switch (month) {
+ case 1:
+- return ki18nc( "Julian month 1 - KLocale::ShortName Possessive", "of Jan" ).toString( locale() );
++ return ki18nc("Julian month 1 - KLocale::ShortName Possessive", "of Jan").toString(locale());
+ case 2:
+- return ki18nc( "Julian month 2 - KLocale::ShortName Possessive", "of Feb" ).toString( locale() );
++ return ki18nc("Julian month 2 - KLocale::ShortName Possessive", "of Feb").toString(locale());
+ case 3:
+- return ki18nc( "Julian month 3 - KLocale::ShortName Possessive", "of Mar" ).toString( locale() );
++ return ki18nc("Julian month 3 - KLocale::ShortName Possessive", "of Mar").toString(locale());
+ case 4:
+- return ki18nc( "Julian month 4 - KLocale::ShortName Possessive", "of Apr" ).toString( locale() );
++ return ki18nc("Julian month 4 - KLocale::ShortName Possessive", "of Apr").toString(locale());
+ case 5:
+- return ki18nc( "Julian month 5 - KLocale::ShortName Possessive", "of May" ).toString( locale() );
++ return ki18nc("Julian month 5 - KLocale::ShortName Possessive", "of May").toString(locale());
+ case 6:
+- return ki18nc( "Julian month 6 - KLocale::ShortName Possessive", "of Jun" ).toString( locale() );
++ return ki18nc("Julian month 6 - KLocale::ShortName Possessive", "of Jun").toString(locale());
+ case 7:
+- return ki18nc( "Julian month 7 - KLocale::ShortName Possessive", "of Jul" ).toString( locale() );
++ return ki18nc("Julian month 7 - KLocale::ShortName Possessive", "of Jul").toString(locale());
+ case 8:
+- return ki18nc( "Julian month 8 - KLocale::ShortName Possessive", "of Aug" ).toString( locale() );
++ return ki18nc("Julian month 8 - KLocale::ShortName Possessive", "of Aug").toString(locale());
+ case 9:
+- return ki18nc( "Julian month 9 - KLocale::ShortName Possessive", "of Sep" ).toString( locale() );
++ return ki18nc("Julian month 9 - KLocale::ShortName Possessive", "of Sep").toString(locale());
+ case 10:
+- return ki18nc( "Julian month 10 - KLocale::ShortName Possessive", "of Oct" ).toString( locale() );
++ return ki18nc("Julian month 10 - KLocale::ShortName Possessive", "of Oct").toString(locale());
+ case 11:
+- return ki18nc( "Julian month 11 - KLocale::ShortName Possessive", "of Nov" ).toString( locale() );
++ return ki18nc("Julian month 11 - KLocale::ShortName Possessive", "of Nov").toString(locale());
+ case 12:
+- return ki18nc( "Julian month 12 - KLocale::ShortName Possessive", "of Dec" ).toString( locale() );
++ return ki18nc("Julian month 12 - KLocale::ShortName Possessive", "of Dec").toString(locale());
+ default:
+ return QString();
+ }
+ }
+
+- if ( format == KLocale::ShortName && !possessive ) {
+- switch ( month ) {
++ if (format == KLocale::ShortName && !possessive) {
++ switch (month) {
+ case 1:
+- return ki18nc( "Julian month 1 - KLocale::ShortName", "Jan" ).toString( locale() );
++ return ki18nc("Julian month 1 - KLocale::ShortName", "Jan").toString(locale());
+ case 2:
+- return ki18nc( "Julian month 2 - KLocale::ShortName", "Feb" ).toString( locale() );
++ return ki18nc("Julian month 2 - KLocale::ShortName", "Feb").toString(locale());
+ case 3:
+- return ki18nc( "Julian month 3 - KLocale::ShortName", "Mar" ).toString( locale() );
++ return ki18nc("Julian month 3 - KLocale::ShortName", "Mar").toString(locale());
+ case 4:
+- return ki18nc( "Julian month 4 - KLocale::ShortName", "Apr" ).toString( locale() );
++ return ki18nc("Julian month 4 - KLocale::ShortName", "Apr").toString(locale());
+ case 5:
+- return ki18nc( "Julian month 5 - KLocale::ShortName", "May" ).toString( locale() );
++ return ki18nc("Julian month 5 - KLocale::ShortName", "May").toString(locale());
+ case 6:
+- return ki18nc( "Julian month 6 - KLocale::ShortName", "Jun" ).toString( locale() );
++ return ki18nc("Julian month 6 - KLocale::ShortName", "Jun").toString(locale());
+ case 7:
+- return ki18nc( "Julian month 7 - KLocale::ShortName", "Jul" ).toString( locale() );
++ return ki18nc("Julian month 7 - KLocale::ShortName", "Jul").toString(locale());
+ case 8:
+- return ki18nc( "Julian month 8 - KLocale::ShortName", "Aug" ).toString( locale() );
++ return ki18nc("Julian month 8 - KLocale::ShortName", "Aug").toString(locale());
+ case 9:
+- return ki18nc( "Julian month 9 - KLocale::ShortName", "Sep" ).toString( locale() );
++ return ki18nc("Julian month 9 - KLocale::ShortName", "Sep").toString(locale());
+ case 10:
+- return ki18nc( "Julian month 10 - KLocale::ShortName", "Oct" ).toString( locale() );
++ return ki18nc("Julian month 10 - KLocale::ShortName", "Oct").toString(locale());
+ case 11:
+- return ki18nc( "Julian month 11 - KLocale::ShortName", "Nov" ).toString( locale() );
++ return ki18nc("Julian month 11 - KLocale::ShortName", "Nov").toString(locale());
+ case 12:
+- return ki18nc( "Julian month 12 - KLocale::ShortName", "Dec" ).toString( locale() );
++ return ki18nc("Julian month 12 - KLocale::ShortName", "Dec").toString(locale());
+ default:
+ return QString();
+ }
+ }
+
+- if ( format == KLocale::LongName && possessive ) {
+- switch ( month ) {
++ if (format == KLocale::LongName && possessive) {
++ switch (month) {
+ case 1:
+- return ki18nc( "Julian month 1 - KLocale::LongName Possessive", "of January" ).toString( locale() );
++ return ki18nc("Julian month 1 - KLocale::LongName Possessive", "of January").toString(locale());
+ case 2:
+- return ki18nc( "Julian month 2 - KLocale::LongName Possessive", "of February" ).toString( locale() );
++ return ki18nc("Julian month 2 - KLocale::LongName Possessive", "of February").toString(locale());
+ case 3:
+- return ki18nc( "Julian month 3 - KLocale::LongName Possessive", "of March" ).toString( locale() );
++ return ki18nc("Julian month 3 - KLocale::LongName Possessive", "of March").toString(locale());
+ case 4:
+- return ki18nc( "Julian month 4 - KLocale::LongName Possessive", "of April" ).toString( locale() );
++ return ki18nc("Julian month 4 - KLocale::LongName Possessive", "of April").toString(locale());
+ case 5:
+- return ki18nc( "Julian month 5 - KLocale::LongName Possessive", "of May" ).toString( locale() );
++ return ki18nc("Julian month 5 - KLocale::LongName Possessive", "of May").toString(locale());
+ case 6:
+- return ki18nc( "Julian month 6 - KLocale::LongName Possessive", "of June" ).toString( locale() );
++ return ki18nc("Julian month 6 - KLocale::LongName Possessive", "of June").toString(locale());
+ case 7:
+- return ki18nc( "Julian month 7 - KLocale::LongName Possessive", "of July" ).toString( locale() );
++ return ki18nc("Julian month 7 - KLocale::LongName Possessive", "of July").toString(locale());
+ case 8:
+- return ki18nc( "Julian month 8 - KLocale::LongName Possessive", "of August" ).toString( locale() );
++ return ki18nc("Julian month 8 - KLocale::LongName Possessive", "of August").toString(locale());
+ case 9:
+- return ki18nc( "Julian month 9 - KLocale::LongName Possessive", "of September" ).toString( locale() );
++ return ki18nc("Julian month 9 - KLocale::LongName Possessive", "of September").toString(locale());
+ case 10:
+- return ki18nc( "Julian month 10 - KLocale::LongName Possessive", "of October" ).toString( locale() );
++ return ki18nc("Julian month 10 - KLocale::LongName Possessive", "of October").toString(locale());
+ case 11:
+- return ki18nc( "Julian month 11 - KLocale::LongName Possessive", "of November" ).toString( locale() );
++ return ki18nc("Julian month 11 - KLocale::LongName Possessive", "of November").toString(locale());
+ case 12:
+- return ki18nc( "Julian month 12 - KLocale::LongName Possessive", "of December" ).toString( locale() );
++ return ki18nc("Julian month 12 - KLocale::LongName Possessive", "of December").toString(locale());
+ default:
+ return QString();
+ }
+ }
+
+ // Default to LongName
+- switch ( month ) {
++ switch (month) {
+ case 1:
+- return ki18nc( "Julian month 1 - KLocale::LongName", "January" ).toString( locale() );
++ return ki18nc("Julian month 1 - KLocale::LongName", "January").toString(locale());
+ case 2:
+- return ki18nc( "Julian month 2 - KLocale::LongName", "February" ).toString( locale() );
++ return ki18nc("Julian month 2 - KLocale::LongName", "February").toString(locale());
+ case 3:
+- return ki18nc( "Julian month 3 - KLocale::LongName", "March" ).toString( locale() );
++ return ki18nc("Julian month 3 - KLocale::LongName", "March").toString(locale());
+ case 4:
+- return ki18nc( "Julian month 4 - KLocale::LongName", "April" ).toString( locale() );
++ return ki18nc("Julian month 4 - KLocale::LongName", "April").toString(locale());
+ case 5:
+- return ki18nc( "Julian month 5 - KLocale::LongName", "May" ).toString( locale() );
++ return ki18nc("Julian month 5 - KLocale::LongName", "May").toString(locale());
+ case 6:
+- return ki18nc( "Julian month 6 - KLocale::LongName", "June" ).toString( locale() );
++ return ki18nc("Julian month 6 - KLocale::LongName", "June").toString(locale());
+ case 7:
+- return ki18nc( "Julian month 7 - KLocale::LongName", "July" ).toString( locale() );
++ return ki18nc("Julian month 7 - KLocale::LongName", "July").toString(locale());
+ case 8:
+- return ki18nc( "Julian month 8 - KLocale::LongName", "August" ).toString( locale() );
++ return ki18nc("Julian month 8 - KLocale::LongName", "August").toString(locale());
+ case 9:
+- return ki18nc( "Julian month 9 - KLocale::LongName", "September" ).toString( locale() );
++ return ki18nc("Julian month 9 - KLocale::LongName", "September").toString(locale());
+ case 10:
+- return ki18nc( "Julian month 10 - KLocale::LongName", "October" ).toString( locale() );
++ return ki18nc("Julian month 10 - KLocale::LongName", "October").toString(locale());
+ case 11:
+- return ki18nc( "Julian month 11 - KLocale::LongName", "November" ).toString( locale() );
++ return ki18nc("Julian month 11 - KLocale::LongName", "November").toString(locale());
+ case 12:
+- return ki18nc( "Julian month 12 - KLocale::LongName", "December" ).toString( locale() );
++ return ki18nc("Julian month 12 - KLocale::LongName", "December").toString(locale());
+ default:
+ return QString();
+ }
+ }
+
+-QString KCalendarSystemJulianPrivate::weekDayName( int weekDay, KLocale::DateTimeComponentFormat format ) const
++QString KCalendarSystemJulianPrivate::weekDayName(int weekDay, KLocale::DateTimeComponentFormat format) const
+ {
+- if ( format == KLocale::NarrowName ) {
+- switch ( weekDay ) {
++ if (format == KLocale::NarrowName) {
++ switch (weekDay) {
+ case 1:
+- return ki18nc( "Julian weekday 1 - KLocale::NarrowName ", "M" ).toString( locale() );
++ return ki18nc("Julian weekday 1 - KLocale::NarrowName ", "M").toString(locale());
+ case 2:
+- return ki18nc( "Julian weekday 2 - KLocale::NarrowName ", "T" ).toString( locale() );
++ return ki18nc("Julian weekday 2 - KLocale::NarrowName ", "T").toString(locale());
+ case 3:
+- return ki18nc( "Julian weekday 3 - KLocale::NarrowName ", "W" ).toString( locale() );
++ return ki18nc("Julian weekday 3 - KLocale::NarrowName ", "W").toString(locale());
+ case 4:
+- return ki18nc( "Julian weekday 4 - KLocale::NarrowName ", "T" ).toString( locale() );
++ return ki18nc("Julian weekday 4 - KLocale::NarrowName ", "T").toString(locale());
+ case 5:
+- return ki18nc( "Julian weekday 5 - KLocale::NarrowName ", "F" ).toString( locale() );
++ return ki18nc("Julian weekday 5 - KLocale::NarrowName ", "F").toString(locale());
+ case 6:
+- return ki18nc( "Julian weekday 6 - KLocale::NarrowName ", "S" ).toString( locale() );
++ return ki18nc("Julian weekday 6 - KLocale::NarrowName ", "S").toString(locale());
+ case 7:
+- return ki18nc( "Julian weekday 7 - KLocale::NarrowName ", "S" ).toString( locale() );
++ return ki18nc("Julian weekday 7 - KLocale::NarrowName ", "S").toString(locale());
+ default:
+ return QString();
+ }
+ }
+
+- if ( format == KLocale::ShortName || format == KLocale:: ShortNumber ) {
+- switch ( weekDay ) {
++ if (format == KLocale::ShortName || format == KLocale:: ShortNumber) {
++ switch (weekDay) {
+ case 1:
+- return ki18nc( "Julian weekday 1 - KLocale::ShortName", "Mon" ).toString( locale() );
++ return ki18nc("Julian weekday 1 - KLocale::ShortName", "Mon").toString(locale());
+ case 2:
+- return ki18nc( "Julian weekday 2 - KLocale::ShortName", "Tue" ).toString( locale() );
++ return ki18nc("Julian weekday 2 - KLocale::ShortName", "Tue").toString(locale());
+ case 3:
+- return ki18nc( "Julian weekday 3 - KLocale::ShortName", "Wed" ).toString( locale() );
++ return ki18nc("Julian weekday 3 - KLocale::ShortName", "Wed").toString(locale());
+ case 4:
+- return ki18nc( "Julian weekday 4 - KLocale::ShortName", "Thu" ).toString( locale() );
++ return ki18nc("Julian weekday 4 - KLocale::ShortName", "Thu").toString(locale());
+ case 5:
+- return ki18nc( "Julian weekday 5 - KLocale::ShortName", "Fri" ).toString( locale() );
++ return ki18nc("Julian weekday 5 - KLocale::ShortName", "Fri").toString(locale());
+ case 6:
+- return ki18nc( "Julian weekday 6 - KLocale::ShortName", "Sat" ).toString( locale() );
++ return ki18nc("Julian weekday 6 - KLocale::ShortName", "Sat").toString(locale());
+ case 7:
+- return ki18nc( "Julian weekday 7 - KLocale::ShortName", "Sun" ).toString( locale() );
++ return ki18nc("Julian weekday 7 - KLocale::ShortName", "Sun").toString(locale());
+ default: return QString();
+ }
+ }
+
+- switch ( weekDay ) {
++ switch (weekDay) {
+ case 1:
+- return ki18nc( "Julian weekday 1 - KLocale::LongName", "Monday" ).toString( locale() );
++ return ki18nc("Julian weekday 1 - KLocale::LongName", "Monday").toString(locale());
+ case 2:
+- return ki18nc( "Julian weekday 2 - KLocale::LongName", "Tuesday" ).toString( locale() );
++ return ki18nc("Julian weekday 2 - KLocale::LongName", "Tuesday").toString(locale());
+ case 3:
+- return ki18nc( "Julian weekday 3 - KLocale::LongName", "Wednesday" ).toString( locale() );
++ return ki18nc("Julian weekday 3 - KLocale::LongName", "Wednesday").toString(locale());
+ case 4:
+- return ki18nc( "Julian weekday 4 - KLocale::LongName", "Thursday" ).toString( locale() );
++ return ki18nc("Julian weekday 4 - KLocale::LongName", "Thursday").toString(locale());
+ case 5:
+- return ki18nc( "Julian weekday 5 - KLocale::LongName", "Friday" ).toString( locale() );
++ return ki18nc("Julian weekday 5 - KLocale::LongName", "Friday").toString(locale());
+ case 6:
+- return ki18nc( "Julian weekday 6 - KLocale::LongName", "Saturday" ).toString( locale() );
++ return ki18nc("Julian weekday 6 - KLocale::LongName", "Saturday").toString(locale());
+ case 7:
+- return ki18nc( "Julian weekday 7 - KLocale::LongName", "Sunday" ).toString( locale() );
++ return ki18nc("Julian weekday 7 - KLocale::LongName", "Sunday").toString(locale());
+ default:
+ return QString();
+ }
+ }
+
+
+-KCalendarSystemJulian::KCalendarSystemJulian( const KLocale *locale )
+- : KCalendarSystem( *new KCalendarSystemJulianPrivate( this ), KSharedConfig::Ptr(), locale ),
+- dont_use( 0 )
++KCalendarSystemJulian::KCalendarSystemJulian(const KLocale *locale)
++ : KCalendarSystem(*new KCalendarSystemJulianPrivate(this), KSharedConfig::Ptr(), locale)
+ {
+- d_ptr->loadConfig( calendarType() );
++ d_ptr->loadConfig(calendarType());
+ }
+
+-KCalendarSystemJulian::KCalendarSystemJulian( const KSharedConfig::Ptr config, const KLocale *locale )
+- : KCalendarSystem( *new KCalendarSystemJulianPrivate( this ), config, locale ),
+- dont_use( 0 )
++KCalendarSystemJulian::KCalendarSystemJulian(const KSharedConfig::Ptr config, const KLocale *locale)
++ : KCalendarSystem(*new KCalendarSystemJulianPrivate(this), config, locale)
+ {
+- d_ptr->loadConfig( calendarType() );
++ d_ptr->loadConfig(calendarType());
+ }
+
+-KCalendarSystemJulian::KCalendarSystemJulian( KCalendarSystemJulianPrivate &dd,
+- const KSharedConfig::Ptr config, const KLocale *locale )
+- : KCalendarSystem( dd, config, locale ),
+- dont_use( 0 )
++KCalendarSystemJulian::KCalendarSystemJulian(KCalendarSystemJulianPrivate &dd,
++ const KSharedConfig::Ptr config, const KLocale *locale)
++ : KCalendarSystem(dd, config, locale)
+ {
+- d_ptr->loadConfig( calendarType() );
++ d_ptr->loadConfig(calendarType());
+ }
+
+ KCalendarSystemJulian::~KCalendarSystemJulian()
+ {
+- delete dont_use;
+ }
+
+ QString KCalendarSystemJulian::calendarType() const
+ {
+- return QLatin1String( "julian" );
++ return QLatin1String("julian");
+ }
+
+ QDate KCalendarSystemJulian::epoch() const
+ {
+- return QDate::fromJulianDay( 1721426 );
++ return QDate::fromJulianDay(1721426);
+ }
+
+ QDate KCalendarSystemJulian::earliestValidDate() const
+ {
+ // 1 Jan 4712 BC, no year zero, cant be 4713BC due to error in QDate that day 0 is not valid
+ // and we really need the first in each year to be valid for the date maths
+- return QDate::fromJulianDay( 366 );
++ return QDate::fromJulianDay(366);
+ }
+
+ QDate KCalendarSystemJulian::latestValidDate() const
+ {
+ // Set to last day of year 9999 until confirm date formats & widgets support > 9999
+ // 31 Dec 9999 AD, no year zero
+- return QDate::fromJulianDay( 5373557 );
++ return QDate::fromJulianDay(5373557);
+ }
+
+-bool KCalendarSystemJulian::isValid( int year, int month, int day ) const
++bool KCalendarSystemJulian::isValid(int year, int month, int day) const
+ {
+- return KCalendarSystem::isValid( year, month, day );
++ return KCalendarSystem::isValid(year, month, day);
+ }
+
+-bool KCalendarSystemJulian::isValid( const QDate &date ) const
++bool KCalendarSystemJulian::isValid(const QDate &date) const
+ {
+- return KCalendarSystem::isValid( date );
++ return KCalendarSystem::isValid(date);
+ }
+
+-bool KCalendarSystemJulian::setDate( QDate &date, int year, int month, int day ) const
++bool KCalendarSystemJulian::isLeapYear(int year) const
+ {
+- return KCalendarSystem::setDate( date, year, month, day );
++ return KCalendarSystem::isLeapYear(year);
+ }
+
+-// Deprecated
+-bool KCalendarSystemJulian::setYMD( QDate &date, int y, int m, int d ) const
++bool KCalendarSystemJulian::isLeapYear(const QDate &date) const
+ {
+- return KCalendarSystem::setDate( date, y, m, d );
++ return KCalendarSystem::isLeapYear(date);
+ }
+
+-int KCalendarSystemJulian::year( const QDate &date ) const
++QString KCalendarSystemJulian::monthName(int month, int year, MonthNameFormat format) const
+ {
+- return KCalendarSystem::year( date );
++ return KCalendarSystem::monthName(month, year, format);
+ }
+
+-int KCalendarSystemJulian::month( const QDate &date ) const
++QString KCalendarSystemJulian::monthName(const QDate &date, MonthNameFormat format) const
+ {
+- return KCalendarSystem::month( date );
++ return KCalendarSystem::monthName(date, format);
+ }
+
+-int KCalendarSystemJulian::day( const QDate &date ) const
++QString KCalendarSystemJulian::weekDayName(int weekDay, WeekDayNameFormat format) const
+ {
+- return KCalendarSystem::day( date );
++ return KCalendarSystem::weekDayName(weekDay, format);
+ }
+
+-QDate KCalendarSystemJulian::addYears( const QDate &date, int nyears ) const
++QString KCalendarSystemJulian::weekDayName(const QDate &date, WeekDayNameFormat format) const
+ {
+- return KCalendarSystem::addYears( date, nyears );
+-}
+-
+-QDate KCalendarSystemJulian::addMonths( const QDate &date, int nmonths ) const
+-{
+- return KCalendarSystem::addMonths( date, nmonths );
+-}
+-
+-QDate KCalendarSystemJulian::addDays( const QDate &date, int ndays ) const
+-{
+- return KCalendarSystem::addDays( date, ndays );
+-}
+-
+-int KCalendarSystemJulian::monthsInYear( const QDate &date ) const
+-{
+- return KCalendarSystem::monthsInYear( date );
+-}
+-
+-int KCalendarSystemJulian::weeksInYear( const QDate &date ) const
+-{
+- return KCalendarSystem::weeksInYear( date );
+-}
+-
+-int KCalendarSystemJulian::weeksInYear( int year ) const
+-{
+- return KCalendarSystem::weeksInYear( year );
+-}
+-
+-int KCalendarSystemJulian::daysInYear( const QDate &date ) const
+-{
+- return KCalendarSystem::daysInYear( date );
+-}
+-
+-int KCalendarSystemJulian::daysInMonth( const QDate &date ) const
+-{
+- return KCalendarSystem::daysInMonth( date );
+-}
+-
+-int KCalendarSystemJulian::daysInWeek( const QDate &date ) const
+-{
+- return KCalendarSystem::daysInWeek( date );
+-}
+-
+-int KCalendarSystemJulian::dayOfYear( const QDate &date ) const
+-{
+- return KCalendarSystem::dayOfYear( date );
+-}
+-
+-int KCalendarSystemJulian::dayOfWeek( const QDate &date ) const
+-{
+- return KCalendarSystem::dayOfWeek( date );
+-}
+-
+-int KCalendarSystemJulian::weekNumber( const QDate &date, int * yearNum ) const
+-{
+- return KCalendarSystem::weekNumber( date, yearNum );
+-}
+-
+-bool KCalendarSystemJulian::isLeapYear( int year ) const
+-{
+- return KCalendarSystem::isLeapYear( year );
+-}
+-
+-bool KCalendarSystemJulian::isLeapYear( const QDate &date ) const
+-{
+- return KCalendarSystem::isLeapYear( date );
+-}
+-
+-QString KCalendarSystemJulian::monthName( int month, int year, MonthNameFormat format ) const
+-{
+- return KCalendarSystem::monthName( month, year, format );
+-}
+-
+-QString KCalendarSystemJulian::monthName( const QDate &date, MonthNameFormat format ) const
+-{
+- return KCalendarSystem::monthName( date, format );
+-}
+-
+-QString KCalendarSystemJulian::weekDayName( int weekDay, WeekDayNameFormat format ) const
+-{
+- return KCalendarSystem::weekDayName( weekDay, format );
+-}
+-
+-QString KCalendarSystemJulian::weekDayName( const QDate &date, WeekDayNameFormat format ) const
+-{
+- return KCalendarSystem::weekDayName( date, format );
+-}
+-
+-QString KCalendarSystemJulian::yearString( const QDate &pDate, StringFormat format ) const
+-{
+- return KCalendarSystem::yearString( pDate, format );
+-}
+-
+-QString KCalendarSystemJulian::monthString( const QDate &pDate, StringFormat format ) const
+-{
+- return KCalendarSystem::monthString( pDate, format );
+-}
+-
+-QString KCalendarSystemJulian::dayString( const QDate &pDate, StringFormat format ) const
+-{
+- return KCalendarSystem::dayString( pDate, format );
+-}
+-
+-int KCalendarSystemJulian::yearStringToInteger( const QString &sNum, int &iLength ) const
+-{
+- return KCalendarSystem::yearStringToInteger( sNum, iLength );
+-}
+-
+-int KCalendarSystemJulian::monthStringToInteger( const QString &sNum, int &iLength ) const
+-{
+- return KCalendarSystem::monthStringToInteger( sNum, iLength );
+-}
+-
+-int KCalendarSystemJulian::dayStringToInteger( const QString &sNum, int &iLength ) const
+-{
+- return KCalendarSystem::dayStringToInteger( sNum, iLength );
+-}
+-
+-QString KCalendarSystemJulian::formatDate( const QDate &date, KLocale::DateFormat format ) const
+-{
+- return KCalendarSystem::formatDate( date, format );
+-}
+-
+-QDate KCalendarSystemJulian::readDate( const QString &str, bool *ok ) const
+-{
+- return KCalendarSystem::readDate( str, ok );
+-}
+-
+-QDate KCalendarSystemJulian::readDate( const QString &intstr, const QString &fmt, bool *ok ) const
+-{
+- return KCalendarSystem::readDate( intstr, fmt, ok );
+-}
+-
+-QDate KCalendarSystemJulian::readDate( const QString &str, KLocale::ReadDateFlags flags, bool *ok ) const
+-{
+- return KCalendarSystem::readDate( str, flags, ok );
+-}
+-
+-int KCalendarSystemJulian::weekStartDay() const
+-{
+- return KCalendarSystem::weekStartDay();
++ return KCalendarSystem::weekDayName(date, format);
+ }
+
+ int KCalendarSystemJulian::weekDayOfPray() const
+@@ -659,7 +514,7 @@ bool KCalendarSystemJulian::isProleptic() const
+ return true;
+ }
+
+-bool KCalendarSystemJulian::julianDayToDate( int jd, int &year, int &month, int &day ) const
++bool KCalendarSystemJulian::julianDayToDate(int jd, int &year, int &month, int &day) const
+ {
+ // Formula from The Calendar FAQ by Claus Tondering
+ // http://www.tondering.dk/claus/cal/node3.html#SECTION003161000000000000000
+@@ -668,23 +523,23 @@ bool KCalendarSystemJulian::julianDayToDate( int jd, int &year, int &month, int
+
+ int b = 0;
+ int c = jd + 32082;
+- int d = ( ( 4 * c ) + 3 ) / 1461;
+- int e = c - ( ( 1461 * d ) / 4 );
+- int m = ( ( 5 * e ) + 2 ) / 153;
+- day = e - ( ( (153 * m ) + 2 ) / 5 ) + 1;
+- month = m + 3 - ( 12 * ( m / 10 ) );
+- year = ( 100 * b ) + d - 4800 + ( m / 10 );
++ int d = ((4 * c) + 3) / 1461;
++ int e = c - ((1461 * d) / 4);
++ int m = ((5 * e) + 2) / 153;
++ day = e - (((153 * m) + 2) / 5) + 1;
++ month = m + 3 - (12 * (m / 10));
++ year = (100 * b) + d - 4800 + (m / 10);
+
+ // If year is -ve then is BC. In Julian there is no year 0, but the maths
+ // is easier if we pretend there is, so internally year of 0 = 1BC = -1 outside
+- if ( year < 1 ) {
++ if (year < 1) {
+ year = year - 1;
+ }
+
+ return true;
+ }
+
+-bool KCalendarSystemJulian::dateToJulianDay( int year, int month, int day, int &jd ) const
++bool KCalendarSystemJulian::dateToJulianDay(int year, int month, int day, int &jd) const
+ {
+ // Formula from The Calendar FAQ by Claus Tondering
+ // http://www.tondering.dk/claus/cal/node3.html#SECTION003161000000000000000
+@@ -694,20 +549,20 @@ bool KCalendarSystemJulian::dateToJulianDay( int year, int month, int day, int &
+ // If year is -ve then is BC. In Julian there is no year 0, but the maths
+ // is easier if we pretend there is, so internally year of -1 = 1BC = 0 internally
+ int y;
+- if ( year < 1 ) {
++ if (year < 1) {
+ y = year + 1;
+ } else {
+ y = year;
+ }
+
+- int a = ( 14 - month ) / 12;
++ int a = (14 - month) / 12;
+ y = y + 4800 - a;
+- int m = month + ( 12 * a ) - 3;
++ int m = month + (12 * a) - 3;
+
+ jd = day
+- + ( ( ( 153 * m ) + 2 ) / 5 )
+- + ( 365 * y )
+- + ( y / 4 )
++ + (((153 * m) + 2) / 5)
++ + (365 * y)
++ + (y / 4)
+ - 32083;
+
+ return true;
+diff --git a/kdecore/date/kcalendarsystemjulian_p.h b/kdecore/date/kcalendarsystemjulian_p.h
+index 5976567..ebcad4a 100644
+--- a/kdecore/date/kcalendarsystemjulian_p.h
++++ b/kdecore/date/kcalendarsystemjulian_p.h
+@@ -41,8 +41,8 @@ class KCalendarSystemJulianPrivate;
+ class KCalendarSystemJulian: public KCalendarSystem
+ {
+ public:
+- explicit KCalendarSystemJulian( const KLocale *locale = 0 );
+- explicit KCalendarSystemJulian( const KSharedConfig::Ptr config, const KLocale *locale = 0 );
++ explicit KCalendarSystemJulian(const KLocale *locale = 0);
++ explicit KCalendarSystemJulian(const KSharedConfig::Ptr config, const KLocale *locale = 0);
+ virtual ~KCalendarSystemJulian();
+
+ virtual QString calendarType() const;
+@@ -50,58 +50,19 @@ public:
+ virtual QDate epoch() const;
+ virtual QDate earliestValidDate() const;
+ virtual QDate latestValidDate() const;
+- virtual bool isValid( int year, int month, int day ) const;
+- virtual bool isValid( const QDate &date ) const;
++ virtual bool isValid(int year, int month, int day) const;
++ virtual bool isValid(const QDate &date) const;
+
+- virtual bool setDate( QDate &date, int year, int month, int day ) const;
+- /** @deprecated */
+- virtual bool setYMD( QDate &date, int year, int month, int day ) const;
++ virtual bool isLeapYear(int year) const;
++ virtual bool isLeapYear(const QDate &date) const;
+
+- virtual int year( const QDate &date ) const;
+- virtual int month( const QDate &date ) const;
+- virtual int day( const QDate &date ) const;
++ virtual QString monthName(int month, int year, MonthNameFormat format = LongName) const;
++ virtual QString monthName(const QDate &date, MonthNameFormat format = LongName) const;
+
+- virtual QDate addYears( const QDate &date, int nyears ) const;
+- virtual QDate addMonths( const QDate &date, int nmonths ) const;
+- virtual QDate addDays( const QDate &date, int ndays ) const;
++ virtual QString weekDayName(int weekDay, WeekDayNameFormat format = LongDayName) const;
++ virtual QString weekDayName(const QDate &date, WeekDayNameFormat format = LongDayName) const;
+
+- virtual int monthsInYear( const QDate &date ) const;
+- virtual int weeksInYear( const QDate &date ) const;
+- virtual int weeksInYear( int year ) const;
+- virtual int daysInYear( const QDate &date ) const;
+- virtual int daysInMonth( const QDate &date ) const;
+- virtual int daysInWeek( const QDate &date ) const;
+-
+- virtual int dayOfYear( const QDate &date ) const;
+- virtual int dayOfWeek( const QDate &date ) const;
+-
+- virtual int weekNumber( const QDate &date, int *yearNum = 0 ) const;
+-
+- virtual bool isLeapYear( int year ) const;
+- virtual bool isLeapYear( const QDate &date ) const;
+-
+- virtual QString monthName( int month, int year, MonthNameFormat format = LongName ) const;
+- virtual QString monthName( const QDate &date, MonthNameFormat format = LongName ) const;
+-
+- virtual QString weekDayName( int weekDay, WeekDayNameFormat format = LongDayName ) const;
+- virtual QString weekDayName( const QDate &date, WeekDayNameFormat format = LongDayName ) const;
+-
+- virtual QString yearString( const QDate & pDate, StringFormat format = LongFormat ) const;
+- virtual QString monthString( const QDate &pDate, StringFormat format = LongFormat ) const;
+- virtual QString dayString( const QDate &pDate, StringFormat format = LongFormat ) const;
+-
+- virtual int yearStringToInteger( const QString &sNum, int &iLength ) const;
+- virtual int monthStringToInteger( const QString &sNum, int &iLength ) const;
+- virtual int dayStringToInteger( const QString &sNum, int &iLength ) const;
+-
+- virtual QString formatDate( const QDate &fromDate, KLocale::DateFormat toFormat = KLocale::LongDate ) const;
+-
+- virtual QDate readDate( const QString &str, bool *ok = 0 ) const;
+- virtual QDate readDate( const QString &dateString, const QString &dateFormat, bool *ok = 0 ) const;
+- virtual QDate readDate( const QString &str, KLocale::ReadDateFlags flags, bool *ok = 0 ) const;
+-
+- virtual int weekStartDay() const;
+- virtual int weekDayOfPray () const;
++ virtual int weekDayOfPray() const;
+
+ virtual bool isLunar() const;
+ virtual bool isLunisolar() const;
+@@ -109,15 +70,14 @@ public:
+ virtual bool isProleptic() const;
+
+ protected:
+- virtual bool julianDayToDate( int jd, int &year, int &month, int &day ) const;
+- virtual bool dateToJulianDay( int year, int month, int day, int &jd ) const;
+- KCalendarSystemJulian( KCalendarSystemJulianPrivate &dd,
+- const KSharedConfig::Ptr config = KSharedConfig::Ptr(),
+- const KLocale *locale = 0 );
++ virtual bool julianDayToDate(int jd, int &year, int &month, int &day) const;
++ virtual bool dateToJulianDay(int year, int month, int day, int &jd) const;
++ KCalendarSystemJulian(KCalendarSystemJulianPrivate &dd,
++ const KSharedConfig::Ptr config = KSharedConfig::Ptr(),
++ const KLocale *locale = 0);
+
+ private:
+- Q_DECLARE_PRIVATE( KCalendarSystemJulian )
+- KCalendarSystemJulianPrivate * const dont_use; // KDE5 remove, use shared d
++ Q_DECLARE_PRIVATE(KCalendarSystemJulian)
+ };
+
+ #endif // KCALENDARSYSTEMJULIAN_H
+diff --git a/kdecore/date/kcalendarsystemminguo.cpp b/kdecore/date/kcalendarsystemminguo.cpp
+index 0230f93..66aea58 100644
+--- a/kdecore/date/kcalendarsystemminguo.cpp
++++ b/kdecore/date/kcalendarsystemminguo.cpp
+@@ -18,30 +18,30 @@
+ */
+
+ #include "kcalendarsystemminguo_p.h"
+-#include "kcalendarsystemgregorianprolepticprivate_p.h"
++#include "kcalendarsystemgregorianprivate_p.h"
+
+ #include "kdebug.h"
+ #include "klocale.h"
+
+ #include <QtCore/QDate>
+
+-//Reuse the Gregorian Proleptic private implementation
+-class KCalendarSystemMinguoPrivate : public KCalendarSystemGregorianProlepticPrivate
++//Reuse the Gregorian private implementation
++class KCalendarSystemMinguoPrivate : public KCalendarSystemGregorianPrivate
+ {
+ public:
+- explicit KCalendarSystemMinguoPrivate( KCalendarSystemMinguo *q );
++ explicit KCalendarSystemMinguoPrivate(KCalendarSystemMinguo *q);
+ virtual ~KCalendarSystemMinguoPrivate();
+
+ virtual KLocale::CalendarSystem calendarSystem() const;
+ virtual void loadDefaultEraList();
+- virtual bool isLeapYear( int year ) const;
++ virtual bool isLeapYear(int year) const;
+ virtual int earliestValidYear() const;
+ };
+
+-//Override only a few of the Gregorian Proleptic private methods
++//Override only a few of the Gregorian private methods
+
+-KCalendarSystemMinguoPrivate::KCalendarSystemMinguoPrivate( KCalendarSystemMinguo *q )
+- : KCalendarSystemGregorianProlepticPrivate( q )
++KCalendarSystemMinguoPrivate::KCalendarSystemMinguoPrivate(KCalendarSystemMinguo *q)
++ : KCalendarSystemGregorianPrivate(q)
+ {
+ }
+
+@@ -58,15 +58,15 @@ void KCalendarSystemMinguoPrivate::loadDefaultEraList()
+ {
+ QString name, shortName, format;
+
+- name = i18nc( "Calendar Era: Taiwan Republic of China Era, years > 0, LongFormat", "Republic of China Era" );
+- shortName = i18nc( "Calendar Era: Taiwan Republic of China Era, years > 0, ShortFormat", "ROC" );
+- format = i18nc( "(kdedt-format) Taiwan, ROC, full era year format used for %EY, e.g. ROC 99", "%EC %Ey" );
+- addEra( '+', 1, q->epoch(), 1, q->latestValidDate(), name, shortName, format );
++ name = i18nc("Calendar Era: Taiwan Republic of China Era, years > 0, LongFormat", "Republic of China Era");
++ shortName = i18nc("Calendar Era: Taiwan Republic of China Era, years > 0, ShortFormat", "ROC");
++ format = i18nc("(kdedt-format) Taiwan, ROC, full era year format used for %EY, e.g. ROC 99", "%EC %Ey");
++ addEra('+', 1, q->epoch(), 1, q->latestValidDate(), name, shortName, format);
+ }
+
+-bool KCalendarSystemMinguoPrivate::isLeapYear( int year ) const
++bool KCalendarSystemMinguoPrivate::isLeapYear(int year) const
+ {
+- return KCalendarSystemGregorianProlepticPrivate::isLeapYear( year + 1911 );
++ return KCalendarSystemGregorianPrivate::isLeapYear(year + 1911);
+ }
+
+ int KCalendarSystemMinguoPrivate::earliestValidYear() const
+@@ -75,23 +75,23 @@ int KCalendarSystemMinguoPrivate::earliestValidYear() const
+ }
+
+
+-KCalendarSystemMinguo::KCalendarSystemMinguo( const KLocale *locale )
+- : KCalendarSystemGregorianProleptic( *new KCalendarSystemMinguoPrivate( this ), KSharedConfig::Ptr(), locale )
++KCalendarSystemMinguo::KCalendarSystemMinguo(const KLocale *locale)
++ : KCalendarSystemGregorian(*new KCalendarSystemMinguoPrivate(this), KSharedConfig::Ptr(), locale)
+ {
+- d_ptr->loadConfig( calendarType() );
++ d_ptr->loadConfig(calendarType());
+ }
+
+-KCalendarSystemMinguo::KCalendarSystemMinguo( const KSharedConfig::Ptr config, const KLocale *locale )
+- : KCalendarSystemGregorianProleptic( *new KCalendarSystemMinguoPrivate( this ), config, locale )
++KCalendarSystemMinguo::KCalendarSystemMinguo(const KSharedConfig::Ptr config, const KLocale *locale)
++ : KCalendarSystemGregorian(*new KCalendarSystemMinguoPrivate(this), config, locale)
+ {
+- d_ptr->loadConfig( calendarType() );
++ d_ptr->loadConfig(calendarType());
+ }
+
+-KCalendarSystemMinguo::KCalendarSystemMinguo( KCalendarSystemMinguoPrivate &dd,
+- const KSharedConfig::Ptr config, const KLocale *locale )
+- : KCalendarSystemGregorianProleptic( dd, config, locale )
++KCalendarSystemMinguo::KCalendarSystemMinguo(KCalendarSystemMinguoPrivate &dd,
++ const KSharedConfig::Ptr config, const KLocale *locale)
++ : KCalendarSystemGregorian(dd, config, locale)
+ {
+- d_ptr->loadConfig( calendarType() );
++ d_ptr->loadConfig(calendarType());
+ }
+
+ KCalendarSystemMinguo::~KCalendarSystemMinguo()
+@@ -100,13 +100,13 @@ KCalendarSystemMinguo::~KCalendarSystemMinguo()
+
+ QString KCalendarSystemMinguo::calendarType() const
+ {
+- return QLatin1String( "minguo" );
++ return QLatin1String("minguo");
+ }
+
+ QDate KCalendarSystemMinguo::epoch() const
+ {
+ // 0001-01-01 = 1912-01-01 AD Gregorian
+- return QDate::fromJulianDay( 2419403 );
++ return QDate::fromJulianDay(2419403);
+ }
+
+ QDate KCalendarSystemMinguo::earliestValidDate() const
+@@ -118,188 +118,47 @@ QDate KCalendarSystemMinguo::latestValidDate() const
+ {
+ // Set to last day of year 9999 until confirm date formats & widgets support > 9999
+ // 9999-12-31 = 11910-12-31 AD Gregorian
+- return QDate::fromJulianDay( 6071462 );
++ return QDate::fromJulianDay(6071462);
+ }
+
+-bool KCalendarSystemMinguo::isValid( int year, int month, int day ) const
++bool KCalendarSystemMinguo::isValid(int year, int month, int day) const
+ {
+- return KCalendarSystemGregorianProleptic::isValid( year, month, day );
++ return KCalendarSystemGregorian::isValid(year, month, day);
+ }
+
+-bool KCalendarSystemMinguo::isValid( const QDate &date ) const
++bool KCalendarSystemMinguo::isValid(const QDate &date) const
+ {
+- return KCalendarSystemGregorianProleptic::isValid( date );
++ return KCalendarSystemGregorian::isValid(date);
+ }
+
+-bool KCalendarSystemMinguo::setDate( QDate &date, int year, int month, int day ) const
++bool KCalendarSystemMinguo::isLeapYear(int year) const
+ {
+- return KCalendarSystemGregorianProleptic::setDate( date, year, month, day );
++ return KCalendarSystemGregorian::isLeapYear(year);
+ }
+
+-// Deprecated
+-bool KCalendarSystemMinguo::setYMD( QDate &date, int y, int m, int d ) const
++bool KCalendarSystemMinguo::isLeapYear(const QDate &date) const
+ {
+- return KCalendarSystemGregorianProleptic::setDate( date, y, m, d );
++ return KCalendarSystemGregorian::isLeapYear(date);
+ }
+
+-int KCalendarSystemMinguo::year( const QDate &date ) const
++QString KCalendarSystemMinguo::monthName(int month, int year, MonthNameFormat format) const
+ {
+- return KCalendarSystemGregorianProleptic::year( date );
++ return KCalendarSystemGregorian::monthName(month, year, format);
+ }
+
+-int KCalendarSystemMinguo::month( const QDate &date ) const
++QString KCalendarSystemMinguo::monthName(const QDate &date, MonthNameFormat format) const
+ {
+- return KCalendarSystemGregorianProleptic::month( date );
++ return KCalendarSystemGregorian::monthName(date, format);
+ }
+
+-int KCalendarSystemMinguo::day( const QDate &date ) const
++QString KCalendarSystemMinguo::weekDayName(int weekDay, WeekDayNameFormat format) const
+ {
+- return KCalendarSystemGregorianProleptic::day( date );
++ return KCalendarSystemGregorian::weekDayName(weekDay, format);
+ }
+
+-QDate KCalendarSystemMinguo::addYears( const QDate &date, int nyears ) const
++QString KCalendarSystemMinguo::weekDayName(const QDate &date, WeekDayNameFormat format) const
+ {
+- return KCalendarSystemGregorianProleptic::addYears( date, nyears );
+-}
+-
+-QDate KCalendarSystemMinguo::addMonths( const QDate &date, int nmonths ) const
+-{
+- return KCalendarSystemGregorianProleptic::addMonths( date, nmonths );
+-}
+-
+-QDate KCalendarSystemMinguo::addDays( const QDate &date, int ndays ) const
+-{
+- return KCalendarSystemGregorianProleptic::addDays( date, ndays );
+-}
+-
+-int KCalendarSystemMinguo::monthsInYear( const QDate &date ) const
+-{
+- return KCalendarSystemGregorianProleptic::monthsInYear( date );
+-}
+-
+-int KCalendarSystemMinguo::weeksInYear( const QDate &date ) const
+-{
+- return KCalendarSystemGregorianProleptic::weeksInYear( date );
+-}
+-
+-int KCalendarSystemMinguo::weeksInYear( int year ) const
+-{
+- return KCalendarSystemGregorianProleptic::weeksInYear( year );
+-}
+-
+-int KCalendarSystemMinguo::daysInYear( const QDate &date ) const
+-{
+- return KCalendarSystemGregorianProleptic::daysInYear( date );
+-}
+-
+-int KCalendarSystemMinguo::daysInMonth( const QDate &date ) const
+-{
+- return KCalendarSystemGregorianProleptic::daysInMonth( date );
+-}
+-
+-int KCalendarSystemMinguo::daysInWeek( const QDate &date ) const
+-{
+- return KCalendarSystemGregorianProleptic::daysInWeek( date );
+-}
+-
+-int KCalendarSystemMinguo::dayOfYear( const QDate &date ) const
+-{
+- return KCalendarSystemGregorianProleptic::dayOfYear( date );
+-}
+-
+-int KCalendarSystemMinguo::dayOfWeek( const QDate &date ) const
+-{
+- return KCalendarSystemGregorianProleptic::dayOfWeek( date );
+-}
+-
+-int KCalendarSystemMinguo::weekNumber( const QDate &date, int * yearNum ) const
+-{
+- return KCalendarSystemGregorianProleptic::weekNumber( date, yearNum );
+-}
+-
+-bool KCalendarSystemMinguo::isLeapYear( int year ) const
+-{
+- return KCalendarSystemGregorianProleptic::isLeapYear( year );
+-}
+-
+-bool KCalendarSystemMinguo::isLeapYear( const QDate &date ) const
+-{
+- return KCalendarSystemGregorianProleptic::isLeapYear( date );
+-}
+-
+-QString KCalendarSystemMinguo::monthName( int month, int year, MonthNameFormat format ) const
+-{
+- return KCalendarSystemGregorianProleptic::monthName( month, year, format );
+-}
+-
+-QString KCalendarSystemMinguo::monthName( const QDate &date, MonthNameFormat format ) const
+-{
+- return KCalendarSystemGregorianProleptic::monthName( date, format );
+-}
+-
+-QString KCalendarSystemMinguo::weekDayName( int weekDay, WeekDayNameFormat format ) const
+-{
+- return KCalendarSystemGregorianProleptic::weekDayName( weekDay, format );
+-}
+-
+-QString KCalendarSystemMinguo::weekDayName( const QDate &date, WeekDayNameFormat format ) const
+-{
+- return KCalendarSystemGregorianProleptic::weekDayName( date, format );
+-}
+-
+-QString KCalendarSystemMinguo::yearString( const QDate &pDate, StringFormat format ) const
+-{
+- return KCalendarSystemGregorianProleptic::yearString( pDate, format );
+-}
+-
+-QString KCalendarSystemMinguo::monthString( const QDate &pDate, StringFormat format ) const
+-{
+- return KCalendarSystemGregorianProleptic::monthString( pDate, format );
+-}
+-
+-QString KCalendarSystemMinguo::dayString( const QDate &pDate, StringFormat format ) const
+-{
+- return KCalendarSystemGregorianProleptic::dayString( pDate, format );
+-}
+-
+-int KCalendarSystemMinguo::yearStringToInteger( const QString &sNum, int &iLength ) const
+-{
+- return KCalendarSystemGregorianProleptic::yearStringToInteger( sNum, iLength );
+-}
+-
+-int KCalendarSystemMinguo::monthStringToInteger( const QString &sNum, int &iLength ) const
+-{
+- return KCalendarSystemGregorianProleptic::monthStringToInteger( sNum, iLength );
+-}
+-
+-int KCalendarSystemMinguo::dayStringToInteger( const QString &sNum, int &iLength ) const
+-{
+- return KCalendarSystemGregorianProleptic::dayStringToInteger( sNum, iLength );
+-}
+-
+-QString KCalendarSystemMinguo::formatDate( const QDate &date, KLocale::DateFormat format ) const
+-{
+- return KCalendarSystemGregorianProleptic::formatDate( date, format );
+-}
+-
+-QDate KCalendarSystemMinguo::readDate( const QString &str, bool *ok ) const
+-{
+- return KCalendarSystemGregorianProleptic::readDate( str, ok );
+-}
+-
+-QDate KCalendarSystemMinguo::readDate( const QString &intstr, const QString &fmt, bool *ok ) const
+-{
+- return KCalendarSystemGregorianProleptic::readDate( intstr, fmt, ok );
+-}
+-
+-QDate KCalendarSystemMinguo::readDate( const QString &str, KLocale::ReadDateFlags flags, bool *ok ) const
+-{
+- return KCalendarSystemGregorianProleptic::readDate( str, flags, ok );
+-}
+-
+-int KCalendarSystemMinguo::weekStartDay() const
+-{
+- return KCalendarSystemGregorianProleptic::weekStartDay();
++ return KCalendarSystemGregorian::weekDayName(date, format);
+ }
+
+ int KCalendarSystemMinguo::weekDayOfPray() const
+@@ -309,17 +168,17 @@ int KCalendarSystemMinguo::weekDayOfPray() const
+
+ bool KCalendarSystemMinguo::isLunar() const
+ {
+- return KCalendarSystemGregorianProleptic::isLunar();
++ return KCalendarSystemGregorian::isLunar();
+ }
+
+ bool KCalendarSystemMinguo::isLunisolar() const
+ {
+- return KCalendarSystemGregorianProleptic::isLunisolar();
++ return KCalendarSystemGregorian::isLunisolar();
+ }
+
+ bool KCalendarSystemMinguo::isSolar() const
+ {
+- return KCalendarSystemGregorianProleptic::isSolar();
++ return KCalendarSystemGregorian::isSolar();
+ }
+
+ bool KCalendarSystemMinguo::isProleptic() const
+@@ -327,15 +186,15 @@ bool KCalendarSystemMinguo::isProleptic() const
+ return false;
+ }
+
+-bool KCalendarSystemMinguo::julianDayToDate( int jd, int &year, int &month, int &day ) const
++bool KCalendarSystemMinguo::julianDayToDate(int jd, int &year, int &month, int &day) const
+ {
+- bool result = KCalendarSystemGregorianProleptic::julianDayToDate( jd, year, month, day );
++ bool result = KCalendarSystemGregorian::julianDayToDate(jd, year, month, day);
+ year = year - 1911;
+ return result;
+ }
+
+-bool KCalendarSystemMinguo::dateToJulianDay( int year, int month, int day, int &jd ) const
++bool KCalendarSystemMinguo::dateToJulianDay(int year, int month, int day, int &jd) const
+ {
+- return KCalendarSystemGregorianProleptic::dateToJulianDay( year + 1911, month, day, jd );
++ return KCalendarSystemGregorian::dateToJulianDay(year + 1911, month, day, jd);
+ }
+
+diff --git a/kdecore/date/kcalendarsystemminguo_p.h b/kdecore/date/kcalendarsystemminguo_p.h
+index a3f0acc..6e257af 100644
+--- a/kdecore/date/kcalendarsystemminguo_p.h
++++ b/kdecore/date/kcalendarsystemminguo_p.h
+@@ -20,7 +20,7 @@
+ #ifndef KCALENDARSYSTEMMINGUO_H
+ #define KCALENDARSYSTEMMINGUO_H
+
+-#include "kcalendarsystemgregorianproleptic_p.h"
++#include "kcalendarsystemgregorian_p.h"
+
+ class KCalendarSystemMinguoPrivate;
+
+@@ -35,11 +35,11 @@ class KCalendarSystemMinguoPrivate;
+ *
+ * @author John Layt <john@layt.net>
+ */
+-class KCalendarSystemMinguo: public KCalendarSystemGregorianProleptic
++class KCalendarSystemMinguo: public KCalendarSystemGregorian
+ {
+ public:
+- explicit KCalendarSystemMinguo( const KLocale *locale = 0 );
+- explicit KCalendarSystemMinguo( const KSharedConfig::Ptr config, const KLocale *locale = 0 );
++ explicit KCalendarSystemMinguo(const KLocale *locale = 0);
++ explicit KCalendarSystemMinguo(const KSharedConfig::Ptr config, const KLocale *locale = 0);
+ virtual ~KCalendarSystemMinguo();
+
+ virtual QString calendarType() const;
+@@ -47,58 +47,19 @@ public:
+ virtual QDate epoch() const;
+ virtual QDate earliestValidDate() const;
+ virtual QDate latestValidDate() const;
+- virtual bool isValid( int year, int month, int day ) const;
+- virtual bool isValid( const QDate &date ) const;
++ virtual bool isValid(int year, int month, int day) const;
++ virtual bool isValid(const QDate &date) const;
+
+- virtual bool setDate( QDate &date, int year, int month, int day ) const;
+- /** @deprecated */
+- virtual bool setYMD( QDate &date, int year, int month, int day ) const;
++ virtual bool isLeapYear(int year) const;
++ virtual bool isLeapYear(const QDate &date) const;
+
+- virtual int year( const QDate &date ) const;
+- virtual int month( const QDate &date ) const;
+- virtual int day( const QDate &date ) const;
++ virtual QString monthName(int month, int year, MonthNameFormat format = LongName) const;
++ virtual QString monthName(const QDate &date, MonthNameFormat format = LongName) const;
+
+- virtual QDate addYears( const QDate &date, int nyears ) const;
+- virtual QDate addMonths( const QDate &date, int nmonths ) const;
+- virtual QDate addDays( const QDate &date, int ndays ) const;
++ virtual QString weekDayName(int weekDay, WeekDayNameFormat format = LongDayName) const;
++ virtual QString weekDayName(const QDate &date, WeekDayNameFormat format = LongDayName) const;
+
+- virtual int monthsInYear( const QDate &date ) const;
+- virtual int weeksInYear( const QDate &date ) const;
+- virtual int weeksInYear( int year ) const;
+- virtual int daysInYear( const QDate &date ) const;
+- virtual int daysInMonth( const QDate &date ) const;
+- virtual int daysInWeek( const QDate &date ) const;
+-
+- virtual int dayOfYear( const QDate &date ) const;
+- virtual int dayOfWeek( const QDate &date ) const;
+-
+- virtual int weekNumber( const QDate &date, int *yearNum = 0 ) const;
+-
+- virtual bool isLeapYear( int year ) const;
+- virtual bool isLeapYear( const QDate &date ) const;
+-
+- virtual QString monthName( int month, int year, MonthNameFormat format = LongName ) const;
+- virtual QString monthName( const QDate &date, MonthNameFormat format = LongName ) const;
+-
+- virtual QString weekDayName( int weekDay, WeekDayNameFormat format = LongDayName ) const;
+- virtual QString weekDayName( const QDate &date, WeekDayNameFormat format = LongDayName ) const;
+-
+- virtual QString yearString( const QDate & pDate, StringFormat format = LongFormat ) const;
+- virtual QString monthString( const QDate &pDate, StringFormat format = LongFormat ) const;
+- virtual QString dayString( const QDate &pDate, StringFormat format = LongFormat ) const;
+-
+- virtual int yearStringToInteger( const QString &sNum, int &iLength ) const;
+- virtual int monthStringToInteger( const QString &sNum, int &iLength ) const;
+- virtual int dayStringToInteger( const QString &sNum, int &iLength ) const;
+-
+- virtual QString formatDate( const QDate &fromDate, KLocale::DateFormat toFormat = KLocale::LongDate ) const;
+-
+- virtual QDate readDate( const QString &str, bool *ok = 0 ) const;
+- virtual QDate readDate( const QString &dateString, const QString &dateFormat, bool *ok = 0 ) const;
+- virtual QDate readDate( const QString &str, KLocale::ReadDateFlags flags, bool *ok = 0 ) const;
+-
+- virtual int weekStartDay() const;
+- virtual int weekDayOfPray () const;
++ virtual int weekDayOfPray() const;
+
+ virtual bool isLunar() const;
+ virtual bool isLunisolar() const;
+@@ -106,11 +67,11 @@ public:
+ virtual bool isProleptic() const;
+
+ protected:
+- virtual bool julianDayToDate( int jd, int &year, int &month, int &day ) const;
+- virtual bool dateToJulianDay( int year, int month, int day, int &jd ) const;
+- KCalendarSystemMinguo( KCalendarSystemMinguoPrivate &dd,
+- const KSharedConfig::Ptr config = KSharedConfig::Ptr(),
+- const KLocale *locale = 0 );
++ virtual bool julianDayToDate(int jd, int &year, int &month, int &day) const;
++ virtual bool dateToJulianDay(int year, int month, int day, int &jd) const;
++ KCalendarSystemMinguo(KCalendarSystemMinguoPrivate &dd,
++ const KSharedConfig::Ptr config = KSharedConfig::Ptr(),
++ const KLocale *locale = 0);
+
+ private:
+ Q_DECLARE_PRIVATE(KCalendarSystemMinguo)
+diff --git a/kdecore/date/kcalendarsystemprivate_p.h b/kdecore/date/kcalendarsystemprivate_p.h
+index ce3a6bc..406fece 100644
+--- a/kdecore/date/kcalendarsystemprivate_p.h
++++ b/kdecore/date/kcalendarsystemprivate_p.h
+@@ -28,8 +28,7 @@ class KCalendarSystem;
+ class KCalendarEra;
+ class KLocale;
+
+-struct DateComponents
+-{
++struct DateComponents {
+ int day;
+ int month;
+ int year;
+@@ -47,74 +46,74 @@ struct DateComponents
+ class KCalendarSystemPrivate
+ {
+ public:
+- explicit KCalendarSystemPrivate( KCalendarSystem *q );
++ explicit KCalendarSystemPrivate(KCalendarSystem *q);
+
+ virtual ~KCalendarSystemPrivate();
+
+ // Virtual methods each calendar system must re-implement
+ virtual KLocale::CalendarSystem calendarSystem() const;
+ virtual void loadDefaultEraList();
+- virtual int monthsInYear( int year ) const;
+- virtual int daysInMonth( int year, int month ) const;
+- virtual int daysInYear( int year ) const;
++ virtual int monthsInYear(int year) const;
++ virtual int daysInMonth(int year, int month) const;
++ virtual int daysInYear(int year) const;
+ virtual int daysInWeek() const;
+- virtual bool isLeapYear( int year ) const;
++ virtual bool isLeapYear(int year) const;
+ virtual bool hasLeapMonths() const;
+ virtual bool hasYearZero() const;
+ virtual int maxDaysInWeek() const;
+ virtual int maxMonthsInYear() const;
+ virtual int earliestValidYear() const;
+ virtual int latestValidYear() const;
+- virtual QString monthName( int month, int year, KLocale::DateTimeComponentFormat format, bool possessive = false ) const;
+- virtual QString weekDayName( int weekDay, KLocale::DateTimeComponentFormat format ) const;
++ virtual QString monthName(int month, int year, KLocale::DateTimeComponentFormat format, bool possessive = false) const;
++ virtual QString weekDayName(int weekDay, KLocale::DateTimeComponentFormat format) const;
+
+ // Virtual methods to re-implement if special maths needed
+- virtual int week( const QDate &date, KLocale::WeekNumberSystem weekNumberSystem, int *yearNum ) const;
+- virtual int isoWeekNumber( const QDate &date, int *yearNum ) const;
+- virtual int regularWeekNumber( const QDate &date, int weekStartDay, int firstWeekNumber, int *weekYear ) const;
+- virtual int simpleWeekNumber( const QDate &date, int *yearNum ) const;
+- virtual int weeksInYear( int year, KLocale::WeekNumberSystem weekNumberSystem ) const;
+- virtual int isoWeeksInYear( int year ) const;
+- virtual int regularWeeksInYear( int year, int weekStartDay, int firstWeekNumber ) const;
+- virtual int simpleWeeksInYear( int year ) const;
++ virtual int week(const QDate &date, KLocale::WeekNumberSystem weekNumberSystem, int *yearNum) const;
++ virtual int isoWeekNumber(const QDate &date, int *yearNum) const;
++ virtual int regularWeekNumber(const QDate &date, int weekStartDay, int firstWeekNumber, int *weekYear) const;
++ virtual int simpleWeekNumber(const QDate &date, int *yearNum) const;
++ virtual int weeksInYear(int year, KLocale::WeekNumberSystem weekNumberSystem) const;
++ virtual int isoWeeksInYear(int year) const;
++ virtual int regularWeeksInYear(int year, int weekStartDay, int firstWeekNumber) const;
++ virtual int simpleWeeksInYear(int year) const;
+
+ // Virtual methods to re-implement if special maths needed
+ // Currently only Hebrew may need special conversion, rest should be OK
+- virtual int yearsDifference( const QDate &fromDate, const QDate &toDate ) const;
+- virtual int monthsDifference( const QDate &fromDate, const QDate &toDate ) const;
+- virtual void dateDifference( const QDate &fromDate, const QDate &toDate,
+- int *yearsDiff, int *monthsDiff, int *daysDiff, int *direction ) const;
++ virtual int yearsDifference(const QDate &fromDate, const QDate &toDate) const;
++ virtual int monthsDifference(const QDate &fromDate, const QDate &toDate) const;
++ virtual void dateDifference(const QDate &fromDate, const QDate &toDate,
++ int *yearsDiff, int *monthsDiff, int *daysDiff, int *direction) const;
+
+ // Virtual methods to re-implement if special number/string conversion needed
+ // Currently only Hebrew needs special conversion, rest use KLocale DigitSet
+- virtual int integerFromString( const QString &string, int maxLength, int &readLength ) const;
+- virtual QString stringFromInteger( int number, int padWidth = 0, QChar padChar = QLatin1Char('0') ) const;
+- virtual QString stringFromInteger( int number, int padWidth, QChar padChar, KLocale::DigitSet digitSet ) const;
++ virtual int integerFromString(const QString &string, int maxLength, int &readLength) const;
++ virtual QString stringFromInteger(int number, int padWidth = 0, QChar padChar = QLatin1Char('0')) const;
++ virtual QString stringFromInteger(int number, int padWidth, QChar padChar, KLocale::DigitSet digitSet) const;
+
+ // Utility functions
+- bool setAnyDate( QDate &date, int year, int month, int day ) const;
+- int addYears( int startYear, int yearsToAdd ) const;
+- int differenceYearNumbers( int fromYear, int toYear ) const;
++ bool setAnyDate(QDate &date, int year, int month, int day) const;
++ int addYears(int startYear, int yearsToAdd) const;
++ int differenceYearNumbers(int fromYear, int toYear) const;
+ QDate invalidDate() const;
+- QString simpleDateString( const QString &str ) const;
+- int dayOfYear( const QDate &date ) const;
+- int dayOfWeek( const QDate &date ) const;
+- QDate firstDayOfYear( int year ) const;
+- QDate lastDayOfYear( int year ) const;
+- QDate firstDayOfMonth( int year, int month ) const;
+- QDate lastDayOfMonth( int year, int month ) const;
++ QString simpleDateString(const QString &str) const;
++ int dayOfYear(const QDate &date) const;
++ int dayOfWeek(const QDate &date) const;
++ QDate firstDayOfYear(int year) const;
++ QDate lastDayOfYear(int year) const;
++ QDate firstDayOfMonth(int year, int month) const;
++ QDate lastDayOfMonth(int year, int month) const;
+ const KLocale *locale() const;
+- void loadEraList( const KConfigGroup & cg );
+- void addEra( char direction, int offset, const QDate &startDate, int startYear, const QDate &endDate,
+- const QString &name, const QString &shortName, const QString &format );
++ void loadEraList(const KConfigGroup & cg);
++ void addEra(char direction, int offset, const QDate &startDate, int startYear, const QDate &endDate,
++ const QString &name, const QString &shortName, const QString &format);
+ QList<KCalendarEra> *eraList() const;
+- KCalendarEra era( const QDate &eraDate ) const;
+- KCalendarEra era( const QString &eraName, int yearInEra ) const;
++ KCalendarEra era(const QDate &eraDate) const;
++ KCalendarEra era(const QString &eraName, int yearInEra) const;
+ int shortYearWindowStartYear() const;
+- int applyShortYearWindow( int inputYear ) const;
+- void loadShortYearWindowStartYear( const KConfigGroup & cg );
++ int applyShortYearWindow(int inputYear) const;
++ void loadShortYearWindowStartYear(const KConfigGroup & cg);
+ KSharedConfig::Ptr config();
+- void loadConfig( const QString & calendarType );
++ void loadConfig(const QString & calendarType);
+
+ // Global variables each calendar system must initialise
+ const KCalendarSystem *q;
+diff --git a/kdecore/date/kcalendarsystemqdate.cpp b/kdecore/date/kcalendarsystemqdate.cpp
+new file mode 100644
+index 0000000..1acf3be
+--- /dev/null
++++ b/kdecore/date/kcalendarsystemqdate.cpp
+@@ -0,0 +1,561 @@
++/*
++ Copyright (c) 2002 Carlos Moro <cfmoro@correo.uniovi.es>
++ Copyright (c) 2002-2003 Hans Petter Bieker <bieker@kde.org>
++ Copyright 2007, 2010 John Layt <john@layt.net>
++
++ This library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Library General Public
++ License as published by the Free Software Foundation; either
++ version 2 of the License, or (at your option) any later version.
++
++ This library is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Library General Public License for more details.
++
++ You should have received a copy of the GNU Library General Public License
++ along with this library; see the file COPYING.LIB. If not, write to
++ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
++ Boston, MA 02110-1301, USA.
++*/
++
++// Derived QDate kde calendar class
++
++#include "kcalendarsystemqdate_p.h"
++#include "kcalendarsystemprivate_p.h"
++#include "kcalendarera_p.h"
++
++#include "kdebug.h"
++#include "klocale.h"
++#include "kglobal.h"
++#include "kconfiggroup.h"
++
++#include <QtCore/QDate>
++#include <QtCore/QCharRef>
++
++class KCalendarSystemQDatePrivate : public KCalendarSystemPrivate
++{
++public:
++ explicit KCalendarSystemQDatePrivate(KCalendarSystemQDate *q);
++
++ virtual ~KCalendarSystemQDatePrivate();
++
++ // Virtual methods each calendar system must re-implement
++ virtual KLocale::CalendarSystem calendarSystem() const;
++ virtual void loadDefaultEraList();
++ virtual int monthsInYear(int year) const;
++ virtual int daysInMonth(int year, int month) const;
++ virtual int daysInYear(int year) const;
++ virtual int daysInWeek() const;
++ virtual bool isLeapYear(int year) const;
++ virtual bool hasLeapMonths() const;
++ virtual bool hasYearZero() const;
++ virtual int maxDaysInWeek() const;
++ virtual int maxMonthsInYear() const;
++ virtual int earliestValidYear() const;
++ virtual int latestValidYear() const;
++ virtual QString monthName(int month, int year, KLocale::DateTimeComponentFormat format, bool possessive) const;
++ virtual QString weekDayName(int weekDay, KLocale::DateTimeComponentFormat format) const;
++
++ bool m_useCommonEra;
++};
++
++// Shared d pointer implementations
++
++KCalendarSystemQDatePrivate::KCalendarSystemQDatePrivate(KCalendarSystemQDate *q)
++ : KCalendarSystemPrivate(q),
++ m_useCommonEra(false)
++
++{
++}
++
++KCalendarSystemQDatePrivate::~KCalendarSystemQDatePrivate()
++{
++}
++
++KLocale::CalendarSystem KCalendarSystemQDatePrivate::calendarSystem() const
++{
++ return KLocale::QDateCalendar;
++}
++
++void KCalendarSystemQDatePrivate::loadDefaultEraList()
++{
++ QString name, shortName, format;
++
++ KConfigGroup lcg(config(), QString::fromLatin1("Locale"));
++ KConfigGroup cg = lcg.group(QString::fromLatin1("KCalendarSystem %1").arg(q->calendarType(q->calendarSystem())));
++ m_useCommonEra = cg.readEntry("UseCommonEra", false);
++
++ if (m_useCommonEra) {
++ name = i18nc("Calendar Era: Gregorian Common Era, years < 0, LongFormat", "Before Common Era");
++ shortName = i18nc("Calendar Era: Gregorian Common Era, years < 0, ShortFormat", "BCE");
++ } else {
++ name = i18nc("Calendar Era: Gregorian Christian Era, years < 0, LongFormat", "Before Christ");
++ shortName = i18nc("Calendar Era: Gregorian Christian Era, years < 0, ShortFormat", "BC");
++ }
++ format = i18nc("(kdedt-format) Gregorian, BC, full era year format used for %EY, e.g. 2000 BC", "%Ey %EC");
++ addEra('-', 1, q->epoch().addDays(-1), -1, q->earliestValidDate(), name, shortName, format);
++
++ if (m_useCommonEra) {
++ name = i18nc("Calendar Era: Gregorian Common Era, years > 0, LongFormat", "Common Era");
++ shortName = i18nc("Calendar Era: Gregorian Common Era, years > 0, ShortFormat", "CE");
++ } else {
++ name = i18nc("Calendar Era: Gregorian Christian Era, years > 0, LongFormat", "Anno Domini");
++ shortName = i18nc("Calendar Era: Gregorian Christian Era, years > 0, ShortFormat", "AD");
++ }
++ format = i18nc("(kdedt-format) Gregorian, AD, full era year format used for %EY, e.g. 2000 AD", "%Ey %EC");
++ addEra('+', 1, q->epoch(), 1, q->latestValidDate(), name, shortName, format);
++}
++
++int KCalendarSystemQDatePrivate::monthsInYear(int year) const
++{
++ Q_UNUSED(year)
++ return 12;
++}
++
++int KCalendarSystemQDatePrivate::daysInMonth(int year, int month) const
++{
++ QDate tempDate(year, month, 1);
++ return tempDate.daysInMonth();
++}
++
++int KCalendarSystemQDatePrivate::daysInYear(int year) const
++{
++ QDate tempDate(year, 1, 1);
++ return tempDate.daysInYear();
++}
++
++int KCalendarSystemQDatePrivate::daysInWeek() const
++{
++ return 7;
++}
++
++bool KCalendarSystemQDatePrivate::isLeapYear(int year) const
++{
++ return QDate::isLeapYear(year);
++}
++
++bool KCalendarSystemQDatePrivate::hasLeapMonths() const
++{
++ return false;
++}
++
++bool KCalendarSystemQDatePrivate::hasYearZero() const
++{
++ return false;
++}
++
++int KCalendarSystemQDatePrivate::maxDaysInWeek() const
++{
++ return 7;
++}
++
++int KCalendarSystemQDatePrivate::maxMonthsInYear() const
++{
++ return 12;
++}
++
++int KCalendarSystemQDatePrivate::earliestValidYear() const
++{
++ return -4712;
++}
++
++int KCalendarSystemQDatePrivate::latestValidYear() const
++{
++ return 9999;
++}
++
++QString KCalendarSystemQDatePrivate::monthName(int month, int year, KLocale::DateTimeComponentFormat format, bool possessive) const
++{
++ Q_UNUSED(year);
++
++ if (format == KLocale::NarrowName) {
++ switch (month) {
++ case 1:
++ return ki18nc("Gregorian month 1 - KLocale::NarrowName", "J").toString(locale());
++ case 2:
++ return ki18nc("Gregorian month 2 - KLocale::NarrowName", "F").toString(locale());
++ case 3:
++ return ki18nc("Gregorian month 3 - KLocale::NarrowName", "M").toString(locale());
++ case 4:
++ return ki18nc("Gregorian month 4 - KLocale::NarrowName", "A").toString(locale());
++ case 5:
++ return ki18nc("Gregorian month 5 - KLocale::NarrowName", "M").toString(locale());
++ case 6:
++ return ki18nc("Gregorian month 6 - KLocale::NarrowName", "J").toString(locale());
++ case 7:
++ return ki18nc("Gregorian month 7 - KLocale::NarrowName", "J").toString(locale());
++ case 8:
++ return ki18nc("Gregorian month 8 - KLocale::NarrowName", "A").toString(locale());
++ case 9:
++ return ki18nc("Gregorian month 9 - KLocale::NarrowName", "S").toString(locale());
++ case 10:
++ return ki18nc("Gregorian month 10 - KLocale::NarrowName", "O").toString(locale());
++ case 11:
++ return ki18nc("Gregorian month 11 - KLocale::NarrowName", "N").toString(locale());
++ case 12:
++ return ki18nc("Gregorian month 12 - KLocale::NarrowName", "D").toString(locale());
++ default:
++ return QString();
++ }
++ }
++
++ if (format == KLocale::ShortName && possessive) {
++ switch (month) {
++ case 1:
++ return ki18nc("Gregorian month 1 - KLocale::ShortName Possessive", "of Jan").toString(locale());
++ case 2:
++ return ki18nc("Gregorian month 2 - KLocale::ShortName Possessive", "of Feb").toString(locale());
++ case 3:
++ return ki18nc("Gregorian month 3 - KLocale::ShortName Possessive", "of Mar").toString(locale());
++ case 4:
++ return ki18nc("Gregorian month 4 - KLocale::ShortName Possessive", "of Apr").toString(locale());
++ case 5:
++ return ki18nc("Gregorian month 5 - KLocale::ShortName Possessive", "of May").toString(locale());
++ case 6:
++ return ki18nc("Gregorian month 6 - KLocale::ShortName Possessive", "of Jun").toString(locale());
++ case 7:
++ return ki18nc("Gregorian month 7 - KLocale::ShortName Possessive", "of Jul").toString(locale());
++ case 8:
++ return ki18nc("Gregorian month 8 - KLocale::ShortName Possessive", "of Aug").toString(locale());
++ case 9:
++ return ki18nc("Gregorian month 9 - KLocale::ShortName Possessive", "of Sep").toString(locale());
++ case 10:
++ return ki18nc("Gregorian month 10 - KLocale::ShortName Possessive", "of Oct").toString(locale());
++ case 11:
++ return ki18nc("Gregorian month 11 - KLocale::ShortName Possessive", "of Nov").toString(locale());
++ case 12:
++ return ki18nc("Gregorian month 12 - KLocale::ShortName Possessive", "of Dec").toString(locale());
++ default:
++ return QString();
++ }
++ }
++
++ if (format == KLocale::ShortName && !possessive) {
++ switch (month) {
++ case 1:
++ return ki18nc("Gregorian month 1 - KLocale::ShortName", "Jan").toString(locale());
++ case 2:
++ return ki18nc("Gregorian month 2 - KLocale::ShortName", "Feb").toString(locale());
++ case 3:
++ return ki18nc("Gregorian month 3 - KLocale::ShortName", "Mar").toString(locale());
++ case 4:
++ return ki18nc("Gregorian month 4 - KLocale::ShortName", "Apr").toString(locale());
++ case 5:
++ return ki18nc("Gregorian month 5 - KLocale::ShortName", "May").toString(locale());
++ case 6:
++ return ki18nc("Gregorian month 6 - KLocale::ShortName", "Jun").toString(locale());
++ case 7:
++ return ki18nc("Gregorian month 7 - KLocale::ShortName", "Jul").toString(locale());
++ case 8:
++ return ki18nc("Gregorian month 8 - KLocale::ShortName", "Aug").toString(locale());
++ case 9:
++ return ki18nc("Gregorian month 9 - KLocale::ShortName", "Sep").toString(locale());
++ case 10:
++ return ki18nc("Gregorian month 10 - KLocale::ShortName", "Oct").toString(locale());
++ case 11:
++ return ki18nc("Gregorian month 11 - KLocale::ShortName", "Nov").toString(locale());
++ case 12:
++ return ki18nc("Gregorian month 12 - KLocale::ShortName", "Dec").toString(locale());
++ default:
++ return QString();
++ }
++ }
++
++ if (format == KLocale::LongName && possessive) {
++ switch (month) {
++ case 1:
++ return ki18nc("Gregorian month 1 - KLocale::LongName Possessive", "of January").toString(locale());
++ case 2:
++ return ki18nc("Gregorian month 2 - KLocale::LongName Possessive", "of February").toString(locale());
++ case 3:
++ return ki18nc("Gregorian month 3 - KLocale::LongName Possessive", "of March").toString(locale());
++ case 4:
++ return ki18nc("Gregorian month 4 - KLocale::LongName Possessive", "of April").toString(locale());
++ case 5:
++ return ki18nc("Gregorian month 5 - KLocale::LongName Possessive", "of May").toString(locale());
++ case 6:
++ return ki18nc("Gregorian month 6 - KLocale::LongName Possessive", "of June").toString(locale());
++ case 7:
++ return ki18nc("Gregorian month 7 - KLocale::LongName Possessive", "of July").toString(locale());
++ case 8:
++ return ki18nc("Gregorian month 8 - KLocale::LongName Possessive", "of August").toString(locale());
++ case 9:
++ return ki18nc("Gregorian month 9 - KLocale::LongName Possessive", "of September").toString(locale());
++ case 10:
++ return ki18nc("Gregorian month 10 - KLocale::LongName Possessive", "of October").toString(locale());
++ case 11:
++ return ki18nc("Gregorian month 11 - KLocale::LongName Possessive", "of November").toString(locale());
++ case 12:
++ return ki18nc("Gregorian month 12 - KLocale::LongName Possessive", "of December").toString(locale());
++ default:
++ return QString();
++ }
++ }
++
++ // Default to LongName
++ switch (month) {
++ case 1:
++ return ki18nc("Gregorian month 1 - KLocale::LongName", "January").toString(locale());
++ case 2:
++ return ki18nc("Gregorian month 2 - KLocale::LongName", "February").toString(locale());
++ case 3:
++ return ki18nc("Gregorian month 3 - KLocale::LongName", "March").toString(locale());
++ case 4:
++ return ki18nc("Gregorian month 4 - KLocale::LongName", "April").toString(locale());
++ case 5:
++ return ki18nc("Gregorian month 5 - KLocale::LongName", "May").toString(locale());
++ case 6:
++ return ki18nc("Gregorian month 6 - KLocale::LongName", "June").toString(locale());
++ case 7:
++ return ki18nc("Gregorian month 7 - KLocale::LongName", "July").toString(locale());
++ case 8:
++ return ki18nc("Gregorian month 8 - KLocale::LongName", "August").toString(locale());
++ case 9:
++ return ki18nc("Gregorian month 9 - KLocale::LongName", "September").toString(locale());
++ case 10:
++ return ki18nc("Gregorian month 10 - KLocale::LongName", "October").toString(locale());
++ case 11:
++ return ki18nc("Gregorian month 11 - KLocale::LongName", "November").toString(locale());
++ case 12:
++ return ki18nc("Gregorian month 12 - KLocale::LongName", "December").toString(locale());
++ default:
++ return QString();
++ }
++}
++
++QString KCalendarSystemQDatePrivate::weekDayName(int weekDay, KLocale::DateTimeComponentFormat format) const
++{
++ if (format == KLocale::NarrowName) {
++ switch (weekDay) {
++ case 1:
++ return ki18nc("Gregorian weekday 1 - KLocale::NarrowName ", "M").toString(locale());
++ case 2:
++ return ki18nc("Gregorian weekday 2 - KLocale::NarrowName ", "T").toString(locale());
++ case 3:
++ return ki18nc("Gregorian weekday 3 - KLocale::NarrowName ", "W").toString(locale());
++ case 4:
++ return ki18nc("Gregorian weekday 4 - KLocale::NarrowName ", "T").toString(locale());
++ case 5:
++ return ki18nc("Gregorian weekday 5 - KLocale::NarrowName ", "F").toString(locale());
++ case 6:
++ return ki18nc("Gregorian weekday 6 - KLocale::NarrowName ", "S").toString(locale());
++ case 7:
++ return ki18nc("Gregorian weekday 7 - KLocale::NarrowName ", "S").toString(locale());
++ default:
++ return QString();
++ }
++ }
++
++ if (format == KLocale::ShortName || format == KLocale:: ShortNumber) {
++ switch (weekDay) {
++ case 1:
++ return ki18nc("Gregorian weekday 1 - KLocale::ShortName", "Mon").toString(locale());
++ case 2:
++ return ki18nc("Gregorian weekday 2 - KLocale::ShortName", "Tue").toString(locale());
++ case 3:
++ return ki18nc("Gregorian weekday 3 - KLocale::ShortName", "Wed").toString(locale());
++ case 4:
++ return ki18nc("Gregorian weekday 4 - KLocale::ShortName", "Thu").toString(locale());
++ case 5:
++ return ki18nc("Gregorian weekday 5 - KLocale::ShortName", "Fri").toString(locale());
++ case 6:
++ return ki18nc("Gregorian weekday 6 - KLocale::ShortName", "Sat").toString(locale());
++ case 7:
++ return ki18nc("Gregorian weekday 7 - KLocale::ShortName", "Sun").toString(locale());
++ default: return QString();
++ }
++ }
++
++ switch (weekDay) {
++ case 1:
++ return ki18nc("Gregorian weekday 1 - KLocale::LongName", "Monday").toString(locale());
++ case 2:
++ return ki18nc("Gregorian weekday 2 - KLocale::LongName", "Tuesday").toString(locale());
++ case 3:
++ return ki18nc("Gregorian weekday 3 - KLocale::LongName", "Wednesday").toString(locale());
++ case 4:
++ return ki18nc("Gregorian weekday 4 - KLocale::LongName", "Thursday").toString(locale());
++ case 5:
++ return ki18nc("Gregorian weekday 5 - KLocale::LongName", "Friday").toString(locale());
++ case 6:
++ return ki18nc("Gregorian weekday 6 - KLocale::LongName", "Saturday").toString(locale());
++ case 7:
++ return ki18nc("Gregorian weekday 7 - KLocale::LongName", "Sunday").toString(locale());
++ default:
++ return QString();
++ }
++}
++
++
++KCalendarSystemQDate::KCalendarSystemQDate(const KLocale *locale)
++ : KCalendarSystem(*new KCalendarSystemQDatePrivate(this), KSharedConfig::Ptr(), locale)
++{
++ d_ptr->loadConfig(calendarType());
++}
++
++KCalendarSystemQDate::KCalendarSystemQDate(const KSharedConfig::Ptr config, const KLocale *locale)
++ : KCalendarSystem(*new KCalendarSystemQDatePrivate(this), config, locale)
++{
++ d_ptr->loadConfig(calendarType());
++}
++
++KCalendarSystemQDate::KCalendarSystemQDate(KCalendarSystemQDatePrivate &dd, const KSharedConfig::Ptr config, const KLocale *locale)
++ : KCalendarSystem(dd, config, locale)
++{
++ d_ptr->loadConfig(calendarType());
++}
++
++KCalendarSystemQDate::~KCalendarSystemQDate()
++{
++}
++
++QString KCalendarSystemQDate::calendarType() const
++{
++ return QLatin1String("gregorian");
++}
++
++QDate KCalendarSystemQDate::epoch() const
++{
++ // 1 Jan 1 AD in Julian
++ return QDate::fromJulianDay(1721424);
++}
++
++QDate KCalendarSystemQDate::earliestValidDate() const
++{
++ // 1 Jan 4712 BC, no year zero, cant be 4713BC due to error in QDate that day 0 is not valid
++ // and we really need the first in each year to be valid for the date maths
++ return QDate::fromJulianDay(366);
++}
++
++QDate KCalendarSystemQDate::latestValidDate() const
++{
++ // Set to last day of year 9999 until confirm date formats & widets support > 9999
++ // In Gregorian this is 9999-12-31, which is is jd 5373484
++ // Can't call setDate( 9999, 12, 31 ) as it creates circular reference!
++ return QDate::fromJulianDay(5373484);
++}
++
++bool KCalendarSystemQDate::isValid(int year, int month, int day) const
++{
++ // Limit to max year 9999 for now, QDate allows to be greater
++ if (year <= 9999) {
++ return QDate::isValid(year, month, day);
++ }
++
++ return false;
++}
++
++bool KCalendarSystemQDate::isValid(const QDate &date) const
++{
++ return KCalendarSystem::isValid(date);
++}
++
++int KCalendarSystemQDate::year(const QDate &date) const
++{
++ return date.year();
++}
++
++int KCalendarSystemQDate::month(const QDate &date) const
++{
++ return date.month();
++}
++
++int KCalendarSystemQDate::day(const QDate &date) const
++{
++ return date.day();
++}
++
++int KCalendarSystemQDate::daysInYear(const QDate &date) const
++{
++ return date.daysInYear();
++}
++
++int KCalendarSystemQDate::daysInMonth(const QDate &date) const
++{
++ return date.daysInMonth();
++}
++
++int KCalendarSystemQDate::dayOfYear(const QDate &date) const
++{
++ return date.dayOfYear();
++}
++
++int KCalendarSystemQDate::dayOfWeek(const QDate &date) const
++{
++ return date.dayOfWeek();
++}
++
++bool KCalendarSystemQDate::isLeapYear(int year) const
++{
++ return QDate::isLeapYear(year);
++}
++
++bool KCalendarSystemQDate::isLeapYear(const QDate &date) const
++{
++ return QDate::isLeapYear(date.year());
++}
++
++QString KCalendarSystemQDate::monthName(int month, int year, MonthNameFormat format) const
++{
++ return KCalendarSystem::monthName(month, year, format);
++}
++
++QString KCalendarSystemQDate::monthName(const QDate &date, MonthNameFormat format) const
++{
++ return KCalendarSystem::monthName(date, format);
++}
++
++QString KCalendarSystemQDate::weekDayName(int weekDay, WeekDayNameFormat format) const
++{
++ return KCalendarSystem::weekDayName(weekDay, format);
++}
++
++QString KCalendarSystemQDate::weekDayName(const QDate &date, WeekDayNameFormat format) const
++{
++ return KCalendarSystem::weekDayName(date, format);
++}
++
++int KCalendarSystemQDate::weekDayOfPray() const
++{
++ return 7; // sunday
++}
++
++bool KCalendarSystemQDate::isLunar() const
++{
++ return false;
++}
++
++bool KCalendarSystemQDate::isLunisolar() const
++{
++ return false;
++}
++
++bool KCalendarSystemQDate::isSolar() const
++{
++ return true;
++}
++
++bool KCalendarSystemQDate::isProleptic() const
++{
++ return false;
++}
++
++bool KCalendarSystemQDate::julianDayToDate(int jd, int &year, int &month, int &day) const
++{
++ QDate date = QDate::fromJulianDay(jd);
++
++ date.getDate(&year, &month, &day);
++
++ return date.isValid();
++}
++
++bool KCalendarSystemQDate::dateToJulianDay(int year, int month, int day, int &jd) const
++{
++ QDate date;
++
++ date.setDate(year, month, day);
++ jd = date.toJulianDay();
++
++ return date.isValid();
++}
+diff --git a/kdecore/date/kcalendarsystemqdate_p.h b/kdecore/date/kcalendarsystemqdate_p.h
+new file mode 100644
+index 0000000..5d86bd6
+--- /dev/null
++++ b/kdecore/date/kcalendarsystemqdate_p.h
+@@ -0,0 +1,93 @@
++/*
++ Copyright (c) 2002 Carlos Moro <cfmoro@correo.uniovi.es>
++ Copyright (c) 2002 Hans Petter Bieker <bieker@kde.org>
++ Copyright 2007, 2010 John Layt <john@layt.net>
++
++ This library is free software; you can redistribute it and/or
++ modify it under the terms of the GNU Library General Public
++ License as published by the Free Software Foundation; either
++ version 2 of the License, or (at your option) any later version.
++
++ This library is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ Library General Public License for more details.
++
++ You should have received a copy of the GNU Library General Public License
++ along with this library; see the file COPYING.LIB. If not, write to
++ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
++ Boston, MA 02110-1301, USA.
++*/
++
++#ifndef KCALENDARSYSTEMQDATE_H
++#define KCALENDARSYSTEMQDATE_H
++
++#include "kcalendarsystem.h"
++
++class KCalendarSystemQDatePrivate;
++
++/**
++ * @internal
++ * This is the QDate calendar implementation which combines the Julian and Gregorian
++ * calculations into a single calendar. It should always be used by default in Qt
++ * applications for consistency.
++ *
++ * @b license GNU-LGPL v.2+
++ *
++ * @see KLocale,KCalendarSystem
++ *
++ * @author John Layt <john@layt.net>
++ */
++class KCalendarSystemQDate: public KCalendarSystem
++{
++public:
++ explicit KCalendarSystemQDate(const KLocale *locale = 0);
++ explicit KCalendarSystemQDate(const KSharedConfig::Ptr config, const KLocale *locale = 0);
++ virtual ~KCalendarSystemQDate();
++
++ virtual QString calendarType() const;
++
++ virtual QDate epoch() const;
++ virtual QDate earliestValidDate() const;
++ virtual QDate latestValidDate() const;
++ virtual bool isValid(int year, int month, int day) const;
++ virtual bool isValid(const QDate &date) const;
++
++ virtual int year(const QDate &date) const;
++ virtual int month(const QDate &date) const;
++ virtual int day(const QDate &date) const;
++
++ virtual int daysInYear(const QDate &date) const;
++ virtual int daysInMonth(const QDate &date) const;
++
++ virtual int dayOfYear(const QDate &date) const;
++ virtual int dayOfWeek(const QDate &date) const;
++
++ virtual bool isLeapYear(int year) const;
++ virtual bool isLeapYear(const QDate &date) const;
++
++ virtual QString monthName(int month, int year, MonthNameFormat format = LongName) const;
++ virtual QString monthName(const QDate &date, MonthNameFormat format = LongName) const;
++
++ virtual QString weekDayName(int weekDay, WeekDayNameFormat format = LongDayName) const;
++ virtual QString weekDayName(const QDate &date, WeekDayNameFormat format = LongDayName) const;
++
++ virtual int weekDayOfPray() const;
++
++ virtual bool isLunar() const;
++ virtual bool isLunisolar() const;
++ virtual bool isSolar() const;
++ virtual bool isProleptic() const;
++
++protected:
++ virtual bool julianDayToDate(int jd, int &year, int &month, int &day) const;
++ virtual bool dateToJulianDay(int year, int month, int day, int &jd) const;
++ KCalendarSystemQDate(KCalendarSystemQDatePrivate &dd,
++ const KSharedConfig::Ptr config = KSharedConfig::Ptr(),
++ const KLocale *locale = 0);
++
++private:
++ Q_DECLARE_PRIVATE(KCalendarSystemQDate)
++};
++
++#endif
+diff --git a/kdecore/date/kcalendarsystemthai.cpp b/kdecore/date/kcalendarsystemthai.cpp
+index ab51aaa..9a1ca5a 100644
+--- a/kdecore/date/kcalendarsystemthai.cpp
++++ b/kdecore/date/kcalendarsystemthai.cpp
+@@ -18,31 +18,31 @@
+ */
+
+ #include "kcalendarsystemthai_p.h"
+-#include "kcalendarsystemgregorianprolepticprivate_p.h"
++#include "kcalendarsystemgregorianprivate_p.h"
+
+ #include "kdebug.h"
+ #include "klocale.h"
+
+ #include <QtCore/QDate>
+
+-//Reuse the Gregorian Proleptic private implementation
+-class KCalendarSystemThaiPrivate : public KCalendarSystemGregorianProlepticPrivate
++//Reuse the Gregorian private implementation
++class KCalendarSystemThaiPrivate : public KCalendarSystemGregorianPrivate
+ {
+ public:
+- explicit KCalendarSystemThaiPrivate( KCalendarSystemThai *q );
++ explicit KCalendarSystemThaiPrivate(KCalendarSystemThai *q);
+ virtual ~KCalendarSystemThaiPrivate();
+
+ virtual KLocale::CalendarSystem calendarSystem() const;
+ virtual void loadDefaultEraList();
+- virtual bool isLeapYear( int year ) const;
++ virtual bool isLeapYear(int year) const;
+ virtual bool hasYearZero() const;
+ virtual int earliestValidYear() const;
+ };
+
+-//Override only a few of the Gregorian Proleptic private methods
++//Override only a few of the Gregorian private methods
+
+-KCalendarSystemThaiPrivate::KCalendarSystemThaiPrivate( KCalendarSystemThai *q )
+- : KCalendarSystemGregorianProlepticPrivate( q )
++KCalendarSystemThaiPrivate::KCalendarSystemThaiPrivate(KCalendarSystemThai *q)
++ : KCalendarSystemGregorianPrivate(q)
+ {
+ }
+
+@@ -59,15 +59,15 @@ void KCalendarSystemThaiPrivate::loadDefaultEraList()
+ {
+ QString name, shortName, format;
+
+- name = i18nc( "Calendar Era: Thai Buddhist Era, years > 0, LongFormat", "Buddhist Era" );
+- shortName = i18nc( "Calendar Era: Thai Buddhist Era, years > 0, ShortFormat", "BE" );
+- format = i18nc( "(kdedt-format) Thai, BE, full era year format used for %EY, e.g. 2000 BE", "%Ey %EC" );
+- addEra( '+', 1, q->epoch(), 1, q->latestValidDate(), name, shortName, format );
++ name = i18nc("Calendar Era: Thai Buddhist Era, years > 0, LongFormat", "Buddhist Era");
++ shortName = i18nc("Calendar Era: Thai Buddhist Era, years > 0, ShortFormat", "BE");
++ format = i18nc("(kdedt-format) Thai, BE, full era year format used for %EY, e.g. 2000 BE", "%Ey %EC");
++ addEra('+', 1, q->epoch(), 1, q->latestValidDate(), name, shortName, format);
+ }
+
+-bool KCalendarSystemThaiPrivate::isLeapYear( int year ) const
++bool KCalendarSystemThaiPrivate::isLeapYear(int year) const
+ {
+- return KCalendarSystemGregorianProlepticPrivate::isLeapYear( year - 543 );
++ return KCalendarSystemGregorianPrivate::isLeapYear(year - 543);
+ }
+
+ bool KCalendarSystemThaiPrivate::hasYearZero() const
+@@ -81,23 +81,23 @@ int KCalendarSystemThaiPrivate::earliestValidYear() const
+ }
+
+
+-KCalendarSystemThai::KCalendarSystemThai( const KLocale *locale )
+- : KCalendarSystemGregorianProleptic( *new KCalendarSystemThaiPrivate( this ), KSharedConfig::Ptr(), locale )
++KCalendarSystemThai::KCalendarSystemThai(const KLocale *locale)
++ : KCalendarSystemGregorian(*new KCalendarSystemThaiPrivate(this), KSharedConfig::Ptr(), locale)
+ {
+- d_ptr->loadConfig( calendarType() );
++ d_ptr->loadConfig(calendarType());
+ }
+
+-KCalendarSystemThai::KCalendarSystemThai( const KSharedConfig::Ptr config, const KLocale *locale )
+- : KCalendarSystemGregorianProleptic( *new KCalendarSystemThaiPrivate( this ), config, locale )
++KCalendarSystemThai::KCalendarSystemThai(const KSharedConfig::Ptr config, const KLocale *locale)
++ : KCalendarSystemGregorian(*new KCalendarSystemThaiPrivate(this), config, locale)
+ {
+- d_ptr->loadConfig( calendarType() );
++ d_ptr->loadConfig(calendarType());
+ }
+
+-KCalendarSystemThai::KCalendarSystemThai( KCalendarSystemThaiPrivate &dd,
+- const KSharedConfig::Ptr config, const KLocale *locale )
+- : KCalendarSystemGregorianProleptic( dd, config, locale )
++KCalendarSystemThai::KCalendarSystemThai(KCalendarSystemThaiPrivate &dd,
++ const KSharedConfig::Ptr config, const KLocale *locale)
++ : KCalendarSystemGregorian(dd, config, locale)
+ {
+- d_ptr->loadConfig( calendarType() );
++ d_ptr->loadConfig(calendarType());
+ }
+
+ KCalendarSystemThai::~KCalendarSystemThai()
+@@ -106,13 +106,13 @@ KCalendarSystemThai::~KCalendarSystemThai()
+
+ QString KCalendarSystemThai::calendarType() const
+ {
+- return QLatin1String( "thai" );
++ return QLatin1String("thai");
+ }
+
+ QDate KCalendarSystemThai::epoch() const
+ {
+ // 0000-01-01 = 0544-01-01 BC Gregorian = 0544-01-07 BC Julian
+- return QDate::fromJulianDay( 1522734 );
++ return QDate::fromJulianDay(1522734);
+ }
+
+ QDate KCalendarSystemThai::earliestValidDate() const
+@@ -124,188 +124,27 @@ QDate KCalendarSystemThai::latestValidDate() const
+ {
+ // Set to last day of year 9999 until confirm date formats & widgets support > 9999
+ // 9999-12-31 = 9456-12-31 AD Gregorian
+- return QDate::fromJulianDay( 5175158 );
++ return QDate::fromJulianDay(5175158);
+ }
+
+-bool KCalendarSystemThai::isValid( int year, int month, int day ) const
++bool KCalendarSystemThai::isValid(int year, int month, int day) const
+ {
+- return KCalendarSystemGregorianProleptic::isValid( year, month, day );
++ return KCalendarSystemGregorian::isValid(year, month, day);
+ }
+
+-bool KCalendarSystemThai::isValid( const QDate &date ) const
++bool KCalendarSystemThai::isValid(const QDate &date) const
+ {
+- return KCalendarSystemGregorianProleptic::isValid( date );
++ return KCalendarSystemGregorian::isValid(date);
+ }
+
+-bool KCalendarSystemThai::setDate( QDate &date, int year, int month, int day ) const
++bool KCalendarSystemThai::isLeapYear(int year) const
+ {
+- return KCalendarSystemGregorianProleptic::setDate( date, year, month, day );
++ return KCalendarSystemGregorian::isLeapYear(year);
+ }
+
+-// Deprecated
+-bool KCalendarSystemThai::setYMD( QDate &date, int y, int m, int d ) const
++bool KCalendarSystemThai::isLeapYear(const QDate &date) const
+ {
+- return KCalendarSystemGregorianProleptic::setDate( date, y, m, d );
+-}
+-
+-int KCalendarSystemThai::year( const QDate &date ) const
+-{
+- return KCalendarSystemGregorianProleptic::year( date );
+-}
+-
+-int KCalendarSystemThai::month( const QDate &date ) const
+-{
+- return KCalendarSystemGregorianProleptic::month( date );
+-}
+-
+-int KCalendarSystemThai::day( const QDate &date ) const
+-{
+- return KCalendarSystemGregorianProleptic::day( date );
+-}
+-
+-QDate KCalendarSystemThai::addYears( const QDate &date, int nyears ) const
+-{
+- return KCalendarSystemGregorianProleptic::addYears( date, nyears );
+-}
+-
+-QDate KCalendarSystemThai::addMonths( const QDate &date, int nmonths ) const
+-{
+- return KCalendarSystemGregorianProleptic::addMonths( date, nmonths );
+-}
+-
+-QDate KCalendarSystemThai::addDays( const QDate &date, int ndays ) const
+-{
+- return KCalendarSystemGregorianProleptic::addDays( date, ndays );
+-}
+-
+-int KCalendarSystemThai::monthsInYear( const QDate &date ) const
+-{
+- return KCalendarSystemGregorianProleptic::monthsInYear( date );
+-}
+-
+-int KCalendarSystemThai::weeksInYear( const QDate &date ) const
+-{
+- return KCalendarSystemGregorianProleptic::weeksInYear( date );
+-}
+-
+-int KCalendarSystemThai::weeksInYear( int year ) const
+-{
+- return KCalendarSystemGregorianProleptic::weeksInYear( year );
+-}
+-
+-int KCalendarSystemThai::daysInYear( const QDate &date ) const
+-{
+- return KCalendarSystemGregorianProleptic::daysInYear( date );
+-}
+-
+-int KCalendarSystemThai::daysInMonth( const QDate &date ) const
+-{
+- return KCalendarSystemGregorianProleptic::daysInMonth( date );
+-}
+-
+-int KCalendarSystemThai::daysInWeek( const QDate &date ) const
+-{
+- return KCalendarSystemGregorianProleptic::daysInWeek( date );
+-}
+-
+-int KCalendarSystemThai::dayOfYear( const QDate &date ) const
+-{
+- return KCalendarSystemGregorianProleptic::dayOfYear( date );
+-}
+-
+-int KCalendarSystemThai::dayOfWeek( const QDate &date ) const
+-{
+- return KCalendarSystemGregorianProleptic::dayOfWeek( date );
+-}
+-
+-int KCalendarSystemThai::weekNumber( const QDate &date, int * yearNum ) const
+-{
+- return KCalendarSystemGregorianProleptic::weekNumber( date, yearNum );
+-}
+-
+-bool KCalendarSystemThai::isLeapYear( int year ) const
+-{
+- return KCalendarSystemGregorianProleptic::isLeapYear( year );
+-}
+-
+-bool KCalendarSystemThai::isLeapYear( const QDate &date ) const
+-{
+- return KCalendarSystemGregorianProleptic::isLeapYear( date );
+-}
+-
+-QString KCalendarSystemThai::monthName( int month, int year, MonthNameFormat format ) const
+-{
+- return KCalendarSystemGregorianProleptic::monthName( month, year, format );
+-}
+-
+-QString KCalendarSystemThai::monthName( const QDate &date, MonthNameFormat format ) const
+-{
+- return KCalendarSystemGregorianProleptic::monthName( date, format );
+-}
+-
+-QString KCalendarSystemThai::weekDayName( int weekDay, WeekDayNameFormat format ) const
+-{
+- return KCalendarSystemGregorianProleptic::weekDayName( weekDay, format );
+-}
+-
+-QString KCalendarSystemThai::weekDayName( const QDate &date, WeekDayNameFormat format ) const
+-{
+- return KCalendarSystemGregorianProleptic::weekDayName( date, format );
+-}
+-
+-QString KCalendarSystemThai::yearString( const QDate &pDate, StringFormat format ) const
+-{
+- return KCalendarSystemGregorianProleptic::yearString( pDate, format );
+-}
+-
+-QString KCalendarSystemThai::monthString( const QDate &pDate, StringFormat format ) const
+-{
+- return KCalendarSystemGregorianProleptic::monthString( pDate, format );
+-}
+-
+-QString KCalendarSystemThai::dayString( const QDate &pDate, StringFormat format ) const
+-{
+- return KCalendarSystemGregorianProleptic::dayString( pDate, format );
+-}
+-
+-int KCalendarSystemThai::yearStringToInteger( const QString &sNum, int &iLength ) const
+-{
+- return KCalendarSystemGregorianProleptic::yearStringToInteger( sNum, iLength );
+-}
+-
+-int KCalendarSystemThai::monthStringToInteger( const QString &sNum, int &iLength ) const
+-{
+- return KCalendarSystemGregorianProleptic::monthStringToInteger( sNum, iLength );
+-}
+-
+-int KCalendarSystemThai::dayStringToInteger( const QString &sNum, int &iLength ) const
+-{
+- return KCalendarSystemGregorianProleptic::dayStringToInteger( sNum, iLength );
+-}
+-
+-QString KCalendarSystemThai::formatDate( const QDate &date, KLocale::DateFormat format ) const
+-{
+- return KCalendarSystemGregorianProleptic::formatDate( date, format );
+-}
+-
+-QDate KCalendarSystemThai::readDate( const QString &str, bool *ok ) const
+-{
+- return KCalendarSystemGregorianProleptic::readDate( str, ok );
+-}
+-
+-QDate KCalendarSystemThai::readDate( const QString &intstr, const QString &fmt, bool *ok ) const
+-{
+- return KCalendarSystemGregorianProleptic::readDate( intstr, fmt, ok );
+-}
+-
+-QDate KCalendarSystemThai::readDate( const QString &str, KLocale::ReadDateFlags flags, bool *ok ) const
+-{
+- return KCalendarSystemGregorianProleptic::readDate( str, flags, ok );
+-}
+-
+-int KCalendarSystemThai::weekStartDay() const
+-{
+- return KCalendarSystemGregorianProleptic::weekStartDay();
++ return KCalendarSystemGregorian::isLeapYear(date);
+ }
+
+ int KCalendarSystemThai::weekDayOfPray() const
+@@ -315,17 +154,17 @@ int KCalendarSystemThai::weekDayOfPray() const
+
+ bool KCalendarSystemThai::isLunar() const
+ {
+- return KCalendarSystemGregorianProleptic::isLunar();
++ return KCalendarSystemGregorian::isLunar();
+ }
+
+ bool KCalendarSystemThai::isLunisolar() const
+ {
+- return KCalendarSystemGregorianProleptic::isLunisolar();
++ return KCalendarSystemGregorian::isLunisolar();
+ }
+
+ bool KCalendarSystemThai::isSolar() const
+ {
+- return KCalendarSystemGregorianProleptic::isSolar();
++ return KCalendarSystemGregorian::isSolar();
+ }
+
+ bool KCalendarSystemThai::isProleptic() const
+@@ -333,15 +172,15 @@ bool KCalendarSystemThai::isProleptic() const
+ return false;
+ }
+
+-bool KCalendarSystemThai::julianDayToDate( int jd, int &year, int &month, int &day ) const
++bool KCalendarSystemThai::julianDayToDate(int jd, int &year, int &month, int &day) const
+ {
+- bool result = KCalendarSystemGregorianProleptic::julianDayToDate( jd, year, month, day );
++ bool result = KCalendarSystemGregorian::julianDayToDate(jd, year, month, day);
+ year = year + 543;
+ return result;
+ }
+
+-bool KCalendarSystemThai::dateToJulianDay( int year, int month, int day, int &jd ) const
++bool KCalendarSystemThai::dateToJulianDay(int year, int month, int day, int &jd) const
+ {
+- return KCalendarSystemGregorianProleptic::dateToJulianDay( year - 543, month, day, jd );
++ return KCalendarSystemGregorian::dateToJulianDay(year - 543, month, day, jd);
+ }
+
+diff --git a/kdecore/date/kcalendarsystemthai_p.h b/kdecore/date/kcalendarsystemthai_p.h
+index c0007c0..9aa02a2 100644
+--- a/kdecore/date/kcalendarsystemthai_p.h
++++ b/kdecore/date/kcalendarsystemthai_p.h
+@@ -20,7 +20,7 @@
+ #ifndef KCALENDARSYSTEMTHAI_H
+ #define KCALENDARSYSTEMTHAI_H
+
+-#include "kcalendarsystemgregorianproleptic_p.h"
++#include "kcalendarsystemgregorian_p.h"
+
+ class KCalendarSystemThaiPrivate;
+
+@@ -35,11 +35,11 @@ class KCalendarSystemThaiPrivate;
+ *
+ * @author John Layt <john@layt.net>
+ */
+-class KCalendarSystemThai: public KCalendarSystemGregorianProleptic
++class KCalendarSystemThai: public KCalendarSystemGregorian
+ {
+ public:
+- explicit KCalendarSystemThai( const KLocale *locale = 0 );
+- explicit KCalendarSystemThai( const KSharedConfig::Ptr config, const KLocale *locale = 0 );
++ explicit KCalendarSystemThai(const KLocale *locale = 0);
++ explicit KCalendarSystemThai(const KSharedConfig::Ptr config, const KLocale *locale = 0);
+ virtual ~KCalendarSystemThai();
+
+ virtual QString calendarType() const;
+@@ -47,58 +47,13 @@ public:
+ virtual QDate epoch() const;
+ virtual QDate earliestValidDate() const;
+ virtual QDate latestValidDate() const;
+- virtual bool isValid( int year, int month, int day ) const;
+- virtual bool isValid( const QDate &date ) const;
++ virtual bool isValid(int year, int month, int day) const;
++ virtual bool isValid(const QDate &date) const;
+
+- virtual bool setDate( QDate &date, int year, int month, int day ) const;
+- /** @deprecated */
+- virtual bool setYMD( QDate &date, int year, int month, int day ) const;
++ virtual bool isLeapYear(int year) const;
++ virtual bool isLeapYear(const QDate &date) const;
+
+- virtual int year( const QDate &date ) const;
+- virtual int month( const QDate &date ) const;
+- virtual int day( const QDate &date ) const;
+-
+- virtual QDate addYears( const QDate &date, int nyears ) const;
+- virtual QDate addMonths( const QDate &date, int nmonths ) const;
+- virtual QDate addDays( const QDate &date, int ndays ) const;
+-
+- virtual int monthsInYear( const QDate &date ) const;
+- virtual int weeksInYear( const QDate &date ) const;
+- virtual int weeksInYear( int year ) const;
+- virtual int daysInYear( const QDate &date ) const;
+- virtual int daysInMonth( const QDate &date ) const;
+- virtual int daysInWeek( const QDate &date ) const;
+-
+- virtual int dayOfYear( const QDate &date ) const;
+- virtual int dayOfWeek( const QDate &date ) const;
+-
+- virtual int weekNumber( const QDate &date, int *yearNum = 0 ) const;
+-
+- virtual bool isLeapYear( int year ) const;
+- virtual bool isLeapYear( const QDate &date ) const;
+-
+- virtual QString monthName( int month, int year, MonthNameFormat format = LongName ) const;
+- virtual QString monthName( const QDate &date, MonthNameFormat format = LongName ) const;
+-
+- virtual QString weekDayName( int weekDay, WeekDayNameFormat format = LongDayName ) const;
+- virtual QString weekDayName( const QDate &date, WeekDayNameFormat format = LongDayName ) const;
+-
+- virtual QString yearString( const QDate & pDate, StringFormat format = LongFormat ) const;
+- virtual QString monthString( const QDate &pDate, StringFormat format = LongFormat ) const;
+- virtual QString dayString( const QDate &pDate, StringFormat format = LongFormat ) const;
+-
+- virtual int yearStringToInteger( const QString &sNum, int &iLength ) const;
+- virtual int monthStringToInteger( const QString &sNum, int &iLength ) const;
+- virtual int dayStringToInteger( const QString &sNum, int &iLength ) const;
+-
+- virtual QString formatDate( const QDate &fromDate, KLocale::DateFormat toFormat = KLocale::LongDate ) const;
+-
+- virtual QDate readDate( const QString &str, bool *ok = 0 ) const;
+- virtual QDate readDate( const QString &dateString, const QString &dateFormat, bool *ok = 0 ) const;
+- virtual QDate readDate( const QString &str, KLocale::ReadDateFlags flags, bool *ok = 0 ) const;
+-
+- virtual int weekStartDay() const;
+- virtual int weekDayOfPray () const;
++ virtual int weekDayOfPray() const;
+
+ virtual bool isLunar() const;
+ virtual bool isLunisolar() const;
+@@ -106,11 +61,11 @@ public:
+ virtual bool isProleptic() const;
+
+ protected:
+- virtual bool julianDayToDate( int jd, int &year, int &month, int &day ) const;
+- virtual bool dateToJulianDay( int year, int month, int day, int &jd ) const;
+- KCalendarSystemThai( KCalendarSystemThaiPrivate &dd,
+- const KSharedConfig::Ptr config = KSharedConfig::Ptr(),
+- const KLocale *locale = 0 );
++ virtual bool julianDayToDate(int jd, int &year, int &month, int &day) const;
++ virtual bool dateToJulianDay(int year, int month, int day, int &jd) const;
++ KCalendarSystemThai(KCalendarSystemThaiPrivate &dd,
++ const KSharedConfig::Ptr config = KSharedConfig::Ptr(),
++ const KLocale *locale = 0);
+
+ private:
+ Q_DECLARE_PRIVATE(KCalendarSystemThai)
+diff --git a/kdecore/date/kdatetime.cpp b/kdecore/date/kdatetime.cpp
+index 5d24fdf..4ba627b 100644
+--- a/kdecore/date/kdatetime.cpp
++++ b/kdecore/date/kdatetime.cpp
+@@ -39,7 +39,7 @@
+
+ #include <kglobal.h>
+ #include <klocale.h>
+-#include "kcalendarsystemgregorian_p.h"
++#include "kcalendarsystemqdate_p.h"
+ #include <ksystemtimezone.h>
+ #include <kdebug.h>
+
+@@ -1427,7 +1427,7 @@ QString KDateTime::toString(const QString &format) const
+ return QString();
+ enum { TZNone, UTCOffsetShort, UTCOffset, UTCOffsetColon, TZAbbrev, TZName };
+ KLocale *locale = KGlobal::locale();
+- KCalendarSystemGregorian calendar(locale);
++ KCalendarSystemQDate calendar(locale);
+ QString result;
+ QString s;
+ int num, numLength, zone;
+@@ -2484,7 +2484,7 @@ QDateTime fromStr(const QString& string, const QString& format, int& utcOffset,
+
+ enum { TZNone, UTCOffset, UTCOffsetColon, TZAbbrev, TZName };
+ KLocale *locale = KGlobal::locale();
+- KCalendarSystemGregorian calendar(locale);
++ KCalendarSystemQDate calendar(locale);
+ int zone;
+ int s = 0;
+ int send = str.length();
+diff --git a/kdecore/date/kdatetimeformatter.cpp b/kdecore/date/kdatetimeformatter.cpp
+index 9d8e271..82bbe9e 100644
+--- a/kdecore/date/kdatetimeformatter.cpp
++++ b/kdecore/date/kdatetimeformatter.cpp
+@@ -33,8 +33,8 @@
+ #include "kdebug.h"
+
+ KDateTimeFormatter::KDateTimeFormatter()
+- : m_englishLocale(0),
+- m_englishCalendar(0)
++ : m_englishLocale(0),
++ m_englishCalendar(0)
+ {
+ }
+
+@@ -44,70 +44,70 @@ KDateTimeFormatter::~KDateTimeFormatter()
+ delete m_englishLocale;
+ }
+
+-QString KDateTimeFormatter::formatDate( const QDate &fromDate,
+- const QString &toFormat,
+- const KCalendarSystem *calendar,
+- const KLocale *locale,
+- KLocale::DigitSet digitSet,
+- KLocale::DateTimeFormatStandard formatStandard ) const
++QString KDateTimeFormatter::formatDate(const QDate &fromDate,
++ const QString &toFormat,
++ const KCalendarSystem *calendar,
++ const KLocale *locale,
++ KLocale::DigitSet digitSet,
++ KLocale::DateTimeFormatStandard formatStandard) const
+ {
+ // If not valid input, don't waste our time
+- if ( !calendar->isValid( fromDate ) || toFormat.isEmpty() ) {
++ if (!calendar->isValid(fromDate) || toFormat.isEmpty()) {
+ return QString();
+ }
+
+- return formatDateTime( KDateTime( fromDate ), toFormat, 0, calendar, locale, digitSet, formatStandard );
++ return formatDateTime(KDateTime(fromDate), toFormat, 0, calendar, locale, digitSet, formatStandard);
+ }
+
+-QString KDateTimeFormatter::formatTime( const QTime &fromTime,
+- const QString &toFormat,
+- KLocale::TimeFormatOptions timeOptions,
+- const KCalendarSystem *calendar,
+- const KLocale *locale,
+- KLocale::DigitSet digitSet,
+- KLocale::DateTimeFormatStandard formatStandard ) const
++QString KDateTimeFormatter::formatTime(const QTime &fromTime,
++ const QString &toFormat,
++ KLocale::TimeFormatOptions timeOptions,
++ const KCalendarSystem *calendar,
++ const KLocale *locale,
++ KLocale::DigitSet digitSet,
++ KLocale::DateTimeFormatStandard formatStandard) const
+ {
+ // If not valid input, don't waste our time
+- if ( fromTime.isValid() || toFormat.isEmpty() ) {
++ if (fromTime.isValid() || toFormat.isEmpty()) {
+ return QString();
+ }
+
+- return formatDateTime( KDateTime( QDate::currentDate(), fromTime ), toFormat, timeOptions, calendar, locale, digitSet, formatStandard );
++ return formatDateTime(KDateTime(QDate::currentDate(), fromTime), toFormat, timeOptions, calendar, locale, digitSet, formatStandard);
+ }
+
+ // Format an input date to match a POSIX date format string
+-QString KDateTimeFormatter::formatDateTime( const KDateTime &fromDateTime,
+- const QString &toFormat,
+- KLocale::TimeFormatOptions timeOptions,
+- const KCalendarSystem *calendar,
+- const KLocale *locale,
+- KLocale::DigitSet digitSet,
+- KLocale::DateTimeFormatStandard formatStandard ) const
++QString KDateTimeFormatter::formatDateTime(const KDateTime &fromDateTime,
++ const QString &toFormat,
++ KLocale::TimeFormatOptions timeOptions,
++ const KCalendarSystem *calendar,
++ const KLocale *locale,
++ KLocale::DigitSet digitSet,
++ KLocale::DateTimeFormatStandard formatStandard) const
+ {
+ // If not valid input, don't waste our time
+- if ( !fromDateTime.isValid() || !calendar->isValid( fromDateTime.date() ) || toFormat.isEmpty() ) {
++ if (!fromDateTime.isValid() || !calendar->isValid(fromDateTime.date()) || toFormat.isEmpty()) {
+ return QString();
+ }
+
+- if ( formatStandard == KLocale::UnicodeFormat ) {
+- return formatDateTimeUnicode( fromDateTime, toFormat, timeOptions, calendar, locale, digitSet );
++ if (formatStandard == KLocale::UnicodeFormat) {
++ return formatDateTimeUnicode(fromDateTime, toFormat, timeOptions, calendar, locale, digitSet);
+ } else {
+- return formatDateTimePosix( fromDateTime, toFormat, timeOptions, calendar, locale, digitSet, formatStandard );
++ return formatDateTimePosix(fromDateTime, toFormat, timeOptions, calendar, locale, digitSet, formatStandard);
+ }
+ }
+
+ // Format an input date to match a POSIX date format string
+-QString KDateTimeFormatter::formatDateTimePosix( const KDateTime &fromDateTime,
+- const QString &toFormat,
+- KLocale::TimeFormatOptions timeOptions,
+- const KCalendarSystem *calendar,
+- const KLocale *locale,
+- KLocale::DigitSet digitSet,
+- KLocale::DateTimeFormatStandard formatStandard ) const
++QString KDateTimeFormatter::formatDateTimePosix(const KDateTime &fromDateTime,
++ const QString &toFormat,
++ KLocale::TimeFormatOptions timeOptions,
++ const KCalendarSystem *calendar,
++ const KLocale *locale,
++ KLocale::DigitSet digitSet,
++ KLocale::DateTimeFormatStandard formatStandard) const
+ {
+ //kDebug() << "formatDateTimePosix(" << fromDateTime << toFormat << ")";
+ // If not valid input, don't waste our time
+- if ( !fromDateTime.isValid() || toFormat.isEmpty() ) {
++ if (!fromDateTime.isValid() || toFormat.isEmpty()) {
+ return QString();
+ }
+
+@@ -131,55 +131,55 @@ QString KDateTimeFormatter::formatDateTimePosix( const KDateTime &fromDateTime,
+ // Pre-fetch the core date components as they get used a lot
+ // and it is 1/3rd more efficient than 3 separatre calls
+ int year, month, day;
+- calendar->getDate( fromDateTime.date(), &year, &month, &day );
++ calendar->getDate(fromDateTime.date(), &year, &month, &day);
+
+- for ( int formatIndex = 0; formatIndex < toFormat.length(); ++formatIndex ) {
++ for (int formatIndex = 0; formatIndex < toFormat.length(); ++formatIndex) {
+
+- thisChar = toFormat.at( formatIndex );
++ thisChar = toFormat.at(formatIndex);
+
+- if ( !escape ) {
++ if (!escape) {
+
+- if ( thisChar == QLatin1Char('%') ) {
++ if (thisChar == QLatin1Char('%')) {
+ escape = true;
+ escapeIndex = formatIndex;
+ } else {
+- result.append( toFormat.at( formatIndex ) );
++ result.append(toFormat.at(formatIndex));
+ }
+
+- } else if ( !escapeMod && !escapeWidth && thisChar == QLatin1Char('-') ) { // no padding
++ } else if (!escapeMod && !escapeWidth && thisChar == QLatin1Char('-')) { // no padding
+
+ padChar = QChar();
+ escapePad = true;
+
+- } else if ( !escapeMod && !escapeWidth && thisChar == QLatin1Char('_') ) { // space padding
++ } else if (!escapeMod && !escapeWidth && thisChar == QLatin1Char('_')) { // space padding
+
+ padChar = QLatin1Char(' ');
+ escapePad = true;
+
+- } else if ( !escapeMod && !escapeWidth && thisChar == QLatin1Char('0') ) { // 0 padding
++ } else if (!escapeMod && !escapeWidth && thisChar == QLatin1Char('0')) { // 0 padding
+
+ padChar = QLatin1Char('0');
+ escapePad = true;
+
+- } else if ( !escapeMod && !escapeWidth && ( thisChar == QLatin1Char('^') || thisChar == QLatin1Char('#') ) ) { // Change case
++ } else if (!escapeMod && !escapeWidth && (thisChar == QLatin1Char('^') || thisChar == QLatin1Char('#'))) { // Change case
+
+ caseChar = thisChar;
+
+- } else if ( !escapeMod &&
+- ( ( !escapeWidth && thisChar >= QLatin1Char('1') && thisChar <= QLatin1Char('9') ) ||
+- ( escapeWidth && thisChar >= QLatin1Char('0') && thisChar <= QLatin1Char('9') ) ) ) { // Change width
++ } else if (!escapeMod &&
++ ((!escapeWidth && thisChar >= QLatin1Char('1') && thisChar <= QLatin1Char('9')) ||
++ (escapeWidth && thisChar >= QLatin1Char('0') && thisChar <= QLatin1Char('9')))) { // Change width
+
+- if ( escapeWidth ) {
++ if (escapeWidth) {
+ padWidth = padWidth * 10;
+ }
+- padWidth = padWidth + QString( thisChar ).toInt();
++ padWidth = padWidth + QString(thisChar).toInt();
+ escapeWidth = true;
+
+- } else if ( !escapeMod && ( thisChar == QLatin1Char('E') || thisChar == QLatin1Char('O') || thisChar == QLatin1Char(':') ) ) { // Set modifier
++ } else if (!escapeMod && (thisChar == QLatin1Char('E') || thisChar == QLatin1Char('O') || thisChar == QLatin1Char(':'))) { // Set modifier
+
+ escapeMod = true;
+ modifierChar = thisChar;
+- if ( thisChar == QLatin1Char(':') ) {
++ if (thisChar == QLatin1Char(':')) {
+ invalidModifier = true;
+ }
+
+@@ -196,414 +196,414 @@ QString KDateTimeFormatter::formatDateTimePosix( const KDateTime &fromDateTime,
+ //Default settings unless overridden by pad and case flags and width: are 0 pad to 0 width no sign
+ //Names will override 0 pad with no pad unless flagged
+ //Numbers will override with correct width unless flagged
+- QChar thisChar = toFormat.at( formatIndex ).unicode();
+- switch ( thisChar.unicode() ) {
+- case '%': //Literal %
+- if ( modifierChar != QLatin1Char(':') ) { // E and O mods are ignored if not used, but : is treated as literal
+- componentString = QLatin1Char('%');
+- if ( !escapePad ) {
+- padChar = QChar();
+- }
++ QChar thisChar = toFormat.at(formatIndex).unicode();
++ switch (thisChar.unicode()) {
++ case '%': //Literal %
++ if (modifierChar != QLatin1Char(':')) { // E and O mods are ignored if not used, but : is treated as literal
++ componentString = QLatin1Char('%');
++ if (!escapePad) {
++ padChar = QChar();
+ }
+- break;
+- case 't': //Tab
+- if ( modifierChar != QLatin1Char(':') ) {
+- componentString = QString::fromLatin1("\t");
+- if ( !escapePad ) {
+- padChar = QChar();
+- }
++ }
++ break;
++ case 't': //Tab
++ if (modifierChar != QLatin1Char(':')) {
++ componentString = QString::fromLatin1("\t");
++ if (!escapePad) {
++ padChar = QChar();
+ }
+- break;
+- case 'Y':
+- if ( modifierChar == QLatin1Char('E') ) { //Era Year, default no pad to 0 places no sign
+- if ( !escapePad ) {
+- padChar = QLatin1Char(' ');
+- }
+- componentString = calendar->eraYear( fromDateTime.date() );
+- } else if ( modifierChar != QLatin1Char(':') ) { //Long year numeric, default 0 pad to 4 places with sign
+- componentInteger = qAbs( year );
+- minWidth = 4;
+- if ( year < 0 ) {
+- signChar = QLatin1Char('-');
+- }
++ }
++ break;
++ case 'Y':
++ if (modifierChar == QLatin1Char('E')) { //Era Year, default no pad to 0 places no sign
++ if (!escapePad) {
++ padChar = QLatin1Char(' ');
+ }
+- break;
+- case 'C':
+- if ( modifierChar == QLatin1Char('E') ) { //Era name, default no pad to 0 places no sign
+- if ( !escapePad ) {
+- padChar = QLatin1Char(' ');
+- }
+- componentString = calendar->eraName( fromDateTime.date() );
+- } else if ( modifierChar != QLatin1Char(':') ) { //Century numeric, default 0 pad to 2 places with sign
+- componentInteger = qAbs( year ) / 100 ;
+- minWidth = 2;
+- if ( year < 0 ) {
+- signChar = QLatin1Char('-');
+- }
++ componentString = calendar->eraYear(fromDateTime.date());
++ } else if (modifierChar != QLatin1Char(':')) { //Long year numeric, default 0 pad to 4 places with sign
++ componentInteger = qAbs(year);
++ minWidth = 4;
++ if (year < 0) {
++ signChar = QLatin1Char('-');
+ }
+- break;
+- case 'y':
+- if ( modifierChar == QLatin1Char('E') ) { //Year in Era number, default 0 pad to 1 places no sign
+- componentInteger = calendar->yearInEra( fromDateTime.date() );
+- minWidth = 1;
+- } else if ( modifierChar != QLatin1Char(':') ) { //Short year numeric, default 0 pad to 2 places with sign
+- componentInteger = qAbs( year ) % 100;
+- minWidth = 2;
+- if ( year < 0 ) {
+- signChar = QLatin1Char('-');
+- }
++ }
++ break;
++ case 'C':
++ if (modifierChar == QLatin1Char('E')) { //Era name, default no pad to 0 places no sign
++ if (!escapePad) {
++ padChar = QLatin1Char(' ');
+ }
+- break;
+- case 'm': // Month numeric
++ componentString = calendar->eraName(fromDateTime.date());
++ } else if (modifierChar != QLatin1Char(':')) { //Century numeric, default 0 pad to 2 places with sign
++ componentInteger = qAbs(year) / 100 ;
++ minWidth = 2;
++ if (year < 0) {
++ signChar = QLatin1Char('-');
++ }
++ }
++ break;
++ case 'y':
++ if (modifierChar == QLatin1Char('E')) { //Year in Era number, default 0 pad to 1 places no sign
++ componentInteger = calendar->yearInEra(fromDateTime.date());
++ minWidth = 1;
++ } else if (modifierChar != QLatin1Char(':')) { //Short year numeric, default 0 pad to 2 places with sign
++ componentInteger = qAbs(year) % 100;
++ minWidth = 2;
++ if (year < 0) {
++ signChar = QLatin1Char('-');
++ }
++ }
++ break;
++ case 'm': // Month numeric
++ componentInteger = month;
++ if (modifierChar == QLatin1Char(':')) { //Short month numeric, default no pad to 1 places no sign
++ minWidth = 1;
++ if (!escapePad) {
++ padChar = QChar();
++ }
++ invalidModifier = false;
++ } else { //Long month numeric, default 0 pad to 2 places no sign
+ componentInteger = month;
+- if ( modifierChar == QLatin1Char(':') ) { //Short month numeric, default no pad to 1 places no sign
++ minWidth = 2;
++ }
++ break;
++ case 'n':
++ //PosixFormat %n is newline
++ //KdeFormat %n is short month numeric
++ if (modifierChar != QLatin1Char(':')) {
++ if (formatStandard == KLocale::KdeFormat) {
++ //Copy what %e does, no padding by default
++ //Short month numeric, default no pad to 1 places no sign
++ componentInteger = month;
+ minWidth = 1;
+- if ( !escapePad ) {
++ if (!escapePad) {
+ padChar = QChar();
+ }
+- invalidModifier = false;
+- } else { //Long month numeric, default 0 pad to 2 places no sign
+- componentInteger = month;
+- minWidth = 2;
++ } else { // formatStandard == KLocale::PosixFormat
++ componentString = QLatin1Char('\n');
+ }
+- break;
+- case 'n':
+- //PosixFormat %n is newline
+- //KdeFormat %n is short month numeric
+- if ( modifierChar != QLatin1Char(':') ) {
+- if ( formatStandard == KLocale::KdeFormat ) {
+- //Copy what %e does, no padding by default
+- //Short month numeric, default no pad to 1 places no sign
+- componentInteger = month;
+- minWidth = 1;
+- if ( !escapePad ) {
+- padChar = QChar();
+- }
+- } else { // formatStandard == KLocale::PosixFormat
+- componentString = QLatin1Char('\n');
++ }
++ break;
++ case 'd': //Long day numeric, default 0 pad to 2 places no sign
++ if (modifierChar != QLatin1Char(':')) {
++ componentInteger = day;
++ minWidth = 2;
++ }
++ break;
++ case 'e': //Short day numeric, default no sign
++ //PosixFormat %e is space pad to 2 places
++ //KdeFormat %e is no pad to 1 place
++ if (modifierChar != QLatin1Char(':')) {
++ componentInteger = day;
++ if (formatStandard == KLocale::KdeFormat) {
++ minWidth = 1;
++ if (!escapePad) {
++ padChar = QChar();
+ }
+- }
+- break;
+- case 'd': //Long day numeric, default 0 pad to 2 places no sign
+- if ( modifierChar != QLatin1Char(':') ) {
+- componentInteger = day;
++ } else { // formatStandard == KLocale::PosixFormat
+ minWidth = 2;
+- }
+- break;
+- case 'e': //Short day numeric, default no sign
+- //PosixFormat %e is space pad to 2 places
+- //KdeFormat %e is no pad to 1 place
+- if ( modifierChar != QLatin1Char(':') ) {
+- componentInteger = day;
+- if ( formatStandard == KLocale::KdeFormat ) {
+- minWidth = 1;
+- if ( !escapePad ) {
+- padChar = QChar();
+- }
+- } else { // formatStandard == KLocale::PosixFormat
+- minWidth = 2;
+- if ( !escapePad ) {
+- padChar = QLatin1Char(' ');
+- }
++ if (!escapePad) {
++ padChar = QLatin1Char(' ');
+ }
+ }
+- break;
+- case 'B': //Long month name, default space pad to 0 places no sign
+- if ( locale->dateMonthNamePossessive() ) {
+- if ( modifierChar == QLatin1Char(':') ) {
+- invalidModifier = false;
+- initEnglish( calendar, locale );
+- componentString = m_englishCalendar->monthName( month, year, KCalendarSystem::LongNamePossessive );
+- } else {
+- componentString = calendar->monthName( month, year, KCalendarSystem::LongNamePossessive );
+- }
++ }
++ break;
++ case 'B': //Long month name, default space pad to 0 places no sign
++ if (locale->dateMonthNamePossessive()) {
++ if (modifierChar == QLatin1Char(':')) {
++ invalidModifier = false;
++ initEnglish(calendar, locale);
++ componentString = m_englishCalendar->monthName(month, year, KCalendarSystem::LongNamePossessive);
+ } else {
+- if ( modifierChar == QLatin1Char(':') ) {
+- invalidModifier = false;
+- initEnglish( calendar, locale );
+- componentString = m_englishCalendar->monthName( month, year, KCalendarSystem::LongName );
+- } else {
+- componentString = calendar->monthName( month, year, KCalendarSystem::LongName );
+- }
+- }
+- if ( !escapePad ) {
+- padChar = QLatin1Char(' ');
++ componentString = calendar->monthName(month, year, KCalendarSystem::LongNamePossessive);
+ }
+- break;
+- case 'h': //Short month name, default space pad to 0 places no sign
+- case 'b': //Short month name, default space pad to 0 places no sign
+- if ( locale->dateMonthNamePossessive() ) {
+- if ( modifierChar == QLatin1Char(':') ) {
+- invalidModifier = false;
+- initEnglish( calendar, locale );
+- componentString = m_englishCalendar->monthName( month, year, KCalendarSystem::ShortNamePossessive );
+- } else {
+- componentString = calendar->monthName( month, year, KCalendarSystem::ShortNamePossessive );
+- }
++ } else {
++ if (modifierChar == QLatin1Char(':')) {
++ invalidModifier = false;
++ initEnglish(calendar, locale);
++ componentString = m_englishCalendar->monthName(month, year, KCalendarSystem::LongName);
+ } else {
+- if ( modifierChar == QLatin1Char(':') ) {
+- invalidModifier = false;
+- initEnglish( calendar, locale );
+- componentString = m_englishCalendar->monthName( month, year, KCalendarSystem::ShortName );
+- } else {
+- componentString = calendar->monthName( month, year, KCalendarSystem::ShortName );
+- }
++ componentString = calendar->monthName(month, year, KCalendarSystem::LongName);
+ }
+- if ( !escapePad ) {
+- padChar = QLatin1Char(' ');
+- }
+- break;
+- case 'A': //Long weekday name, default space pad to 0 places no sign
+- if ( modifierChar == QLatin1Char(':') ) {
++ }
++ if (!escapePad) {
++ padChar = QLatin1Char(' ');
++ }
++ break;
++ case 'h': //Short month name, default space pad to 0 places no sign
++ case 'b': //Short month name, default space pad to 0 places no sign
++ if (locale->dateMonthNamePossessive()) {
++ if (modifierChar == QLatin1Char(':')) {
+ invalidModifier = false;
+- initEnglish( calendar, locale );
+- componentString = m_englishCalendar->weekDayName( fromDateTime.date(), KCalendarSystem::LongDayName );
++ initEnglish(calendar, locale);
++ componentString = m_englishCalendar->monthName(month, year, KCalendarSystem::ShortNamePossessive);
+ } else {
+- componentString = calendar->weekDayName( fromDateTime.date(), KCalendarSystem::LongDayName );
++ componentString = calendar->monthName(month, year, KCalendarSystem::ShortNamePossessive);
+ }
+- if ( !escapePad ) {
+- padChar = QLatin1Char(' ');
+- }
+- break;
+- case 'a': //Short weekday name, default space pad to 0 places no sign
+- if ( modifierChar == QLatin1Char(':') ) {
++ } else {
++ if (modifierChar == QLatin1Char(':')) {
+ invalidModifier = false;
+- initEnglish( calendar, locale );
+- componentString = m_englishCalendar->weekDayName( fromDateTime.date(), KCalendarSystem::ShortDayName );
++ initEnglish(calendar, locale);
++ componentString = m_englishCalendar->monthName(month, year, KCalendarSystem::ShortName);
+ } else {
+- componentString = calendar->weekDayName( fromDateTime.date(), KCalendarSystem::ShortDayName );
+- }
+- if ( !escapePad ) {
+- padChar = QLatin1Char(' ');
++ componentString = calendar->monthName(month, year, KCalendarSystem::ShortName);
+ }
+- break;
+- case 'j': //Long day of year numeric, default 0 pad to 3 places no sign
+- if ( modifierChar != QLatin1Char(':') ) {
+- componentInteger = calendar->dayOfYear( fromDateTime.date() );
+- minWidth = 3;
++ }
++ if (!escapePad) {
++ padChar = QLatin1Char(' ');
++ }
++ break;
++ case 'A': //Long weekday name, default space pad to 0 places no sign
++ if (modifierChar == QLatin1Char(':')) {
++ invalidModifier = false;
++ initEnglish(calendar, locale);
++ componentString = m_englishCalendar->weekDayName(fromDateTime.date(), KCalendarSystem::LongDayName);
++ } else {
++ componentString = calendar->weekDayName(fromDateTime.date(), KCalendarSystem::LongDayName);
++ }
++ if (!escapePad) {
++ padChar = QLatin1Char(' ');
++ }
++ break;
++ case 'a': //Short weekday name, default space pad to 0 places no sign
++ if (modifierChar == QLatin1Char(':')) {
++ invalidModifier = false;
++ initEnglish(calendar, locale);
++ componentString = m_englishCalendar->weekDayName(fromDateTime.date(), KCalendarSystem::ShortDayName);
++ } else {
++ componentString = calendar->weekDayName(fromDateTime.date(), KCalendarSystem::ShortDayName);
++ }
++ if (!escapePad) {
++ padChar = QLatin1Char(' ');
++ }
++ break;
++ case 'j': //Long day of year numeric, default 0 pad to 3 places no sign
++ if (modifierChar != QLatin1Char(':')) {
++ componentInteger = calendar->dayOfYear(fromDateTime.date());
++ minWidth = 3;
++ }
++ break;
++ case 'V': //Long ISO week of year numeric, default 0 pad to 2 places no sign
++ if (modifierChar != QLatin1Char(':')) {
++ componentInteger = calendar->week(fromDateTime.date(), KLocale::IsoWeekNumber);
++ minWidth = 2;
++ }
++ break;
++ case 'G': //Long year of ISO week of year numeric, default 0 pad to 4 places with sign
++ if (modifierChar != QLatin1Char(':')) {
++ calendar->week(fromDateTime.date(), KLocale::IsoWeekNumber, &isoWeekYear);
++ calendar->setDate(yearDate, isoWeekYear, 1, 1);
++ componentInteger = qAbs(isoWeekYear);
++ minWidth = 4;
++ if (isoWeekYear < 0) {
++ signChar = QLatin1Char('-');
+ }
+- break;
+- case 'V': //Long ISO week of year numeric, default 0 pad to 2 places no sign
+- if ( modifierChar != QLatin1Char(':') ) {
+- componentInteger = calendar->weekNumber( fromDateTime.date() );
+- minWidth = 2;
++ }
++ break;
++ case 'g': //Short year of ISO week of year numeric, default 0 pad to 2 places with sign
++ if (modifierChar != QLatin1Char(':')) {
++ calendar->week(fromDateTime.date(), KLocale::IsoWeekNumber, &isoWeekYear);
++ calendar->setDate(yearDate, isoWeekYear, 1, 1);
++ componentInteger = qAbs(isoWeekYear) % 100;
++ minWidth = 2;
++ if (isoWeekYear < 0) {
++ signChar = QLatin1Char('-');
+ }
+- break;
+- case 'G': //Long year of ISO week of year numeric, default 0 pad to 4 places with sign
+- if ( modifierChar != QLatin1Char(':') ) {
+- calendar->weekNumber( fromDateTime.date(), &isoWeekYear );
+- calendar->setDate( yearDate, isoWeekYear, 1, 1 );
+- componentInteger = qAbs( isoWeekYear );
+- minWidth = 4;
+- if ( isoWeekYear < 0 ) {
++ }
++ break;
++ case 'u':
++ if (modifierChar == QLatin1Char(':')) { // TZ UTC offset hours
++ invalidModifier = false;
++ KDateTime::SpecType timeSpecType = fromDateTime.timeType();
++ if (timeSpecType == KDateTime::UTC || timeSpecType == KDateTime::TimeZone ||
++ timeSpecType == KDateTime::OffsetFromUTC) {
++ componentInteger = fromDateTime.utcOffset() / 3600;
++ if (componentInteger >= 0) {
++ signChar = QLatin1Char('+');
++ } else {
++ componentInteger = -componentInteger;
+ signChar = QLatin1Char('-');
+ }
+- }
+- break;
+- case 'g': //Short year of ISO week of year numeric, default 0 pad to 2 places with sign
+- if ( modifierChar != QLatin1Char(':') ) {
+- calendar->weekNumber( fromDateTime.date(), &isoWeekYear );
+- calendar->setDate( yearDate, isoWeekYear, 1, 1 );
+- componentInteger = qAbs( isoWeekYear ) % 100;
+ minWidth = 2;
+- if ( isoWeekYear < 0 ) {
+- signChar = QLatin1Char('-');
+- }
+ }
+- break;
+- case 'u':
+- if ( modifierChar == QLatin1Char(':') ) { // TZ UTC offset hours
+- invalidModifier = false;
+- KDateTime::SpecType timeSpecType = fromDateTime.timeType();
+- if ( timeSpecType == KDateTime::UTC || timeSpecType == KDateTime::TimeZone ||
+- timeSpecType == KDateTime::OffsetFromUTC ) {
+- componentInteger = fromDateTime.utcOffset() / 3600;
+- if ( componentInteger >= 0 ) {
+- signChar = QLatin1Char('+');
+- } else {
+- componentInteger = -componentInteger;
+- signChar = QLatin1Char('-');
+- }
+- minWidth = 2;
+- }
+- } else { // Short day of week numeric
+- componentInteger = calendar->dayOfWeek( fromDateTime.date() );
+- minWidth = 1;
+- }
+- break;
+- case 'D': // US short date format, ignore any overrides
+- if ( modifierChar != QLatin1Char(':') ) {
+- componentString = formatDateTimePosix( fromDateTime, QString::fromLatin1("%m/%d/%y"), timeOptions, calendar, locale, digitSet, formatStandard );
+- padWidth = 0;
+- padChar = QChar();
+- caseChar = QChar();
+- }
+- break;
+- case 'F': // Full or ISO short date format, ignore any overrides
+- if ( modifierChar != QLatin1Char(':') ) {
+- componentString = formatDateTimePosix( fromDateTime, QString::fromLatin1("%Y-%m-%d"), timeOptions, calendar, locale, digitSet, formatStandard );
+- padWidth = 0;
+- padChar = QChar();
+- caseChar = QChar();
+- }
+- break;
+- case 'x': // Locale short date format, ignore any overrides
+- if ( modifierChar != QLatin1Char(':') ) {
+- componentString = formatDateTimePosix( fromDateTime, locale->dateFormatShort(), timeOptions, calendar, locale, digitSet, formatStandard );
+- padWidth = 0;
++ } else { // Short day of week numeric
++ componentInteger = calendar->dayOfWeek(fromDateTime.date());
++ minWidth = 1;
++ }
++ break;
++ case 'D': // US short date format, ignore any overrides
++ if (modifierChar != QLatin1Char(':')) {
++ componentString = formatDateTimePosix(fromDateTime, QString::fromLatin1("%m/%d/%y"), timeOptions, calendar, locale, digitSet, formatStandard);
++ padWidth = 0;
++ padChar = QChar();
++ caseChar = QChar();
++ }
++ break;
++ case 'F': // Full or ISO short date format, ignore any overrides
++ if (modifierChar != QLatin1Char(':')) {
++ componentString = formatDateTimePosix(fromDateTime, QString::fromLatin1("%Y-%m-%d"), timeOptions, calendar, locale, digitSet, formatStandard);
++ padWidth = 0;
++ padChar = QChar();
++ caseChar = QChar();
++ }
++ break;
++ case 'x': // Locale short date format, ignore any overrides
++ if (modifierChar != QLatin1Char(':')) {
++ componentString = formatDateTimePosix(fromDateTime, locale->dateFormatShort(), timeOptions, calendar, locale, digitSet, formatStandard);
++ padWidth = 0;
++ padChar = QChar();
++ caseChar = QChar();
++ }
++ break;
++ case 'H': // Long 24 hour
++ case 'k': // Short 24 hour
++ if (modifierChar != QLatin1Char(':')) {
++ componentInteger = fromDateTime.time().hour();
++ minWidth = 1;
++ if (!escapePad) {
+ padChar = QChar();
+- caseChar = QChar();
+ }
+- break;
+- case 'H': // Long 24 hour
+- case 'k': // Short 24 hour
+- if ( modifierChar != QLatin1Char(':') ) {
++ }
++ break;
++ case 'I': // Long 12 hour
++ case 'l': // Short 12 hour
++ if (modifierChar != QLatin1Char(':')) {
++ if ((timeOptions & KLocale::TimeDuration) == KLocale::TimeDuration) {
+ componentInteger = fromDateTime.time().hour();
++ } else {
++ componentInteger = locale->d->dayPeriodForTime(fromDateTime.time()).hourInPeriod(fromDateTime.time());
++ }
++ if (thisChar == QLatin1Char('I')) {
++ minWidth = 2;
++ } else {
+ minWidth = 1;
+- if ( !escapePad ) {
++ if (!escapePad) {
+ padChar = QChar();
+ }
+ }
+- break;
+- case 'I': // Long 12 hour
+- case 'l': // Short 12 hour
+- if ( modifierChar != QLatin1Char(':') ) {
+- if ( (timeOptions & KLocale::TimeDuration) == KLocale::TimeDuration ) {
+- componentInteger = fromDateTime.time().hour();
+- } else {
+- componentInteger = locale->d->dayPeriodForTime( fromDateTime.time() ).hourInPeriod( fromDateTime.time() );
+- }
+- if ( thisChar == QLatin1Char('I') ) {
++ }
++ break;
++ case 'M': // Long minutes
++ if (modifierChar != QLatin1Char(':')) {
++ componentInteger = fromDateTime.time().minute();
++ minWidth = 2;
++ }
++ break;
++ case 'S': // Long seconds
++ invalidModifier = false;
++ if ((timeOptions & KLocale::TimeWithoutSeconds) == KLocale::TimeWithoutSeconds) {
++ //TODO strip the preceding/following punctuation
++ } else {
++ componentInteger = fromDateTime.time().second();
++ if (modifierChar == QLatin1Char(':')) { // Only if not 00 seconds
++ if (componentInteger > 0 || fromDateTime.time().msec() > 0) {
++ result.append(QLatin1Char(':'));
+ minWidth = 2;
+- } else {
+- minWidth = 1;
+- if ( !escapePad ) {
+- padChar = QChar();
+- }
+ }
+- }
+- break;
+- case 'M': // Long minutes
+- if ( modifierChar != QLatin1Char(':') ) {
+- componentInteger = fromDateTime.time().minute();
++ } else {
+ minWidth = 2;
+ }
+- break;
+- case 'S': // Long seconds
++ }
++ break;
++ case 's':
++ if (modifierChar == QLatin1Char(':')) { // Milliseconds
+ invalidModifier = false;
+- if ( (timeOptions & KLocale::TimeWithoutSeconds) == KLocale::TimeWithoutSeconds ) {
+- //TODO strip the preceeding/following punctuation
++ componentInteger = fromDateTime.time().msec();
++ minWidth = 3;
++ } else { // Whole seconds since Unix Epoch
++ KDateTime unixEpoch;
++ unixEpoch.setTime_t(0);
++ componentInteger = unixEpoch.secsTo(fromDateTime);
++ }
++ break;
++ case 'p': // AM/PM symbol
++ case 'P': // AM/PM symbol in lowercase
++ if ((timeOptions & KLocale::TimeWithoutAmPm) == KLocale::TimeWithoutAmPm) {
++ //TODO strip the preceding/following punctuation
++ } else {
++ if (modifierChar == QLatin1Char(':')) {
++ invalidModifier = false;
++ initEnglish(calendar, locale);
++ componentString = m_englishLocale->d->dayPeriodForTime(fromDateTime.time()).periodName(KLocale::ShortName);
+ } else {
+- componentInteger = fromDateTime.time().second();
+- if ( modifierChar == QLatin1Char(':') ) { // Only if not 00 seconds
+- if ( componentInteger > 0 || fromDateTime.time().msec() > 0 ) {
+- result.append( QLatin1Char(':') );
+- minWidth = 2;
+- }
+- } else {
+- minWidth = 2;
+- }
++ componentString = locale->d->dayPeriodForTime(fromDateTime.time()).periodName(KLocale::ShortName);
+ }
+- break;
+- case 's':
+- if ( modifierChar == QLatin1Char(':') ) { // Milliseconds
+- invalidModifier = false;
+- componentInteger = fromDateTime.time().msec();
+- minWidth = 3;
+- } else { // Whole seconds since Unix Epoch
+- KDateTime unixEpoch;
+- unixEpoch.setTime_t( 0 );
+- componentInteger = unixEpoch.secsTo( fromDateTime );
++ if (thisChar == QLatin1Char('P')) {
++ componentString = componentString.toLower();
+ }
+- break;
+- case 'p': // AM/PM symbol
+- case 'P': // AM/PM symbol in lowercase
+- if ( (timeOptions & KLocale::TimeWithoutAmPm) == KLocale::TimeWithoutAmPm ) {
+- //TODO strip the preceeding/following punctuation
+- } else {
+- if ( modifierChar == QLatin1Char(':') ) {
+- invalidModifier = false;
+- initEnglish( calendar, locale );
+- componentString = m_englishLocale->d->dayPeriodForTime( fromDateTime.time() ).periodName( KLocale::ShortName );
++ }
++ break;
++ case 'z': // TZ UTC Offset
++ invalidModifier = false;
++ timeSpecType = fromDateTime.timeType();
++ if (timeSpecType == KDateTime::UTC || timeSpecType == KDateTime::TimeZone ||
++ timeSpecType == KDateTime::OffsetFromUTC) {
++ if (modifierChar == QLatin1Char(':')) { // TZ UTC offset hours & minutes with colon
++ int offsetInSeconds = fromDateTime.utcOffset();
++ if (offsetInSeconds >= 0) {
++ signChar = QLatin1Char('+');
+ } else {
+- componentString = locale->d->dayPeriodForTime( fromDateTime.time() ).periodName( KLocale::ShortName );
+- }
+- if ( thisChar == QLatin1Char('P') ) {
+- componentString = componentString.toLower();
++ offsetInSeconds = -offsetInSeconds;
++ signChar = QLatin1Char('-');
+ }
+- }
+- break;
+- case 'z': // TZ UTC Offset
+- invalidModifier = false;
+- timeSpecType = fromDateTime.timeType();
+- if ( timeSpecType == KDateTime::UTC || timeSpecType == KDateTime::TimeZone ||
+- timeSpecType == KDateTime::OffsetFromUTC ) {
+- if ( modifierChar == QLatin1Char(':') ) { // TZ UTC offset hours & minutes with colon
+- int offsetInSeconds = fromDateTime.utcOffset();
+- if ( offsetInSeconds >= 0 ) {
+- signChar = QLatin1Char('+');
+- } else {
+- offsetInSeconds = -offsetInSeconds;
+- signChar = QLatin1Char('-');
+- }
+- int offsetHours = offsetInSeconds / 3600;
+- int offsetMinutes = ( offsetInSeconds / 60 ) % 60;
+- //int offsetSeconds = offsetInSeconds % 60;
+- QString hourComponent = stringFromInteger( offsetHours, 2, QLatin1Char('0'), signChar, digitSet, locale );
+- QString minuteComponent = stringFromInteger( offsetMinutes, 2, QLatin1Char('0'), QChar(), digitSet, locale );
+- componentString = hourComponent + QLatin1Char(':') + minuteComponent;
+- minWidth = 0;
+- padChar = QChar();
+- padWidth = 0;
+- } else { // TZ UTC offset hours & minutes
+- componentInteger = fromDateTime.utcOffset() / 60;
+- if ( componentInteger >= 0 ) {
+- signChar = QLatin1Char('+');
+- } else {
+- componentInteger = -componentInteger;
+- signChar = QLatin1Char('-');
+- }
+- minWidth = 4;
++ int offsetHours = offsetInSeconds / 3600;
++ int offsetMinutes = (offsetInSeconds / 60) % 60;
++ //int offsetSeconds = offsetInSeconds % 60;
++ QString hourComponent = stringFromInteger(offsetHours, 2, QLatin1Char('0'), signChar, digitSet, locale);
++ QString minuteComponent = stringFromInteger(offsetMinutes, 2, QLatin1Char('0'), QChar(), digitSet, locale);
++ componentString = hourComponent + QLatin1Char(':') + minuteComponent;
++ minWidth = 0;
++ padChar = QChar();
++ padWidth = 0;
++ } else { // TZ UTC offset hours & minutes
++ componentInteger = fromDateTime.utcOffset() / 60;
++ if (componentInteger >= 0) {
++ signChar = QLatin1Char('+');
++ } else {
++ componentInteger = -componentInteger;
++ signChar = QLatin1Char('-');
+ }
++ minWidth = 4;
+ }
+- break;
+- case 'Z': // TZ Name
+- invalidModifier = false;
+- timeSpecType = fromDateTime.timeType();
+- if ( timeSpecType == KDateTime::UTC || timeSpecType == KDateTime::TimeZone ) {
+- KTimeZone tz = fromDateTime.timeZone();
+- if ( tz.isValid() ) {
+- if ( modifierChar == QLatin1Char(':') ) { // TZ full name
+- componentString = QString::fromLatin1(tz.abbreviation(fromDateTime.toUtc().dateTime()));
+- } else { // TZ abbreviated name
+- componentString = tz.name();
+- }
++ }
++ break;
++ case 'Z': // TZ Name
++ invalidModifier = false;
++ timeSpecType = fromDateTime.timeType();
++ if (timeSpecType == KDateTime::UTC || timeSpecType == KDateTime::TimeZone) {
++ KTimeZone tz = fromDateTime.timeZone();
++ if (tz.isValid()) {
++ if (modifierChar == QLatin1Char(':')) { // TZ full name
++ componentString = QString::fromLatin1(tz.abbreviation(fromDateTime.toUtc().dateTime()));
++ } else { // TZ abbreviated name
++ componentString = tz.name();
+ }
+ }
+- break;
+- default: //No valid format code, treat as literal
+- invalidComponent = true;
+- break;
++ }
++ break;
++ default: //No valid format code, treat as literal
++ invalidComponent = true;
++ break;
+ }
+
+- if ( invalidComponent || invalidModifier ) { // If escape sequence invalid treat as literal
+- componentString = toFormat.mid( escapeIndex, formatIndex );
+- } else if ( componentString.isEmpty() ) { //i.e. is a number component
+- padWidth = qMax( minWidth, padWidth );
+- componentString = stringFromInteger( componentInteger, padWidth, padChar, signChar, digitSet, locale );
++ if (invalidComponent || invalidModifier) { // If escape sequence invalid treat as literal
++ componentString = toFormat.mid(escapeIndex, formatIndex);
++ } else if (componentString.isEmpty()) { //i.e. is a number component
++ padWidth = qMax(minWidth, padWidth);
++ componentString = stringFromInteger(componentInteger, padWidth, padChar, signChar, digitSet, locale);
+ } else { //i.e. is a string component
+- if ( padChar != QChar() && padWidth != 0 ) {
+- componentString = componentString.rightJustified( padWidth, padChar );
++ if (padChar != QChar() && padWidth != 0) {
++ componentString = componentString.rightJustified(padWidth, padChar);
+ }
+
+- if ( caseChar == QLatin1Char('^') ) {
++ if (caseChar == QLatin1Char('^')) {
+ componentString = componentString.toUpper();
+- } else if ( caseChar == QLatin1Char('#') ) {
++ } else if (caseChar == QLatin1Char('#')) {
+ componentString = componentString.toUpper(); // JPL ???
+ }
+ }
+
+- result.append( componentString );
++ result.append(componentString);
+
+ escape = false;
+ escapePad = false;
+@@ -623,16 +623,16 @@ QString KDateTimeFormatter::formatDateTimePosix( const KDateTime &fromDateTime,
+ return result;
+ }
+
+-void KDateTimeFormatter::initEnglish( const KCalendarSystem *calendar, const KLocale *locale ) const
++void KDateTimeFormatter::initEnglish(const KCalendarSystem *calendar, const KLocale *locale) const
+ {
+- if ( !m_englishCalendar || m_englishCalendar->calendarType() != calendar->calendarType() ) {
+- // Set up an English locale and calendar for use with ':' modifier which forces English names
+- if ( !m_englishLocale ) {
+- m_englishLocale = new KLocale( *locale );
+- m_englishLocale->setLanguage( QStringList() << QString::fromLatin1("en_US") );
+- }
+- delete m_englishCalendar;
+- m_englishCalendar = KCalendarSystem::create( calendar->calendarType(), m_englishLocale );
++ if (!m_englishCalendar || m_englishCalendar->calendarSystem() != calendar->calendarSystem()) {
++ // Set up an English locale and calendar for use with ':' modifier which forces English names
++ if (!m_englishLocale) {
++ m_englishLocale = new KLocale(*locale);
++ m_englishLocale->setLanguage(QStringList() << QString::fromLatin1("en_US"));
++ }
++ delete m_englishCalendar;
++ m_englishCalendar = KCalendarSystem::create(calendar->calendarSystem(), m_englishLocale);
+ }
+ }
+
+@@ -640,12 +640,12 @@ void KDateTimeFormatter::initEnglish( const KCalendarSystem *calendar, const KLo
+ // Format an input date to match a UNICODE date format string
+ // Original QDate::fmtDateTime() code taken from Qt 4.7 under LGPL, now heavily modifed
+ // Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+-QString KDateTimeFormatter::formatDateTimeUnicode( const KDateTime &fromDateTime,
+- const QString &toFormat,
+- KLocale::TimeFormatOptions timeOptions,
+- const KCalendarSystem *calendar,
+- const KLocale *locale,
+- KLocale::DigitSet digitSet ) const
++QString KDateTimeFormatter::formatDateTimeUnicode(const KDateTime &fromDateTime,
++ const QString &toFormat,
++ KLocale::TimeFormatOptions timeOptions,
++ const KCalendarSystem *calendar,
++ const KLocale *locale,
++ KLocale::DigitSet digitSet) const
+ {
+ const QLatin1Char quote('\'');
+
+@@ -661,7 +661,7 @@ QString KDateTimeFormatter::formatDateTimeUnicode( const KDateTime &fromDateTime
+ status = QLatin1Char('0');
+ } else {
+ if (!format.isEmpty()) {
+- result += getUnicodeString( fromDateTime, format, timeOptions, calendar, locale, digitSet );
++ result += getUnicodeString(fromDateTime, format, timeOptions, calendar, locale, digitSet);
+ format.clear();
+ }
+ status = quote;
+@@ -669,27 +669,27 @@ QString KDateTimeFormatter::formatDateTimeUnicode( const KDateTime &fromDateTime
+ } else if (status == quote) {
+ result += toFormat.at(i);
+ } else if (toFormat.at(i) == status) {
+- if ( toFormat.at(i) == QLatin1Char('P') ||
+- toFormat.at(i) == QLatin1Char('p') ) {
++ if (toFormat.at(i) == QLatin1Char('P') ||
++ toFormat.at(i) == QLatin1Char('p')) {
+ status = QLatin1Char('0');
+ }
+- format += toFormat.at( i );
++ format += toFormat.at(i);
+ } else {
+- result += getUnicodeString( fromDateTime, format, timeOptions, calendar, locale, digitSet );
++ result += getUnicodeString(fromDateTime, format, timeOptions, calendar, locale, digitSet);
+ format.clear();
+- if ( ( toFormat.at(i) == QLatin1Char('d') ) ||
+- ( toFormat.at(i) == QLatin1Char('M') ) ||
+- ( toFormat.at(i) == QLatin1Char('y') ) ) {
+- status = toFormat.at( i );
+- format += toFormat.at( i );
++ if ((toFormat.at(i) == QLatin1Char('d')) ||
++ (toFormat.at(i) == QLatin1Char('M')) ||
++ (toFormat.at(i) == QLatin1Char('y'))) {
++ status = toFormat.at(i);
++ format += toFormat.at(i);
+ } else {
+- result += toFormat.at( i );
++ result += toFormat.at(i);
+ status = QLatin1Char('0');
+ }
+ }
+ }
+
+- result += getUnicodeString( fromDateTime, format, timeOptions, calendar, locale, digitSet );
++ result += getUnicodeString(fromDateTime, format, timeOptions, calendar, locale, digitSet);
+
+ return result;
+ }
+@@ -697,99 +697,98 @@ QString KDateTimeFormatter::formatDateTimeUnicode( const KDateTime &fromDateTime
+ // Original QDate::getFmtString() code taken from Qt 4.7 under LGPL, now heavily modifed
+ // Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+ // Replaces tokens by their value. See QDateTime::toString() for a list of valid tokens
+-QString KDateTimeFormatter::getUnicodeString( const KDateTime &fromDateTime,
+- const QString &toFormat,
+- KLocale::TimeFormatOptions timeOptions,
+- const KCalendarSystem *calendar,
+- const KLocale *locale,
+- KLocale::DigitSet digitSet ) const
++QString KDateTimeFormatter::getUnicodeString(const KDateTime &fromDateTime,
++ const QString &toFormat,
++ KLocale::TimeFormatOptions timeOptions,
++ const KCalendarSystem *calendar,
++ const KLocale *locale,
++ KLocale::DigitSet digitSet) const
+ {
+- if ( toFormat.isEmpty() ) {
++ if (toFormat.isEmpty()) {
+ return QString();
+ }
+
+ QString result = toFormat;
+ int removed = 0;
+
+- if ( toFormat.startsWith( QLatin1String( "dddd" ) ) ) {
+- result = calendar->weekDayName( fromDateTime.date(), KCalendarSystem::LongDayName );
++ if (toFormat.startsWith(QLatin1String("dddd"))) {
++ result = calendar->weekDayName(fromDateTime.date(), KCalendarSystem::LongDayName);
+ removed = 4;
+- } else if ( toFormat.startsWith(QLatin1String( "ddd" ) ) ) {
+- result = calendar->weekDayName( fromDateTime.date(), KCalendarSystem::ShortDayName );
++ } else if (toFormat.startsWith(QLatin1String("ddd"))) {
++ result = calendar->weekDayName(fromDateTime.date(), KCalendarSystem::ShortDayName);
+ removed = 3;
+- } else if ( toFormat.startsWith( QLatin1String( "dd" ) ) ) {
+- result = QString::number( calendar->day( fromDateTime.date() ) ).rightJustified( 2, QLatin1Char('0'), true );
++ } else if (toFormat.startsWith(QLatin1String("dd"))) {
++ result = QString::number(calendar->day(fromDateTime.date())).rightJustified(2, QLatin1Char('0'), true);
+ removed = 2;
+- } else if ( toFormat.at(0) == QLatin1Char('d') ) {
+- result = QString::number( calendar->day( fromDateTime.date() ) );
++ } else if (toFormat.at(0) == QLatin1Char('d')) {
++ result = QString::number(calendar->day(fromDateTime.date()));
+ removed = 1;
+ } else if (toFormat.startsWith(QLatin1String("MMMM"))) {
+- result = calendar->monthName( calendar->month( fromDateTime.date() ), calendar->year( fromDateTime.date() ), KCalendarSystem::LongName );
++ result = calendar->monthName(calendar->month(fromDateTime.date()), calendar->year(fromDateTime.date()), KCalendarSystem::LongName);
+ removed = 4;
+ } else if (toFormat.startsWith(QLatin1String("MMM"))) {
+- result = calendar->monthName( calendar->month( fromDateTime.date() ), calendar->year( fromDateTime.date() ), KCalendarSystem::ShortName );
++ result = calendar->monthName(calendar->month(fromDateTime.date()), calendar->year(fromDateTime.date()), KCalendarSystem::ShortName);
+ removed = 3;
+ } else if (toFormat.startsWith(QLatin1String("MM"))) {
+- result = QString::number( calendar->month( fromDateTime.date() ) ).rightJustified( 2, QLatin1Char('0'), true );
++ result = QString::number(calendar->month(fromDateTime.date())).rightJustified(2, QLatin1Char('0'), true);
+ removed = 2;
+ } else if (toFormat.at(0) == QLatin1Char('M')) {
+- result = QString::number( calendar->month( fromDateTime.date() ) );
++ result = QString::number(calendar->month(fromDateTime.date()));
+ removed = 1;
+ } else if (toFormat.startsWith(QLatin1String("yyyy"))) {
+- const int year = calendar->year( fromDateTime.date() );
+- result = QString::number( qAbs( year ) ).rightJustified( 4, QLatin1Char('0') );
+- if( year > 0 )
++ const int year = calendar->year(fromDateTime.date());
++ result = QString::number(qAbs(year)).rightJustified(4, QLatin1Char('0'));
++ if (year > 0)
+ removed = 4;
+- else
+- {
+- result.prepend( QLatin1Char('-') );
++ else {
++ result.prepend(QLatin1Char('-'));
+ removed = 5;
+ }
+- } else if ( toFormat.startsWith( QLatin1String("yy") ) ) {
+- result = QString::number( calendar->year(fromDateTime.date()) ).right( 2 ).rightJustified( 2, QLatin1Char('0') );
++ } else if (toFormat.startsWith(QLatin1String("yy"))) {
++ result = QString::number(calendar->year(fromDateTime.date())).right(2).rightJustified(2, QLatin1Char('0'));
+ removed = 2;
+ }
+
+- if ( removed == 0 || removed >= toFormat.size() ) {
++ if (removed == 0 || removed >= toFormat.size()) {
+ return result;
+ }
+
+- return result + getUnicodeString( fromDateTime, toFormat.mid( removed ), timeOptions, calendar, locale, digitSet );
++ return result + getUnicodeString(fromDateTime, toFormat.mid(removed), timeOptions, calendar, locale, digitSet);
+ }
+
+ // Reimplement if special integer to string handling required, e.g. Hebrew.
+ // Utility to convert an integer into the correct display string form
+-QString KDateTimeFormatter::stringFromInteger( int number, int padWidth, QChar padChar, QChar signChar,
+- KLocale::DigitSet digitSet, const KLocale *locale ) const
++QString KDateTimeFormatter::stringFromInteger(int number, int padWidth, QChar padChar, QChar signChar,
++ KLocale::DigitSet digitSet, const KLocale *locale) const
+ {
+-if ( padChar == QChar() && signChar == QChar() ) {
++ if (padChar == QChar() && signChar == QChar()) {
+ //kDebug() << " stringFromInteger(" << number << padWidth << "null" << "null" << ")";
+-} else if ( padChar == QChar() ) {
++ } else if (padChar == QChar()) {
+ //kDebug() << " stringFromInteger(" << number << padWidth << "null" << signChar << ")";
+-} else if ( signChar == QChar() ) {
++ } else if (signChar == QChar()) {
+ //kDebug() << " stringFromInteger(" << number << padWidth << padChar << "null" << ")";
+-} else if ( signChar == QChar() ) {
++ } else if (signChar == QChar()) {
+ //kDebug() << " stringFromInteger(" << number << padWidth << padChar << signChar << ")";
+-}
++ }
+ QString result;
+- if ( padChar == QChar() || padWidth == 0 ) { // If null pad char or 0 width don't bother padding
++ if (padChar == QChar() || padWidth == 0) { // If null pad char or 0 width don't bother padding
+ //kDebug() << " no pad";
+- if ( signChar == QChar() ) {
+- result = locale->convertDigits( QString::number( number ), digitSet );
++ if (signChar == QChar()) {
++ result = locale->convertDigits(QString::number(number), digitSet);
+ } else {
+- result = locale->convertDigits( QString::number( number ).prepend( signChar ), digitSet );
++ result = locale->convertDigits(QString::number(number).prepend(signChar), digitSet);
+ }
+- } else if ( signChar != QChar() ) { // If sign required
+- if ( padChar == QLatin1Char('0') ) { // If zero-padded, zero considered part of the number, so pad the number then prepend the sign
++ } else if (signChar != QChar()) { // If sign required
++ if (padChar == QLatin1Char('0')) { // If zero-padded, zero considered part of the number, so pad the number then prepend the sign
+ //kDebug() << " zero pad with sign";
+- result = locale->convertDigits( QString::number( number ).rightJustified( padWidth, padChar ).prepend( signChar ), digitSet );
++ result = locale->convertDigits(QString::number(number).rightJustified(padWidth, padChar).prepend(signChar), digitSet);
+ } else { // If space-padded space not considered part of the number, so prepend the sign and then pad the number
+ //kDebug() << " space pad with sign";
+- result = locale->convertDigits( QString::number( number ).prepend( signChar ).rightJustified( padWidth, padChar ), digitSet );
++ result = locale->convertDigits(QString::number(number).prepend(signChar).rightJustified(padWidth, padChar), digitSet);
+ }
+ } else { // No sign required so just pad
+ //kDebug() << " pad no sign";
+- result = locale->convertDigits( QString::number( number ).rightJustified( padWidth, padChar ), digitSet );
++ result = locale->convertDigits(QString::number(number).rightJustified(padWidth, padChar), digitSet);
+ }
+ //kDebug() << " result = " << result;
+ return result;
+diff --git a/kdecore/date/kdatetimeformatter_p.h b/kdecore/date/kdatetimeformatter_p.h
+index 7f64e08..bfa04dc 100644
+--- a/kdecore/date/kdatetimeformatter_p.h
++++ b/kdecore/date/kdatetimeformatter_p.h
+@@ -38,56 +38,56 @@ public:
+
+ virtual ~KDateTimeFormatter();
+
+- virtual QString formatDate( const QDate &fromDate,
+- const QString &toFormat,
+- const KCalendarSystem *calendar = KGlobal::locale()->calendar(),
+- const KLocale *locale = KGlobal::locale(),
+- KLocale::DigitSet digitSet = KGlobal::locale()->dateTimeDigitSet(),
+- KLocale::DateTimeFormatStandard standard = KLocale::KdeFormat ) const;
+-
+- virtual QString formatTime( const QTime &fromTime,
+- const QString &toFormat,
+- KLocale::TimeFormatOptions timeOptions = 0,
+- const KCalendarSystem *calendar = KGlobal::locale()->calendar(),
+- const KLocale *locale = KGlobal::locale(),
+- KLocale::DigitSet digitSet = KGlobal::locale()->dateTimeDigitSet(),
+- KLocale::DateTimeFormatStandard standard = KLocale::KdeFormat ) const;
+-
+- virtual QString formatDateTime( const KDateTime &fromDateTime,
+- const QString &toFormat,
+- KLocale::TimeFormatOptions timeOptions = 0,
+- const KCalendarSystem *calendar = KGlobal::locale()->calendar(),
+- const KLocale *locale = KGlobal::locale(),
+- KLocale::DigitSet digitSet = KGlobal::locale()->dateTimeDigitSet(),
+- KLocale::DateTimeFormatStandard standard = KLocale::KdeFormat ) const;
++ virtual QString formatDate(const QDate &fromDate,
++ const QString &toFormat,
++ const KCalendarSystem *calendar = KGlobal::locale()->calendar(),
++ const KLocale *locale = KGlobal::locale(),
++ KLocale::DigitSet digitSet = KGlobal::locale()->dateTimeDigitSet(),
++ KLocale::DateTimeFormatStandard standard = KLocale::KdeFormat) const;
++
++ virtual QString formatTime(const QTime &fromTime,
++ const QString &toFormat,
++ KLocale::TimeFormatOptions timeOptions = 0,
++ const KCalendarSystem *calendar = KGlobal::locale()->calendar(),
++ const KLocale *locale = KGlobal::locale(),
++ KLocale::DigitSet digitSet = KGlobal::locale()->dateTimeDigitSet(),
++ KLocale::DateTimeFormatStandard standard = KLocale::KdeFormat) const;
++
++ virtual QString formatDateTime(const KDateTime &fromDateTime,
++ const QString &toFormat,
++ KLocale::TimeFormatOptions timeOptions = 0,
++ const KCalendarSystem *calendar = KGlobal::locale()->calendar(),
++ const KLocale *locale = KGlobal::locale(),
++ KLocale::DigitSet digitSet = KGlobal::locale()->dateTimeDigitSet(),
++ KLocale::DateTimeFormatStandard standard = KLocale::KdeFormat) const;
+
+ private:
+- virtual QString formatDateTimePosix( const KDateTime &fromDateTime,
+- const QString &toFormat,
+- KLocale::TimeFormatOptions timeOptions,
+- const KCalendarSystem *calendar,
+- const KLocale *locale,
+- KLocale::DigitSet digitSet,
+- KLocale::DateTimeFormatStandard standard ) const;
+-
+- virtual void initEnglish( const KCalendarSystem *calendar, const KLocale *locale ) const;
+-
+- virtual QString formatDateTimeUnicode( const KDateTime &fromDateTime,
+- const QString &toFormat,
+- KLocale::TimeFormatOptions timeOptions,
+- const KCalendarSystem *calendar,
+- const KLocale *locale,
+- KLocale::DigitSet digitSet ) const;
+-
+- virtual QString getUnicodeString( const KDateTime &fromDateTime,
+- const QString &toFormat,
+- KLocale::TimeFormatOptions timeOptions,
+- const KCalendarSystem *calendar,
+- const KLocale *locale,
+- KLocale::DigitSet digitSet ) const;
+-
+- virtual QString stringFromInteger( int number, int padWidth, QChar padChar, QChar signChar,
+- KLocale::DigitSet digitSet, const KLocale *locale ) const;
++ virtual QString formatDateTimePosix(const KDateTime &fromDateTime,
++ const QString &toFormat,
++ KLocale::TimeFormatOptions timeOptions,
++ const KCalendarSystem *calendar,
++ const KLocale *locale,
++ KLocale::DigitSet digitSet,
++ KLocale::DateTimeFormatStandard standard) const;
++
++ virtual void initEnglish(const KCalendarSystem *calendar, const KLocale *locale) const;
++
++ virtual QString formatDateTimeUnicode(const KDateTime &fromDateTime,
++ const QString &toFormat,
++ KLocale::TimeFormatOptions timeOptions,
++ const KCalendarSystem *calendar,
++ const KLocale *locale,
++ KLocale::DigitSet digitSet) const;
++
++ virtual QString getUnicodeString(const KDateTime &fromDateTime,
++ const QString &toFormat,
++ KLocale::TimeFormatOptions timeOptions,
++ const KCalendarSystem *calendar,
++ const KLocale *locale,
++ KLocale::DigitSet digitSet) const;
++
++ virtual QString stringFromInteger(int number, int padWidth, QChar padChar, QChar signChar,
++ KLocale::DigitSet digitSet, const KLocale *locale) const;
+
+ // Is private class, but if ever made public need to move these into a d->
+ // Some format modifiers force English names to be returned
+diff --git a/kdecore/date/kdatetimeparser.cpp b/kdecore/date/kdatetimeparser.cpp
+index ba50373..a416808 100644
+--- a/kdecore/date/kdatetimeparser.cpp
++++ b/kdecore/date/kdatetimeparser.cpp
+@@ -34,46 +34,46 @@ KDateTimeParser::~KDateTimeParser()
+ }
+
+ // Parse a DateTime input string and return just the Date component
+-QDate KDateTimeParser::parseDate( const QString &inputString,
+- const QString &formatString,
+- const KCalendarSystem *calendar,
+- const KLocale *locale,
+- KLocale::DigitSet digitSet,
+- KLocale::DateTimeFormatStandard formatStandard ) const
++QDate KDateTimeParser::parseDate(const QString &inputString,
++ const QString &formatString,
++ const KCalendarSystem *calendar,
++ const KLocale *locale,
++ KLocale::DigitSet digitSet,
++ KLocale::DateTimeFormatStandard formatStandard) const
+ {
+ DateTimeComponents result;
+- if ( formatStandard == KLocale::UnicodeFormat ) {
+- result = parseDateUnicode( inputString, formatString, calendar, locale, digitSet );
++ if (formatStandard == KLocale::UnicodeFormat) {
++ result = parseDateUnicode(inputString, formatString, calendar, locale, digitSet);
+ } else {
+- result = parseDatePosix( inputString, formatString, calendar, locale, digitSet, formatStandard );
++ result = parseDatePosix(inputString, formatString, calendar, locale, digitSet, formatStandard);
+ }
+
+ QDate resultDate;
+
+- if ( !result.error &&
+- formatString.simplified().length() <= result.formatPosition &&
+- inputString.simplified().length() <= result.inputPosition ) {
++ if (!result.error &&
++ formatString.simplified().length() <= result.formatPosition &&
++ inputString.simplified().length() <= result.inputPosition) {
+
+ // If there were no parsing errors, and we have reached the end of both the input and
+ // format strings, then see if we have a valid date based on the components parsed
+
+ // If we haven't parsed a year component, then assume this year
+- if ( !result.parsedYear ) {
+- result.year = calendar->year( QDate::currentDate() );
++ if (!result.parsedYear) {
++ result.year = calendar->year(QDate::currentDate());
+ }
+
+- if ( ( !result.eraName.isEmpty() || result.yearInEra > -1 ) && result.month > 0 && result.day > 0 ) {
++ if ((!result.eraName.isEmpty() || result.yearInEra > -1) && result.month > 0 && result.day > 0) {
+ // Have parsed Era components as well as month and day components
+- calendar->setDate( resultDate, result.eraName, result.yearInEra, result.month, result.day );
+- } else if ( result.month > 0 && result.day > 0 ) {
++ calendar->setDate(resultDate, result.eraName, result.yearInEra, result.month, result.day);
++ } else if (result.month > 0 && result.day > 0) {
+ // Have parsed month and day components
+- calendar->setDate( resultDate, result.year, result.month, result.day );
+- } else if ( result.dayInYear > 0 ) {
++ calendar->setDate(resultDate, result.year, result.month, result.day);
++ } else if (result.dayInYear > 0) {
+ // Have parsed Day In Year component
+- calendar->setDate( resultDate, result.year, result.dayInYear );
+- } else if ( result.isoWeekNumber > 0 && result.dayOfIsoWeek > 0 ) {
++ calendar->setDate(resultDate, result.year, result.dayInYear);
++ } else if (result.isoWeekNumber > 0 && result.dayOfIsoWeek > 0) {
+ // Have parsed ISO Week components
+- calendar->setDateIsoWeek( resultDate, result.year, result.isoWeekNumber, result.dayOfIsoWeek );
++ calendar->setDateIsoWeek(resultDate, result.year, result.isoWeekNumber, result.dayOfIsoWeek);
+ }
+
+ }
+@@ -81,12 +81,12 @@ QDate KDateTimeParser::parseDate( const QString &inputString,
+ return resultDate;
+ }
+
+-DateTimeComponents KDateTimeParser::parseDatePosix( const QString &inputString,
+- const QString &formatString,
+- const KCalendarSystem *calendar,
+- const KLocale *locale,
+- KLocale::DigitSet digitSet,
+- KLocale::DateTimeFormatStandard standard ) const
++DateTimeComponents KDateTimeParser::parseDatePosix(const QString &inputString,
++ const QString &formatString,
++ const KCalendarSystem *calendar,
++ const KLocale *locale,
++ KLocale::DigitSet digitSet,
++ KLocale::DateTimeFormatStandard standard) const
+ {
+ QString str = inputString.simplified().toLower();
+ QString fmt = formatString.simplified();
+@@ -104,15 +104,15 @@ DateTimeComponents KDateTimeParser::parseDatePosix( const QString &inputString,
+ int readLength; // Temporary variable used when reading input
+ bool error = false;
+
+- while ( fmt.length() > fmtpos && str.length() > strpos && !error ) {
++ while (fmt.length() > fmtpos && str.length() > strpos && !error) {
+
+- QChar fmtChar = fmt.at( fmtpos++ );
++ QChar fmtChar = fmt.at(fmtpos++);
+
+- if ( fmtChar != QLatin1Char('%') ) {
++ if (fmtChar != QLatin1Char('%')) {
+
+- if ( fmtChar.isSpace() && str.at(strpos).isSpace() ) {
++ if (fmtChar.isSpace() && str.at(strpos).isSpace()) {
+ strpos++;
+- } else if ( fmtChar.toLower() == str.at(strpos) ) {
++ } else if (fmtChar.toLower() == str.at(strpos)) {
+ strpos++;
+ } else {
+ error = true;
+@@ -123,169 +123,168 @@ DateTimeComponents KDateTimeParser::parseDatePosix( const QString &inputString,
+ QString shortName, longName;
+ QChar modifierChar;
+ // remove space at the beginning
+- if ( str.length() > strpos && str.at( strpos ).isSpace() ) {
++ if (str.length() > strpos && str.at(strpos).isSpace()) {
+ strpos++;
+ }
+
+- fmtChar = fmt.at( fmtpos++ );
+- if ( fmtChar == QLatin1Char('E') ) {
++ fmtChar = fmt.at(fmtpos++);
++ if (fmtChar == QLatin1Char('E')) {
+ modifierChar = fmtChar;
+- fmtChar = fmt.at( fmtpos++ );
++ fmtChar = fmt.at(fmtpos++);
+ }
+
+- switch ( fmtChar.unicode() )
+- {
+- case 'a': // Weekday Name Short
+- case 'A': // Weekday Name Long
+- error = true;
+- j = 1;
+- while ( error && j <= calendar->d_ptr->maxDaysInWeek() ) {
+- shortName = calendar->weekDayName( j, KCalendarSystem::ShortDayName ).toLower();
+- longName = calendar->weekDayName( j, KCalendarSystem::LongDayName ).toLower();
+- if ( str.mid( strpos, longName.length() ) == longName ) {
+- strpos += longName.length();
+- error = false;
+- } else if ( str.mid( strpos, shortName.length() ) == shortName ) {
+- strpos += shortName.length();
+- error = false;
+- }
+- ++j;
++ switch (fmtChar.unicode()) {
++ case 'a': // Weekday Name Short
++ case 'A': // Weekday Name Long
++ error = true;
++ j = 1;
++ while (error && j <= calendar->d_ptr->maxDaysInWeek()) {
++ shortName = calendar->weekDayName(j, KCalendarSystem::ShortDayName).toLower();
++ longName = calendar->weekDayName(j, KCalendarSystem::LongDayName).toLower();
++ if (str.mid(strpos, longName.length()) == longName) {
++ strpos += longName.length();
++ error = false;
++ } else if (str.mid(strpos, shortName.length()) == shortName) {
++ strpos += shortName.length();
++ error = false;
+ }
+- break;
+- case 'b': // Month Name Short
+- case 'h': // Month Name Short
+- case 'B': // Month Name Long
+- error = true;
+- j = 1;
+- while ( error && j <= calendar->d_ptr->maxMonthsInYear() ) {
+- // This may be a problem in calendar systems with variable number of months
+- // in the year and/or names of months that change depending on the year, e.g
+- // Hebrew. We really need to know the correct year first, but we may not have
+- // read it yet and will be using the current year instead
+- int monthYear;
+- if ( parsedYear ) {
+- monthYear = yy;
+- } else {
+- monthYear = calendar->year( QDate::currentDate() );
+- }
+- if ( calendar->locale()->dateMonthNamePossessive() ) {
+- shortName = calendar->monthName( j, monthYear, KCalendarSystem::ShortNamePossessive ).toLower();
+- longName = calendar->monthName( j, monthYear, KCalendarSystem::LongNamePossessive ).toLower();
+- } else {
+- shortName = calendar->monthName( j, monthYear, KCalendarSystem::ShortName ).toLower();
+- longName = calendar->monthName( j, monthYear, KCalendarSystem::LongName ).toLower();
+- }
+- if ( str.mid( strpos, longName.length() ) == longName ) {
+- mm = j;
+- strpos += longName.length();
+- error = false;
+- } else if ( str.mid( strpos, shortName.length() ) == shortName ) {
+- mm = j;
+- strpos += shortName.length();
+- error = false;
+- }
+- ++j;
++ ++j;
++ }
++ break;
++ case 'b': // Month Name Short
++ case 'h': // Month Name Short
++ case 'B': // Month Name Long
++ error = true;
++ j = 1;
++ while (error && j <= calendar->d_ptr->maxMonthsInYear()) {
++ // This may be a problem in calendar systems with variable number of months
++ // in the year and/or names of months that change depending on the year, e.g
++ // Hebrew. We really need to know the correct year first, but we may not have
++ // read it yet and will be using the current year instead
++ int monthYear;
++ if (parsedYear) {
++ monthYear = yy;
++ } else {
++ monthYear = calendar->year(QDate::currentDate());
+ }
+- break;
+- case 'd': // Day Number Long
+- case 'e': // Day Number Short
+- dd = calendar->dayStringToInteger( str.mid( strpos ), readLength );
+- strpos += readLength;
+- error = readLength <= 0;
+- break;
+- case 'n':
+- // PosixFormat %n is Newline
+- // KdeFormat %n is Month Number Short
+- if ( standard == KLocale::KdeFormat ) {
+- mm = calendar->monthStringToInteger( str.mid( strpos ), readLength );
+- strpos += readLength;
+- error = readLength <= 0;
++ if (calendar->locale()->dateMonthNamePossessive()) {
++ shortName = calendar->monthName(j, monthYear, KCalendarSystem::ShortNamePossessive).toLower();
++ longName = calendar->monthName(j, monthYear, KCalendarSystem::LongNamePossessive).toLower();
++ } else {
++ shortName = calendar->monthName(j, monthYear, KCalendarSystem::ShortName).toLower();
++ longName = calendar->monthName(j, monthYear, KCalendarSystem::LongName).toLower();
+ }
+- // standard == KLocale::PosixFormat
+- // all whitespace already 'eaten', no action required
+- break;
+- case 'm': // Month Number Long
+- mm = calendar->monthStringToInteger( str.mid( strpos ), readLength );
++ if (str.mid(strpos, longName.length()) == longName) {
++ mm = j;
++ strpos += longName.length();
++ error = false;
++ } else if (str.mid(strpos, shortName.length()) == shortName) {
++ mm = j;
++ strpos += shortName.length();
++ error = false;
++ }
++ ++j;
++ }
++ break;
++ case 'd': // Day Number Long
++ case 'e': // Day Number Short
++ dd = calendar->dayStringToInteger(str.mid(strpos), readLength);
++ strpos += readLength;
++ error = readLength <= 0;
++ break;
++ case 'n':
++ // PosixFormat %n is Newline
++ // KdeFormat %n is Month Number Short
++ if (standard == KLocale::KdeFormat) {
++ mm = calendar->monthStringToInteger(str.mid(strpos), readLength);
+ strpos += readLength;
+ error = readLength <= 0;
+- break;
+- case 'Y': // Year Number Long
+- case 'y': // Year Number Short
+- if ( modifierChar == QLatin1Char('E') ) { // Year In Era
+- if ( fmtChar == QLatin1Char('y') ) {
+- ey = calendar->yearStringToInteger( str.mid( strpos ), readLength );
+- strpos += readLength;
+- error = readLength <= 0;
+- } else {
+- error = true;
+- j = calendar->eraList()->count() -1; // Start with the most recent
+- while ( error && j >= 0 ) {
+- QString subFormat = calendar->eraList()->at( j ).format();
+- QString subInput = str.mid( strpos );
+- DateTimeComponents subResult = parseDatePosix( subInput, subFormat, calendar, locale, digitSet, standard );
+- if ( !subResult.error ) {
+- if ( subResult.parsedYear ) {
+- yy = subResult.year;
+- parsedYear = true;
+- error = false;
+- strpos += subResult.inputPosition;
+- } else if ( !subResult.eraName.isEmpty() && subResult.yearInEra >= 0 ) {
+- ee = subResult.eraName;
+- ey = subResult.yearInEra;
+- error = false;
+- strpos += subResult.inputPosition;
+- }
+- }
+- --j;
+- }
+- }
+- } else {
+- yy = calendar->yearStringToInteger( str.mid( strpos ), readLength );
++ }
++ // standard == KLocale::PosixFormat
++ // all whitespace already 'eaten', no action required
++ break;
++ case 'm': // Month Number Long
++ mm = calendar->monthStringToInteger(str.mid(strpos), readLength);
++ strpos += readLength;
++ error = readLength <= 0;
++ break;
++ case 'Y': // Year Number Long
++ case 'y': // Year Number Short
++ if (modifierChar == QLatin1Char('E')) { // Year In Era
++ if (fmtChar == QLatin1Char('y')) {
++ ey = calendar->yearStringToInteger(str.mid(strpos), readLength);
+ strpos += readLength;
+- if ( fmtChar == QLatin1Char('y') ) {
+- yy = calendar->applyShortYearWindow( yy );
+- }
+ error = readLength <= 0;
+- if ( !error ) {
+- parsedYear = true;
+- }
+- }
+- break;
+- case 'C': // Era
+- error = true;
+- if ( modifierChar == QLatin1Char('E') ) {
+- j = calendar->eraList()->count() -1; // Start with the most recent
+- while ( error && j >= 0 ) {
+- shortName = calendar->d_ptr->m_eraList->at( j ).name( KLocale::ShortName ).toLower();
+- longName = calendar->eraList()->at( j ).name( KLocale::LongName ).toLower();
+- if ( str.mid( strpos, longName.length() ) == longName ) {
+- strpos += longName.length();
+- ee = longName;
+- error = false;
+- } else if ( str.mid( strpos, shortName.length() ) == shortName ) {
+- strpos += shortName.length();
+- ee = shortName;
+- error = false;
++ } else {
++ error = true;
++ j = calendar->eraList()->count() - 1; // Start with the most recent
++ while (error && j >= 0) {
++ QString subFormat = calendar->eraList()->at(j).format();
++ QString subInput = str.mid(strpos);
++ DateTimeComponents subResult = parseDatePosix(subInput, subFormat, calendar, locale, digitSet, standard);
++ if (!subResult.error) {
++ if (subResult.parsedYear) {
++ yy = subResult.year;
++ parsedYear = true;
++ error = false;
++ strpos += subResult.inputPosition;
++ } else if (!subResult.eraName.isEmpty() && subResult.yearInEra >= 0) {
++ ee = subResult.eraName;
++ ey = subResult.yearInEra;
++ error = false;
++ strpos += subResult.inputPosition;
++ }
+ }
+ --j;
+ }
+ }
+- break;
+- case 'j': // Day Of Year Number
+- dayInYear = integerFromString( str.mid( strpos ), 3, readLength );
+- strpos += readLength;
+- error = readLength <= 0;
+- break;
+- case 'V': // ISO Week Number
+- isoWeekNumber = integerFromString( str.mid( strpos ), 2, readLength );
+- strpos += readLength;
+- error = readLength <= 0;
+- break;
+- case 'u': // ISO Day Of Week
+- dayOfIsoWeek = integerFromString( str.mid( strpos ), 1, readLength );
++ } else {
++ yy = calendar->yearStringToInteger(str.mid(strpos), readLength);
+ strpos += readLength;
++ if (fmtChar == QLatin1Char('y')) {
++ yy = calendar->applyShortYearWindow(yy);
++ }
+ error = readLength <= 0;
+- break;
++ if (!error) {
++ parsedYear = true;
++ }
++ }
++ break;
++ case 'C': // Era
++ error = true;
++ if (modifierChar == QLatin1Char('E')) {
++ j = calendar->eraList()->count() - 1; // Start with the most recent
++ while (error && j >= 0) {
++ shortName = calendar->d_ptr->m_eraList->at(j).name(KLocale::ShortName).toLower();
++ longName = calendar->eraList()->at(j).name(KLocale::LongName).toLower();
++ if (str.mid(strpos, longName.length()) == longName) {
++ strpos += longName.length();
++ ee = longName;
++ error = false;
++ } else if (str.mid(strpos, shortName.length()) == shortName) {
++ strpos += shortName.length();
++ ee = shortName;
++ error = false;
++ }
++ --j;
++ }
++ }
++ break;
++ case 'j': // Day Of Year Number
++ dayInYear = integerFromString(str.mid(strpos), 3, readLength);
++ strpos += readLength;
++ error = readLength <= 0;
++ break;
++ case 'V': // ISO Week Number
++ isoWeekNumber = integerFromString(str.mid(strpos), 2, readLength);
++ strpos += readLength;
++ error = readLength <= 0;
++ break;
++ case 'u': // ISO Day Of Week
++ dayOfIsoWeek = integerFromString(str.mid(strpos), 1, readLength);
++ strpos += readLength;
++ error = readLength <= 0;
++ break;
+ }
+ }
+ }
+@@ -294,12 +293,12 @@ DateTimeComponents KDateTimeParser::parseDatePosix( const QString &inputString,
+ result.error = error;
+ result.inputPosition = strpos;
+ result.formatPosition = fmtpos;
+- if ( error ) {
++ if (error) {
+ result.day = -1;
+ result.month = -1;
+ result.year = 0;
+ result.parsedYear = false;
+- result.eraName = QString();
++ result.eraName.clear();
+ result.yearInEra = -1;
+ result.dayInYear = -1;
+ result.isoWeekNumber = -1;
+@@ -319,12 +318,15 @@ DateTimeComponents KDateTimeParser::parseDatePosix( const QString &inputString,
+ }
+
+ // Parse an input string to match a UNICODE DateTime format string and return any components found
+-DateTimeComponents KDateTimeParser::parseDateUnicode( const QString &inputString,
+- const QString &formatString,
+- const KCalendarSystem *calendar,
+- const KLocale *locale,
+- KLocale::DigitSet digitSet ) const
++DateTimeComponents KDateTimeParser::parseDateUnicode(const QString &inputString,
++ const QString &formatString,
++ const KCalendarSystem *calendar,
++ const KLocale *locale,
++ KLocale::DigitSet digitSet) const
+ {
++ Q_UNUSED(calendar);
++ Q_UNUSED(locale);
++ Q_UNUSED(digitSet);
+ QString str = inputString.simplified().toLower();
+ QString fmt = formatString.simplified();
+ int dd = -1;
+@@ -338,19 +340,19 @@ DateTimeComponents KDateTimeParser::parseDateUnicode( const QString &inputString
+ int dayOfIsoWeek = -1;
+ int strpos = 0;
+ int fmtpos = 0;
+- int readLength; // Temporary variable used when reading input
++ //int readLength; // Temporary variable used when reading input
+ bool error = false;
+
+ DateTimeComponents result;
+ result.error = error;
+ result.inputPosition = strpos;
+ result.formatPosition = fmtpos;
+- if ( error ) {
++ if (error) {
+ result.day = -1;
+ result.month = -1;
+ result.year = 0;
+ result.parsedYear = false;
+- result.eraName = QString();
++ result.eraName.clear();
+ result.yearInEra = -1;
+ result.dayInYear = -1;
+ result.isoWeekNumber = -1;
+@@ -371,26 +373,26 @@ DateTimeComponents KDateTimeParser::parseDateUnicode( const QString &inputString
+
+ // Peel a number off the front of a string which may have other trailing chars after the number
+ // Stop either at either maxLength, eos, or first non-digit char
+-int KDateTimeParser::integerFromString( const QString &string, int maxLength, int &readLength ) const
++int KDateTimeParser::integerFromString(const QString &string, int maxLength, int &readLength) const
+ {
+ int value = -1;
+ int position = 0;
+ readLength = 0;
+ bool ok = false;
+
+- if ( maxLength < 0 ) {
++ if (maxLength < 0) {
+ maxLength = string.length();
+ }
+
+- while ( position < string.length() &&
++ while (position < string.length() &&
+ position < maxLength &&
+- string.at( position ).isDigit() ) {
++ string.at(position).isDigit()) {
+ position++;
+ }
+
+- if ( position > 0 ) {
+- value = string.left( position ).toInt( &ok );
+- if ( ok ) {
++ if (position > 0) {
++ value = string.left(position).toInt(&ok);
++ if (ok) {
+ readLength = position;
+ } else {
+ value = -1;
+diff --git a/kdecore/date/kdatetimeparser_p.h b/kdecore/date/kdatetimeparser_p.h
+index 7a47c3a..4a25b34 100644
+--- a/kdecore/date/kdatetimeparser_p.h
++++ b/kdecore/date/kdatetimeparser_p.h
+@@ -31,8 +31,7 @@ class QTime;
+ class KDateTime;
+ class KCalendarSystem;
+
+-struct DateTimeComponents
+-{
++struct DateTimeComponents {
+ int day;
+ int month;
+ int year;
+@@ -54,28 +53,28 @@ public:
+
+ virtual ~KDateTimeParser();
+
+- virtual QDate parseDate( const QString &dateString,
+- const QString &format,
+- const KCalendarSystem *calendar = KGlobal::locale()->calendar(),
+- const KLocale *locale = KGlobal::locale(),
+- KLocale::DigitSet digitSet = KLocale::ArabicDigits,
+- KLocale::DateTimeFormatStandard standard = KLocale::KdeFormat ) const;
++ virtual QDate parseDate(const QString &dateString,
++ const QString &format,
++ const KCalendarSystem *calendar = KGlobal::locale()->calendar(),
++ const KLocale *locale = KGlobal::locale(),
++ KLocale::DigitSet digitSet = KLocale::ArabicDigits,
++ KLocale::DateTimeFormatStandard standard = KLocale::KdeFormat) const;
+
+ private:
+- virtual DateTimeComponents parseDatePosix( const QString &dateString,
+- const QString &format,
+- const KCalendarSystem *calendar,
+- const KLocale *locale,
+- KLocale::DigitSet digitSet,
+- KLocale::DateTimeFormatStandard standard ) const;
++ virtual DateTimeComponents parseDatePosix(const QString &dateString,
++ const QString &format,
++ const KCalendarSystem *calendar,
++ const KLocale *locale,
++ KLocale::DigitSet digitSet,
++ KLocale::DateTimeFormatStandard standard) const;
+
+- virtual DateTimeComponents parseDateUnicode( const QString &inputString,
+- const QString &format,
+- const KCalendarSystem *calendar,
+- const KLocale *locale,
+- KLocale::DigitSet digitSet ) const;
++ virtual DateTimeComponents parseDateUnicode(const QString &inputString,
++ const QString &format,
++ const KCalendarSystem *calendar,
++ const KLocale *locale,
++ KLocale::DigitSet digitSet) const;
+
+- virtual int integerFromString( const QString &string, int maxLength, int &readLength ) const;
++ virtual int integerFromString(const QString &string, int maxLength, int &readLength) const;
+ };
+
+ #endif // KDATETIMEPARSER_H
+diff --git a/kdecore/date/kdayperiod.cpp b/kdecore/date/kdayperiod.cpp
+index 84170b4..c810552 100644
+--- a/kdecore/date/kdayperiod.cpp
++++ b/kdecore/date/kdayperiod.cpp
+@@ -167,8 +167,8 @@ QTime KDayPeriod::time(int hip, int minute, int second, int millisecond) const
+ }
+ int hour;
+ if (periodStart() <= periodEnd() ||
+- (hip >= hourInPeriod(periodStart()) &&
+- hip <= hourInPeriod(QTime(23, 59, 59, 999)))) {
++ (hip >= hourInPeriod(periodStart()) &&
++ hip <= hourInPeriod(QTime(23, 59, 59, 999)))) {
+ hour = hip + periodStart().hour() - d->m_offsetFromStart;
+ } else {
+ hour = hip;
+@@ -197,7 +197,7 @@ bool KDayPeriod::isValid(const QTime &time) const
+ return time >= periodStart() && time <= periodEnd();
+ } else {
+ return ((time >= periodStart() && time <= QTime(23, 59, 59, 999)) ||
+- (time >= QTime( 0, 0, 0 ) && time <= periodEnd()));
++ (time >= QTime(0, 0, 0) && time <= periodEnd()));
+ }
+ } else {
+ return false;
+diff --git a/kdecore/date/klocalizeddate.cpp b/kdecore/date/klocalizeddate.cpp
+index b624a34..b918e9e 100644
+--- a/kdecore/date/klocalizeddate.cpp
++++ b/kdecore/date/klocalizeddate.cpp
+@@ -42,22 +42,22 @@ public:
+ };
+
+ KLocalizedDatePrivate::KLocalizedDatePrivate(const QDate &date, const KCalendarSystem *calendar, bool manageCalendar)
+- : QSharedData(),
+- m_date(date),
+- m_calendar(calendar),
+- m_manageCalendar(manageCalendar)
++ : QSharedData(),
++ m_date(date),
++ m_calendar(calendar),
++ m_manageCalendar(manageCalendar)
+ {
+ }
+
+ KLocalizedDatePrivate::KLocalizedDatePrivate(const KLocalizedDatePrivate &rhs)
+- : QSharedData(rhs),
+- m_date(rhs.m_date),
+- m_calendar(rhs.m_calendar),
+- m_manageCalendar(rhs.m_manageCalendar)
++ : QSharedData(rhs),
++ m_date(rhs.m_date),
++ m_calendar(rhs.m_calendar),
++ m_manageCalendar(rhs.m_manageCalendar)
+ {
+ // If we're managing the calendar object, then take a copy,
+ // i.e. user called setCalendarSystem() rather than passing a custom one into the constructor
+- if(m_manageCalendar) {
++ if (m_manageCalendar) {
+ m_calendar = KCalendarSystem::create(m_calendar->calendarSystem(), new KLocale(*m_calendar->locale()));
+ }
+ }
+@@ -69,7 +69,7 @@ KLocalizedDatePrivate &KLocalizedDatePrivate::operator=(const KLocalizedDatePriv
+ m_manageCalendar = rhs.m_manageCalendar;
+ // If we're managing the calendar object, then take a copy,
+ // i.e. user called setCalendarSystem() rather than passing a custom one into the constructor
+- if(rhs.m_manageCalendar) {
++ if (rhs.m_manageCalendar) {
+ m_calendar = KCalendarSystem::create(m_calendar->calendarSystem(), new KLocale(*m_calendar->locale()));
+ }
+ return *this;
+@@ -91,18 +91,18 @@ KLocalizedDatePrivate::~KLocalizedDatePrivate()
+ *****************************************************************************/
+
+ KLocalizedDate::KLocalizedDate(const QDate &date, const KCalendarSystem *calendarSystem)
+- : d(new KLocalizedDatePrivate(date, calendarSystem, false))
++ : d(new KLocalizedDatePrivate(date, calendarSystem, false))
+ {
+ }
+
+ KLocalizedDate::KLocalizedDate(int year, int month, int day, const KCalendarSystem *calendarSystem)
+- : d(new KLocalizedDatePrivate(QDate(), calendarSystem, false))
++ : d(new KLocalizedDatePrivate(QDate(), calendarSystem, false))
+ {
+ setDate(year, month, day);
+ }
+
+ KLocalizedDate::KLocalizedDate(const KLocalizedDate &rhs)
+- : d(new KLocalizedDatePrivate(*rhs.d))
++ : d(new KLocalizedDatePrivate(*rhs.d))
+ {
+ }
+
+@@ -148,7 +148,7 @@ KLocale::CalendarSystem KLocalizedDate::calendarSystem()
+
+ const KCalendarSystem *KLocalizedDate::calendar() const
+ {
+- if ( d->m_calendar ) {
++ if (d->m_calendar) {
+ return d->m_calendar;
+ }
+ return KGlobal::locale()->calendar();
+@@ -167,7 +167,7 @@ bool KLocalizedDate::isNull() const
+
+ bool KLocalizedDate::isValid() const
+ {
+- return calendar()->isValid( date() );
++ return calendar()->isValid(date());
+ }
+
+ /*****************************************************************************
+@@ -297,13 +297,12 @@ int KLocalizedDate::dayOfWeek() const
+
+ int KLocalizedDate::week(int *yearNum) const
+ {
+- return calendar()->weekNumber(date(), yearNum);
++ return calendar()->week(date(), yearNum);
+ }
+
+ int KLocalizedDate::week(KLocale::WeekNumberSystem weekNumberSystem, int *yearNum) const
+ {
+- Q_UNUSED(weekNumberSystem);
+- return calendar()->weekNumber(date(), yearNum);
++ return calendar()->week(date(), weekNumberSystem, yearNum);
+ }
+
+ int KLocalizedDate::monthsInYear() const
+@@ -318,8 +317,7 @@ int KLocalizedDate::weeksInYear() const
+
+ int KLocalizedDate::weeksInYear(KLocale::WeekNumberSystem weekNumberSystem) const
+ {
+- Q_UNUSED(weekNumberSystem);
+- return calendar()->weeksInYear(date());
++ return calendar()->weeksInYear(date(), weekNumberSystem);
+ }
+
+ int KLocalizedDate::daysInYear() const
+@@ -454,13 +452,13 @@ bool KLocalizedDate::addDaysTo(int days)
+ }
+
+ void KLocalizedDate::dateDifference(const KLocalizedDate &toDate,
+- int *yearsDiff, int *monthsDiff, int *daysDiff, int *direction) const
++ int *yearsDiff, int *monthsDiff, int *daysDiff, int *direction) const
+ {
+ dateDifference(toDate.date(), yearsDiff, monthsDiff, daysDiff, direction);
+ }
+
+ void KLocalizedDate::dateDifference(const QDate &toDate,
+- int *yearsDiff, int *monthsDiff, int *daysDiff, int *direction) const
++ int *yearsDiff, int *monthsDiff, int *daysDiff, int *direction) const
+ {
+ calendar()->dateDifference(date(), toDate, yearsDiff, monthsDiff, daysDiff, direction);
+ }
+@@ -606,7 +604,7 @@ QDataStream &operator>>(QDataStream &in, KLocalizedDate &date)
+
+ QDebug operator<<(QDebug dbg, const KLocalizedDate &date)
+ {
+- if (date.calendar()->calendarType() == QLatin1String("gregorian")) {
++ if (date.calendar()->calendarSystem() == KLocale::QDateCalendar) {
+ dbg.nospace() << "KLocalizedDate(" << date.formatDate(KLocale::IsoDate) << ", "
+ << date.calendar()->calendarLabel() << ')';
+ } else {
+diff --git a/kdecore/date/klocalizeddate.h b/kdecore/date/klocalizeddate.h
+index 2d1d611..6842577 100644
+--- a/kdecore/date/klocalizeddate.h
++++ b/kdecore/date/klocalizeddate.h
+@@ -17,8 +17,8 @@
+ Boston, MA 02110-1301, USA.
+ */
+
+-#ifndef KDATE_H
+-#define KDATE_H
++#ifndef KLOCALIZEDDATE_H
++#define KLOCALIZEDDATE_H
+
+ #include <QtCore/QString>
+ #include <QtCore/QDate>
+@@ -151,7 +151,7 @@ public:
+ * See @ref custom for more details on using custom Calendar Systems.
+ *
+ * @param date the QDate to set the KLocalizedDate to, defaults to invalid date
+- * @param locale the locale to use for date formats, defaults to the global
++ * @param calendar the calendar system to use, defaults to the global
+ */
+ explicit KLocalizedDate(const QDate &date = QDate(), const KCalendarSystem *calendar = 0);
+
+@@ -169,6 +169,7 @@ public:
+ * @param year the year to set the KLocalizedDate to
+ * @param month the month to set the KLocalizedDate to
+ * @param day the day to set the KLocalizedDate to
++ * @param calendar the calendar system to use, defaults to the global
+ */
+ KLocalizedDate(int year, int month, int day, const KCalendarSystem *calendar = 0);
+
+@@ -297,7 +298,7 @@ public:
+ * @see eraName()
+ * @see yearInEra()
+ * @param eraName Era string
+- * @param year Year In Era number
++ * @param yearInEra Year In Era number
+ * @param month Month number
+ * @param day Day Of Month number
+ * @return @c true if the date is valid, @c false otherwise
+@@ -421,7 +422,6 @@ public:
+ * See @ref formatting for more details on Date Formatting.
+ *
+ * @see formatDate()
+- * @param format format to return, either short or long
+ * @return the localized era name, empty string if date is invalid
+ */
+ QString eraName() const;
+@@ -433,7 +433,6 @@ public:
+ * See @ref formatting for more details on Date Formatting.
+ *
+ * @see formatDate()
+- * @param format format to return, either short or long
+ * @return the localized era year string, empty string if date is invalid
+ */
+ QString eraYear() const;
+@@ -1166,22 +1165,25 @@ Q_DECLARE_METATYPE(KLocalizedDate)
+ /**
+ * Data stream output operator
+ *
+- * @param other the date to compare
++ * @param out the datastream to write to
++ * @param date the date to write to the stream
+ */
+ QDataStream KDECORE_EXPORT &operator<<(QDataStream &out, const KLocalizedDate &date);
+
+ /**
+ * Data stream input operator
+ *
+- * @param other the date to compare
++ * @param out the datastream to read from
++ * @param date the date to read from the stream
+ */
+ QDataStream KDECORE_EXPORT &operator>>(QDataStream &in, KLocalizedDate &date);
+
+ /**
+ * Debug stream output operator
+ *
+- * @param other the date to print
++ * @param out the debug datastream to write to
++ * @param date the date to write to the stream
+ */
+-QDebug KDECORE_EXPORT operator<<(QDebug, const KLocalizedDate &);
++QDebug KDECORE_EXPORT operator<<(QDebug debug, const KLocalizedDate &date);
+
+-#endif // KDATE_H
++#endif // KLOCALIZEDDATE_H
+diff --git a/kdecore/CMakeLists.txt b/kdecore/CMakeLists.txt
+index f78c115..276f005 100644
+--- a/kdecore/CMakeLists.txt
++++ b/kdecore/CMakeLists.txt
+@@ -184,9 +184,9 @@ set(kdecore_LIB_SRCS
+ date/kcalendarsystem.cpp
+ date/kcalendarsystemcoptic.cpp
+ date/kcalendarsystemethiopian.cpp
++ date/kcalendarsystemqdate.cpp
+ date/kcalendarsystemgregorian.cpp
+- date/kcalendarsystemgregorianproleptic.cpp
+- date/kcalendarsystemhijri.cpp
++ date/kcalendarsystemislamiccivil.cpp
+ date/kcalendarsystemhebrew.cpp
+ date/kcalendarsystemindiannational.cpp
+ date/kcalendarsystemjalali.cpp
diff --git a/kde-unstable/kdelibs/kde-applications-menu.patch b/kde-unstable/kdelibs/kde-applications-menu.patch
new file mode 100644
index 000000000..4b513298a
--- /dev/null
+++ b/kde-unstable/kdelibs/kde-applications-menu.patch
@@ -0,0 +1,22 @@
+--- kdelibs-4.3.98/kded/CMakeLists.txt 2009-10-02 14:55:17.000000000 +0000
++++ kdelibs-4.3.98/kded/CMakeLists.txt 2010-01-31 22:16:13.946933892 +0000
+@@ -69,7 +69,7 @@
+ if (WIN32)
+ install( FILES applications.menu DESTINATION ${SHARE_INSTALL_PREFIX}/xdg/menus )
+ else (WIN32)
+-install( FILES applications.menu DESTINATION ${SYSCONF_INSTALL_DIR}/xdg/menus )
++install( FILES applications.menu DESTINATION ${SYSCONF_INSTALL_DIR}/xdg/menus RENAME kde-applications.menu )
+ endif (WIN32)
+ install( FILES kdedmodule.desktop DESTINATION ${SERVICETYPES_INSTALL_DIR} )
+ install( FILES kded.upd DESTINATION ${DATA_INSTALL_DIR}/kconf_update )
+--- kdelibs-4.3.98/kded/kbuildsycoca.cpp 2009-12-04 23:10:18.000000000 +0000
++++ kdelibs-4.3.98/kded/kbuildsycoca.cpp 2010-01-31 22:16:13.962766572 +0000
+@@ -302,7 +302,7 @@
+ if (!m_trackId.isEmpty())
+ g_vfolder->setTrackId(m_trackId);
+
+- VFolderMenu::SubMenu *kdeMenu = g_vfolder->parseMenu("applications.menu", true);
++ VFolderMenu::SubMenu *kdeMenu = g_vfolder->parseMenu("kde-applications.menu", true);
+
+ KServiceGroup::Ptr entry = g_bsgf->addNew("/", kdeMenu->directoryFile, KServiceGroup::Ptr(), false);
+ entry->setLayoutInfo(kdeMenu->layoutList);
diff --git a/kde-unstable/kdelibs/kdelibs.install b/kde-unstable/kdelibs/kdelibs.install
new file mode 100644
index 000000000..c77e68041
--- /dev/null
+++ b/kde-unstable/kdelibs/kdelibs.install
@@ -0,0 +1,13 @@
+post_install() {
+ xdg-icon-resource forceupdate --theme hicolor &> /dev/null
+ update-mime-database usr/share/mime &> /dev/null
+ update-desktop-database -q
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
diff --git a/kde-unstable/kdemultimedia/PKGBUILD b/kde-unstable/kdemultimedia/PKGBUILD
new file mode 100644
index 000000000..363b255ed
--- /dev/null
+++ b/kde-unstable/kdemultimedia/PKGBUILD
@@ -0,0 +1,109 @@
+# $Id: PKGBUILD 124769 2011-05-24 09:53:01Z andrea $
+# Maintainer: Andrea Scarpino <andrea@archlinux.org>
+# Contributor: Pierre Schmitz <pierre@archlinux.de>
+
+pkgbase=kdemultimedia
+pkgname=('kdemultimedia-dragonplayer'
+ 'kdemultimedia-ffmpegthumbs'
+ 'kdemultimedia-juk'
+ 'kdemultimedia-kioslave'
+ 'kdemultimedia-kmix'
+ 'kdemultimedia-kscd'
+ 'kdemultimedia-mplayerthumbs')
+pkgver=4.6.80
+pkgrel=1
+arch=('i686' 'x86_64')
+url='http://www.kde.org'
+license=('GPL' 'LGPL' 'FDL')
+groups=('kde' 'kdemultimedia')
+makedepends=('pkgconfig' 'cmake' 'automoc4' 'kdelibs' 'tunepimp'
+ 'ffmpeg' 'mplayer' 'pulseaudio' 'libmusicbrainz3')
+source=("http://download.kde.org/stable/${pkgver}/src/${pkgbase}-${pkgver}.tar.bz2"
+ 'mplayerthumbs.config')
+sha1sums=('60fa25d125aa77b66fd1c1e9e043df48abf35bd4'
+ 'ba016fa2563c14ffcba852c62506b66bfc6ee683')
+
+build() {
+ cd ${srcdir}
+ mkdir build
+ cd build
+ cmake ../${pkgbase}-${pkgver} \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_SKIP_RPATH=ON \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DWITH_Xine=OFF
+ make
+}
+
+package_kdemultimedia-dragonplayer() {
+ pkgdesc='Video Player'
+ depends=('kdebase-runtime')
+ url="http://kde.org/applications/multimedia/dragonplayer/"
+ install='kdemultimedia.install'
+ cd $srcdir/build/dragonplayer
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/dragonplayer
+ make DESTDIR=$pkgdir install
+}
+
+package_kdemultimedia-ffmpegthumbs() {
+ pkgdesc='Video Files (ffmpegthumbs)'
+ depends=('kdebase-runtime' 'ffmpeg')
+ install='kdemultimedia.install'
+ cd $srcdir/build/ffmpegthumbs
+ make DESTDIR=$pkgdir install
+}
+
+package_kdemultimedia-juk() {
+ pkgdesc='Music Player'
+ depends=('kdebase-runtime' 'tunepimp')
+ url="http://kde.org/applications/multimedia/juk"
+ install='kdemultimedia.install'
+ cd $srcdir/build/juk
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/juk
+ make DESTDIR=$pkgdir install
+}
+
+package_kdemultimedia-kioslave() {
+ pkgdesc='Audio CD Browser'
+ depends=('kdelibs' 'libmusicbrainz3' 'cdparanoia')
+ conflicts=('kdemultimedia-libkcddb' 'kdemultimedia-libkcompactdisc')
+ replaces=('kdemultimedia-libkcddb' 'kdemultimedia-libkcompactdisc')
+ for i in kioslave doc/kioslave libkcddb libkcompactdisc; do
+ cd $srcdir/build/${i}
+ make DESTDIR=$pkgdir install
+ done
+}
+
+package_kdemultimedia-kmix() {
+ pkgdesc='Sound Mixer'
+ depends=('kdebase-runtime')
+ url="http://kde.org/applications/multimedia/kmix"
+ install='kdemultimedia.install'
+ cd $srcdir/build/kmix
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/kmix
+ make DESTDIR=$pkgdir install
+}
+
+package_kdemultimedia-kscd() {
+ pkgdesc='CD Player'
+ depends=('kdebase-runtime' 'libmusicbrainz3')
+ url="http://kde.org/applications/multimedia/kscd"
+ install='kdemultimedia.install'
+ cd $srcdir/build/kscd
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/kcontrol/cddbretrieval
+ make DESTDIR=$pkgdir install
+}
+
+package_kdemultimedia-mplayerthumbs() {
+ pkgdesc='Video Files (MPlayerThumbs)'
+ depends=('kdebase-runtime' 'mplayer')
+ replaces=('mplayerthumbs')
+ conflicts=('mplayerthumbs')
+ cd $srcdir/build/mplayerthumbs
+ make DESTDIR=$pkgdir install
+ install -D -m644 $srcdir/mplayerthumbs.config $pkgdir/usr/share/config/mplayerthumbs
+}
diff --git a/kde-unstable/kdemultimedia/kdemultimedia.install b/kde-unstable/kdemultimedia/kdemultimedia.install
new file mode 100644
index 000000000..e70c054ec
--- /dev/null
+++ b/kde-unstable/kdemultimedia/kdemultimedia.install
@@ -0,0 +1,11 @@
+post_install() {
+ xdg-icon-resource forceupdate --theme hicolor &> /dev/null
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
diff --git a/kde-unstable/kdemultimedia/mplayerthumbs.config b/kde-unstable/kdemultimedia/mplayerthumbs.config
new file mode 100644
index 000000000..761a17953
--- /dev/null
+++ b/kde-unstable/kdemultimedia/mplayerthumbs.config
@@ -0,0 +1,2 @@
+[MPlayerThumbsCfg]
+backend=0
diff --git a/kde-unstable/kdenetwork/PKGBUILD b/kde-unstable/kdenetwork/PKGBUILD
new file mode 100644
index 000000000..763acd722
--- /dev/null
+++ b/kde-unstable/kdenetwork/PKGBUILD
@@ -0,0 +1,114 @@
+# $Id: PKGBUILD 124770 2011-05-24 10:05:32Z andrea $
+# Maintainer: Andrea Scarpino <andrea@archlinux.org>
+# Contributor: Pierre Schmitz <pierre@archlinux.de>
+
+pkgbase=kdenetwork
+pkgname=('kdenetwork-filesharing'
+ 'kdenetwork-kdnssd'
+ 'kdenetwork-kget'
+ 'kdenetwork-kopete'
+ 'kdenetwork-kppp'
+ 'kdenetwork-krdc'
+ 'kdenetwork-krfb')
+pkgver=4.6.80
+pkgrel=1
+arch=('i686' 'x86_64')
+url='http://www.kde.org'
+license=('GPL' 'LGPL' 'FDL')
+groups=('kde' 'kdenetwork')
+makedepends=('pkgconfig' 'cmake' 'automoc4' 'boost' 'speex' 'ortp' 'libotr'
+ 'qca-ossl' 'kdebase-workspace' 'kdebase-lib' 'libvncserver' 'libmsn' 'ppp'
+ 'v4l-utils' 'libidn' 'rdesktop' 'qimageblitz' 'libxdamage' 'libgadu'
+ 'telepathy-qt4' 'libktorrent' 'libmms')
+source=("http://download.kde.org/unstable/${pkgver}/src/${pkgbase}-${pkgver}.tar.bz2")
+sha1sums=('8afe1547ea6f9f7acbdaf73b3ade4e3c752e645e')
+
+build() {
+ cd ${srcdir}
+ mkdir build
+ cd build
+ cmake ../${pkgbase}-${pkgver} \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_SKIP_RPATH=ON \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DMOZPLUGIN_INSTALL_DIR=/usr/lib/mozilla/plugins/ \
+ -DWITH_Xmms=OFF \
+ -DWITH_LibMeanwhile=OFF
+ make
+}
+
+package_kdenetwork-filesharing() {
+ pkgdesc='Konqueror properties dialog plugin to share a directory with the local network'
+ depends=('kdelibs' 'smbclient')
+ install='kdenetwork.install'
+ cd $srcdir/build/filesharing
+ make DESTDIR=$pkgdir install
+}
+
+package_kdenetwork-kdnssd() {
+ pkgdesc='Monitors the network for DNS-SD services'
+ depends=('kdelibs')
+ cd $srcdir/build/kdnssd
+ make DESTDIR=$pkgdir install
+}
+
+package_kdenetwork-kget() {
+ pkgdesc='Download Manager'
+ depends=('kdebase-workspace' 'kdebase-lib' 'libktorrent' 'libmms')
+ optdepends=('python2: YouTube plugin')
+ url="http://kde.org/applications/internet/kget/"
+ install='kdenetwork.install'
+ cd $srcdir/build/kget
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/kget
+ make DESTDIR=$pkgdir install
+
+ # Use the python2 executable
+ find ${pkgdir} -name '*.py' | xargs sed -i 's|#!/usr/bin/env python|#!/usr/bin/env python2|'
+}
+
+package_kdenetwork-kopete() {
+ pkgdesc='Instant Messenger'
+ depends=('kdebase-runtime' 'kdepimlibs' 'qca-ossl' 'libotr' 'libmsn'
+ 'libidn' 'qimageblitz' 'v4l-utils' 'libgadu')
+ url="http://kde.org/applications/internet/kopete/"
+ install='kdenetwork.install'
+ cd $srcdir/build/kopete
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/kopete
+ make DESTDIR=$pkgdir install
+}
+
+package_kdenetwork-kppp() {
+ pkgdesc='Internet Dial-Up Tool'
+ depends=('kdebase-runtime' 'ppp')
+ url="http://kde.org/applications/internet/kppp/"
+ install='kdenetwork.install'
+ cd $srcdir/build/kppp
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/kppp
+ make DESTDIR=$pkgdir install
+}
+
+package_kdenetwork-krdc() {
+ pkgdesc='Remote Desktop Client'
+ depends=('kdebase-runtime' 'libvncserver' 'rdesktop' 'telepathy-qt4')
+ optdepends=('kdebase-keditbookmarks: to edit bookmarks')
+ url="http://kde.org/applications/internet/krdc/"
+ cd $srcdir/build/krdc
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/krdc
+ make DESTDIR=$pkgdir install
+}
+
+package_kdenetwork-krfb() {
+ pkgdesc='Desktop Sharing'
+ # note on libxdamage:
+ # not detected by namcap because libgl depends on it
+ # but nvidia providing libgl does not depend on libxdamage
+ depends=('kdebase-runtime' 'libvncserver' 'libxdamage')
+ cd $srcdir/build/krfb
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/krfb
+ make DESTDIR=$pkgdir install
+}
diff --git a/kde-unstable/kdenetwork/kdenetwork.install b/kde-unstable/kdenetwork/kdenetwork.install
new file mode 100644
index 000000000..e70c054ec
--- /dev/null
+++ b/kde-unstable/kdenetwork/kdenetwork.install
@@ -0,0 +1,11 @@
+post_install() {
+ xdg-icon-resource forceupdate --theme hicolor &> /dev/null
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
diff --git a/kde-unstable/kdepim-runtime/PKGBUILD b/kde-unstable/kdepim-runtime/PKGBUILD
index c367ccfc8..72aecd954 100644
--- a/kde-unstable/kdepim-runtime/PKGBUILD
+++ b/kde-unstable/kdepim-runtime/PKGBUILD
@@ -3,7 +3,7 @@
# Contributor: Pierre Schmitz <pierre@archlinux.de>
pkgname=kdepim-runtime
-pkgver=4.5.96
+pkgver=4.6.80
pkgrel=1
pkgdesc='KDE PIM Runtime Environment'
arch=('i686' 'x86_64')
@@ -12,16 +12,10 @@ license=('GPL' 'LGPL' 'FDL')
depends=('kdepimlibs' 'kdebase-runtime')
makedepends=('pkgconfig' 'cmake' 'automoc4' 'boost')
install=${pkgname}.install
-#source=("http://download.kde.org/unstable/${pkgver}/src/${pkgname}-${pkgver}.tar.bz2")
-source=("http://download.kde.org/unstable/kdepim/${pkgver}/${pkgname}-${pkgver}.tar.bz2"
- 'disable-l10n.patch')
-sha1sums=('fd1cf58d5b62c647a7920dfc1d79126843750b1e'
- '991d81435205185dcb2285a6e728f7756ae92b0d')
+source=("http://download.kde.org/unstable/${pkgver}/src/${pkgname}-${pkgver}.tar.bz2")
+sha1sums=('18cb10ea5a7373c4eea859b0d0518b6a9c0e6a4e')
build() {
- cd "${srcdir}"/${pkgname}-${pkgver}
- patch -Np0 -i "${srcdir}"/disable-l10n.patch
-
cd "${srcdir}"
mkdir build
cd build
diff --git a/kde-unstable/kdepim/PKGBUILD b/kde-unstable/kdepim/PKGBUILD
index 53c4696c0..1b0491433 100644
--- a/kde-unstable/kdepim/PKGBUILD
+++ b/kde-unstable/kdepim/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 123823 2011-05-13 18:23:10Z andrea $
+# $Id: PKGBUILD 124768 2011-05-24 09:38:48Z andrea $
# Maintainer: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Pierre Schmitz <pierre@archlinux.de>
@@ -20,25 +20,24 @@ pkgname=('kdepim-akonadiconsole'
'kdepim-ktimetracker'
'kdepim-libkdepim'
'kdepim-wizards')
-pkgver=4.5.96
+pkgver=4.6.80
pkgrel=1
arch=('i686' 'x86_64')
url='http://pim.kde.org'
license=('GPL' 'LGPL' 'FDL')
groups=('kde' 'kdepim')
makedepends=('pkgconfig' 'cmake' 'automoc4' 'boost' 'kdepim-runtime' 'libxss'
- 'pilot-link' 'kde-agent' 'docbook-xsl')
-#source=("http://download.kde.org/unstable/${pkgver}/src/${pkgbase}-${pkgver}.tar.bz2")
-source=("http://download.kde.org/unstable/${pkgbase}/${pkgver}/${pkgbase}-${pkgver}.tar.bz2"
- 'disable-l10n.patch')
-sha1sums=('f425f143fe3381be2bb018bab92d89fd112595f0'
- '25e36f160ced051268e59fad6ed2de33a9c7657a')
+ 'pilot-link' 'kde-agent')
+source=("http://download.kde.org/unstable/${pkgver}/src/${pkgbase}-${pkgver}.tar.bz2"
+ 'fix-console-build.patch')
+sha1sums=('dc32fee3332df3bdb4395f3a229d88de34ae4de1'
+ 'e4b82bcee6c46aad39196a5bb2732fed72ff4541')
build() {
- cd "${srcdir}"/${pkgbase}-${pkgver}
- patch -Np0 -i "${srcdir}"/disable-l10n.patch
+ cd "${srcdir}"/${pkgbase}-${pkgver}
+ patch -p1 -i "${srcdir}"/fix-console-build.patch
- cd "${srcdir}"
+ cd "${srcdir}"
mkdir build
cd build
cmake ../${pkgbase}-${pkgver} \
diff --git a/kde-unstable/kdepim/fix-console-build.patch b/kde-unstable/kdepim/fix-console-build.patch
new file mode 100644
index 000000000..552b8c0c1
--- /dev/null
+++ b/kde-unstable/kdepim/fix-console-build.patch
@@ -0,0 +1,11 @@
+--- a/console/kabcclient/src/main.cpp
++++ b/console/kabcclient/src/main.cpp
+@@ -117,7 +117,7 @@ int main(int argc, char** argv)
+
+ cmdLineOptions.add("match-case", ki18n("Match key fields case sensitive. UID is always matched case sensitive"));
+
+- cmdLineOptions.add(ki18n("+[input data]"), ki18n("Input to use instead of reading stdin"));
++ cmdLineOptions.add("+[input data]", ki18n("Input to use instead of reading stdin"));
+
+ KCmdLineArgs::addCmdLineOptions(cmdLineOptions);
+ KCmdLineArgs::init(argc, argv, &aboutData);
diff --git a/kde-unstable/kdepimlibs/PKGBUILD b/kde-unstable/kdepimlibs/PKGBUILD
new file mode 100644
index 000000000..2fff6052c
--- /dev/null
+++ b/kde-unstable/kdepimlibs/PKGBUILD
@@ -0,0 +1,32 @@
+# $Id: PKGBUILD 124655 2011-05-23 19:42:19Z andrea $
+# Maintainer: Andrea Scarpino <andrea@archlinux.org>
+# Contributor: Pierre Schmitz <pierre@archlinux.de>
+
+pkgname=kdepimlibs
+pkgver=4.6.80
+pkgrel=1
+pkgdesc="KDE PIM Libraries"
+arch=('i686' 'x86_64')
+url='http://www.kde.org'
+license=('GPL' 'LGPL')
+depends=('kdelibs' 'gpgme' 'akonadi' 'libical' )
+makedepends=('pkgconfig' 'cmake' 'automoc4' 'boost' 'cyrus-sasl' 'openldap')
+install='kdepimlibs.install'
+source=("http://download.kde.org/unstable/${pkgver}/src/${pkgname}-${pkgver}.tar.bz2")
+sha1sums=('e07ba03177775ee6db6669123b944dd7c3b362f1')
+
+build() {
+ cd ${srcdir}
+ mkdir build
+ cd build
+ cmake ../${pkgname}-${pkgver} \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_SKIP_RPATH=ON \
+ -DCMAKE_INSTALL_PREFIX=/usr
+ make
+}
+
+package() {
+ cd $srcdir/build
+ make DESTDIR=$pkgdir install
+}
diff --git a/kde-unstable/kdepimlibs/kdepimlibs.install b/kde-unstable/kdepimlibs/kdepimlibs.install
new file mode 100644
index 000000000..99262607c
--- /dev/null
+++ b/kde-unstable/kdepimlibs/kdepimlibs.install
@@ -0,0 +1,11 @@
+post_install() {
+ update-mime-database usr/share/mime &> /dev/null
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+} \ No newline at end of file
diff --git a/kde-unstable/kdeplasma-addons/PKGBUILD b/kde-unstable/kdeplasma-addons/PKGBUILD
new file mode 100644
index 000000000..567e16086
--- /dev/null
+++ b/kde-unstable/kdeplasma-addons/PKGBUILD
@@ -0,0 +1,603 @@
+# $Id: PKGBUILD 124813 2011-05-24 15:14:21Z andrea $
+# Maintainer: Andrea Scarpino <andrea@archlinux.org>
+# Contributor: Pierre Schmitz <pierre@archlinux.de>
+
+pkgbase=kdeplasma-addons
+pkgname=('kdeplasma-addons-applets-bball'
+ 'kdeplasma-addons-applets-binary-clock'
+ 'kdeplasma-addons-applets-blackboard'
+ 'kdeplasma-addons-applets-bookmarks'
+ 'kdeplasma-addons-applets-bubblemon'
+ 'kdeplasma-addons-applets-calculator'
+ 'kdeplasma-addons-applets-charselect'
+ 'kdeplasma-addons-applets-comic'
+ 'kdeplasma-addons-applets-community'
+ 'kdeplasma-addons-applets-dict'
+ 'kdeplasma-addons-applets-eyes'
+ 'kdeplasma-addons-applets-fifteenpuzzle'
+ 'kdeplasma-addons-applets-filewatcher'
+ 'kdeplasma-addons-applets-frame'
+ 'kdeplasma-addons-applets-fuzzy-clock'
+ 'kdeplasma-addons-applets-incomingmsg'
+ 'kdeplasma-addons-applets-kdeobservatory'
+ 'kdeplasma-addons-applets-kimpanel'
+ 'kdeplasma-addons-applets-knowledgebase'
+ 'kdeplasma-addons-applets-kolourpicker'
+ 'kdeplasma-addons-applets-konqprofiles'
+ 'kdeplasma-addons-applets-konsoleprofiles'
+ 'kdeplasma-addons-applets-lancelot'
+ 'kdeplasma-addons-applets-leavenote'
+ 'kdeplasma-addons-applets-life'
+ 'kdeplasma-addons-applets-luna'
+ 'kdeplasma-addons-applets-magnifique'
+ 'kdeplasma-addons-applets-mediaplayer'
+ 'kdeplasma-addons-applets-microblog'
+ 'kdeplasma-addons-applets-news'
+ 'kdeplasma-addons-applets-notes'
+ 'kdeplasma-addons-applets-nowplaying'
+ 'kdeplasma-addons-applets-paste'
+ 'kdeplasma-addons-applets-pastebin'
+ 'kdeplasma-addons-applets-plasmaboard'
+ 'kdeplasma-addons-applets-previewer'
+ 'kdeplasma-addons-applets-qalculate'
+ 'kdeplasma-addons-applets-rememberthemilk'
+ 'kdeplasma-addons-applets-rssnow'
+ 'kdeplasma-addons-applets-showdashboard'
+ 'kdeplasma-addons-applets-showdesktop'
+ 'kdeplasma-addons-applets-social-news'
+ 'kdeplasma-addons-applets-spellcheck'
+ 'kdeplasma-addons-applets-systemloadviewer'
+ 'kdeplasma-addons-applets-timer'
+ 'kdeplasma-addons-applets-unitconverter'
+ 'kdeplasma-addons-applets-weather'
+ 'kdeplasma-addons-applets-weatherstation'
+ 'kdeplasma-addons-applets-webslice'
+ 'kdeplasma-addons-containments'
+ 'kdeplasma-addons-libs'
+ 'kdeplasma-addons-runners-audioplayercontrol'
+ 'kdeplasma-addons-runners-browserhistory'
+ 'kdeplasma-addons-runners-characters'
+ 'kdeplasma-addons-runners-contacts'
+ 'kdeplasma-addons-runners-converter'
+ 'kdeplasma-addons-runners-datetime'
+ 'kdeplasma-addons-runners-events'
+ 'kdeplasma-addons-runners-katesessions'
+ 'kdeplasma-addons-runners-konquerorsessions'
+ 'kdeplasma-addons-runners-konsolesessions'
+ 'kdeplasma-addons-runners-kopete'
+ 'kdeplasma-addons-runners-mediawiki'
+ 'kdeplasma-addons-runners-spellchecker'
+ 'kdeplasma-addons-wallpapers-mandelbrot'
+ 'kdeplasma-addons-wallpapers-marble'
+ 'kdeplasma-addons-wallpapers-pattern'
+ 'kdeplasma-addons-wallpapers-virus'
+ 'kdeplasma-addons-wallpapers-weather')
+pkgver=4.6.80
+pkgrel=1
+arch=('i686' 'x86_64')
+url='http://www.kde.org'
+license=('GPL' 'LGPL')
+groups=('kde' 'kdeplasma-addons')
+makedepends=('pkgconfig' 'cmake' 'automoc4' 'kdebase-workspace' 'kdeedu-marble'
+ 'eigen' 'scim' 'qwt' 'boost' 'libkexiv2')
+source=("http://download.kde.org/unstable/${pkgver}/src/${pkgbase}-${pkgver}.tar.bz2")
+sha1sums=('09b97248aa576991f9f5e9ddaa3392618e2337e7')
+
+build() {
+ cd ${srcdir}
+ mkdir build
+ cd build
+ cmake ../${pkgbase}-${pkgver} \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_SKIP_RPATH=ON \
+ -DCMAKE_INSTALL_PREFIX=/usr
+ make
+}
+
+package_kdeplasma-addons-applets-bball() {
+ pkgdesc='A bouncy ball for plasma'
+ depends=('kdebase-workspace')
+ install='kdeplasma-addons-applets.install'
+ cd $srcdir/build/applets/bball
+ make DESTDIR=$pkgdir install
+}
+
+package_kdeplasma-addons-applets-binary-clock() {
+ pkgdesc='Time displayed in binary format'
+ depends=('kdebase-workspace')
+ cd $srcdir/build/applets/binary-clock
+ make DESTDIR=$pkgdir install
+}
+
+package_kdeplasma-addons-applets-blackboard() {
+ pkgdesc='Black Board'
+ depends=('kdebase-workspace')
+ cd $srcdir/build/applets/blackboard
+ make DESTDIR=$pkgdir install
+}
+
+package_kdeplasma-addons-applets-bookmarks() {
+ pkgdesc='Quick Access to the Bookmarks'
+ depends=('kdebase-workspace')
+ cd $srcdir/build/applets/bookmarks
+ make DESTDIR=$pkgdir install
+}
+
+package_kdeplasma-addons-applets-bubblemon() {
+ pkgdesc='A pretty bubble that monitors your system.'
+ depends=('kdebase-workspace')
+ cd $srcdir/build/applets/bubblemon
+ make DESTDIR=$pkgdir install
+}
+
+package_kdeplasma-addons-applets-calculator() {
+ pkgdesc='Calculate simple sums'
+ depends=('kdebase-workspace')
+ cd $srcdir/build/applets/calculator
+ make DESTDIR=$pkgdir install
+}
+
+package_kdeplasma-addons-applets-charselect() {
+ pkgdesc='View, select, and copy characters from a font collection'
+ depends=('kdebase-workspace')
+ cd $srcdir/build/applets/charselect
+ make DESTDIR=$pkgdir install
+}
+
+package_kdeplasma-addons-applets-comic() {
+ pkgdesc='View comic strips from the Internet'
+ depends=('kdebase-workspace' 'kdeplasma-addons-libs')
+ cd $srcdir/build/applets/comic
+ make DESTDIR=$pkgdir install
+}
+
+package_kdeplasma-addons-applets-community() {
+ pkgdesc='Communicate using the Social Desktop'
+ depends=('kdebase-workspace')
+ cd $srcdir/build/applets/community
+ make DESTDIR=$pkgdir install
+}
+
+package_kdeplasma-addons-applets-dict() {
+ pkgdesc='Look up the meaning of words and their translation into different languages'
+ depends=('kdebase-workspace')
+ cd $srcdir/build/applets/dict
+ make DESTDIR=$pkgdir install
+ # FIXME
+ # /usr/share/icons/oxygen/scalable/apps/accessories-dictionary.svgz
+ rm -rf $pkgdir/usr/share/icons
+}
+
+package_kdeplasma-addons-applets-eyes() {
+ pkgdesc='XEyes clone'
+ depends=('kdebase-workspace')
+ install='kdeplasma-addons-applets.install'
+ cd $srcdir/build/applets/eyes
+ make DESTDIR=$pkgdir install
+}
+
+package_kdeplasma-addons-applets-fifteenpuzzle() {
+ pkgdesc='Put the pieces in order'
+ depends=('kdebase-workspace')
+ install='kdeplasma-addons-applets.install'
+ cd $srcdir/build/applets/fifteenPuzzle
+ make DESTDIR=$pkgdir install
+}
+
+package_kdeplasma-addons-applets-filewatcher() {
+ pkgdesc='Watch for changes in specified files'
+ depends=('kdebase-workspace')
+ cd $srcdir/build/applets/fileWatcher
+ make DESTDIR=$pkgdir install
+}
+
+package_kdeplasma-addons-applets-frame() {
+ pkgdesc='Display your favorite pictures'
+ depends=('kdebase-workspace' 'libkexiv2')
+ cd $srcdir/build/applets/frame
+ make DESTDIR=$pkgdir install
+}
+
+package_kdeplasma-addons-applets-fuzzy-clock() {
+ pkgdesc='Time displayed in a less precise format'
+ depends=('kdebase-workspace')
+ cd $srcdir/build/applets/fuzzy-clock
+ make DESTDIR=$pkgdir install
+}
+
+package_kdeplasma-addons-applets-incomingmsg() {
+ pkgdesc='Notification of new messages'
+ depends=('kdebase-workspace')
+ cd $srcdir/build/applets/incomingmsg
+ make DESTDIR=$pkgdir install
+}
+
+package_kdeplasma-addons-applets-kdeobservatory() {
+ pkgdesc='Visualize the KDE ecosystem'
+ depends=('kdebase-workspace' 'qwt')
+ install='kdeplasma-addons-applets.install'
+ cd $srcdir/build/applets/kdeobservatory
+ make DESTDIR=$pkgdir install
+}
+
+package_kdeplasma-addons-applets-kimpanel() {
+ pkgdesc='A generic input method panel for Oriental languages'
+ depends=('kdebase-workspace')
+ optdepends=('scim: SCIM backend'
+ 'fcitx: FCITX backend')
+ cd $srcdir/build/applets/kimpanel
+ make DESTDIR=$pkgdir install
+}
+
+package_kdeplasma-addons-applets-knowledgebase() {
+ pkgdesc='Opendesktop Knowledgebase'
+ depends=('kdebase-workspace')
+ cd $srcdir/build/applets/knowledgebase
+ make DESTDIR=$pkgdir install
+}
+
+package_kdeplasma-addons-applets-kolourpicker() {
+ pkgdesc='Pick a color from the desktop'
+ depends=('kdebase-workspace')
+ cd $srcdir/build/applets/kolourpicker
+ make DESTDIR=$pkgdir install
+}
+
+package_kdeplasma-addons-applets-konqprofiles() {
+ pkgdesc='List and launch Konqueror profiles'
+ depends=('kdebase-workspace')
+ cd $srcdir/build/applets/konqprofiles
+ make DESTDIR=$pkgdir install
+}
+
+package_kdeplasma-addons-applets-konsoleprofiles() {
+ pkgdesc='List and launch Konsole profiles'
+ depends=('kdebase-workspace')
+ cd $srcdir/build/applets/konsoleprofiles
+ make DESTDIR=$pkgdir install
+}
+
+package_kdeplasma-addons-applets-lancelot() {
+ pkgdesc='Launcher to start applications'
+ depends=('kdebase-workspace' 'kdeplasma-addons-libs')
+ replaces=('lancelot')
+ provides=('lancelot')
+ conflicts=('lancelot')
+ install='kdeplasma-addons-applets-lancelot.install'
+ cd $srcdir/build/applets/lancelot
+ make DESTDIR=$pkgdir install
+}
+
+package_kdeplasma-addons-applets-leavenote() {
+ pkgdesc='Leave notes for users while they are away'
+ depends=('kdebase-workspace')
+ cd $srcdir/build/applets/leavenote
+ make DESTDIR=$pkgdir install
+}
+
+package_kdeplasma-addons-applets-life() {
+ pkgdesc='Life'
+ depends=('kdebase-workspace')
+ install='kdeplasma-addons-applets.install'
+ cd $srcdir/build/applets/life
+ make DESTDIR=$pkgdir install
+}
+
+package_kdeplasma-addons-applets-luna() {
+ pkgdesc='Display moon phases for your location'
+ depends=('kdebase-workspace')
+ install='kdeplasma-addons-applets.install'
+ cd $srcdir/build/applets/luna
+ make DESTDIR=$pkgdir install
+}
+
+package_kdeplasma-addons-applets-magnifique() {
+ pkgdesc='A magnification glass for the Plasma desktop'
+ depends=('kdebase-workspace')
+ cd $srcdir/build/applets/magnifique
+ make DESTDIR=$pkgdir install
+}
+
+package_kdeplasma-addons-applets-mediaplayer() {
+ pkgdesc='Widget that can play video and sound'
+ depends=('kdebase-workspace')
+ cd $srcdir/build/applets/mediaplayer
+ make DESTDIR=$pkgdir install
+}
+
+package_kdeplasma-addons-applets-microblog() {
+ pkgdesc='Update and view your microblog status.'
+ depends=('kdebase-workspace' 'kdeplasma-addons-libs')
+ cd $srcdir/build/applets/microblog
+ make DESTDIR=$pkgdir install
+}
+
+package_kdeplasma-addons-applets-news() {
+ pkgdesc='Show news from various sources'
+ depends=('kdebase-workspace')
+ cd $srcdir/build/applets/news
+ make DESTDIR=$pkgdir install
+}
+
+package_kdeplasma-addons-applets-notes() {
+ pkgdesc='Desktop sticky notes'
+ depends=('kdebase-workspace')
+ cd $srcdir/build/applets/notes
+ make DESTDIR=$pkgdir install
+}
+
+package_kdeplasma-addons-applets-nowplaying() {
+ pkgdesc='Displays currently playing audio'
+ depends=('kdebase-workspace')
+ cd $srcdir/build/applets/nowplaying
+ make DESTDIR=$pkgdir install
+}
+
+package_kdeplasma-addons-applets-paste() {
+ pkgdesc='Paste text snippets'
+ depends=('kdebase-workspace')
+ cd $srcdir/build/applets/paste
+ make DESTDIR=$pkgdir install
+}
+
+package_kdeplasma-addons-applets-pastebin() {
+ pkgdesc='Paste text/images to a remote server'
+ depends=('kdebase-workspace')
+ cd $srcdir/build/applets/pastebin
+ make DESTDIR=$pkgdir install
+}
+
+package_kdeplasma-addons-applets-plasmaboard() {
+ pkgdesc='A virtual, on-screen keyboard'
+ depends=('kdebase-workspace')
+ cd $srcdir/build/applets/plasmaboard
+ make DESTDIR=$pkgdir install
+}
+
+package_kdeplasma-addons-applets-previewer() {
+ pkgdesc='Preview This File'
+ depends=('kdebase-workspace')
+ install='kdeplasma-addons-applets.install'
+ cd $srcdir/build/applets/previewer
+ make DESTDIR=$pkgdir install
+}
+
+package_kdeplasma-addons-applets-qalculate() {
+ pkgdesc='A powerful mathematical equation solver'
+ depends=('kdebase-workspace')
+ install='kdeplasma-addons-applets.install'
+ cd $srcdir/build/applets/qalculate
+ make DESTDIR=$pkgdir install
+}
+
+package_kdeplasma-addons-applets-rememberthemilk() {
+ pkgdesc='Remember The Milk Todo list applet'
+ depends=('kdebase-workspace' 'kdeplasma-addons-libs')
+ cd $srcdir/build/applets/rememberthemilk
+ make DESTDIR=$pkgdir install
+}
+
+package_kdeplasma-addons-applets-rssnow() {
+ pkgdesc='Show news from various sources'
+ depends=('kdebase-workspace')
+ cd $srcdir/build/applets/rssnow
+ make DESTDIR=$pkgdir install
+}
+
+package_kdeplasma-addons-applets-showdashboard() {
+ pkgdesc='Show the Plasma widget dashboard above other windows'
+ depends=('kdebase-workspace')
+ cd $srcdir/build/applets/showdashboard
+ make DESTDIR=$pkgdir install
+}
+
+package_kdeplasma-addons-applets-showdesktop() {
+ pkgdesc='Show the Plasma desktop'
+ depends=('kdebase-workspace')
+ cd $srcdir/build/applets/showdesktop
+ make DESTDIR=$pkgdir install
+}
+
+package_kdeplasma-addons-applets-social-news() {
+ pkgdesc='Stay informed with the Social Desktop'
+ replaces=('kdeplasma-addons-applets-opendesktop' 'kdeplasma-addons-applets-opendesktop-activities')
+ conflicts=('kdeplasma-addons-applets-opendesktop' 'kdeplasma-addons-applets-opendesktop-activities')
+ depends=('kdebase-workspace')
+ cd $srcdir/build/applets/social-news
+ make DESTDIR=$pkgdir install
+}
+
+package_kdeplasma-addons-applets-spellcheck() {
+ pkgdesc='Fast spell checking'
+ depends=('kdebase-workspace')
+ cd $srcdir/build/applets/spellcheck
+ make DESTDIR=$pkgdir install
+}
+
+package_kdeplasma-addons-applets-systemloadviewer() {
+ pkgdesc='Tiny CPU/RAM/Swap monitor'
+ depends=('kdebase-workspace')
+ cd $srcdir/build/applets/systemloadviewer
+ make DESTDIR=$pkgdir install
+}
+
+package_kdeplasma-addons-applets-timer() {
+ pkgdesc='Countdown over a specified time period'
+ depends=('kdebase-workspace')
+ cd $srcdir/build/applets/timer
+ make DESTDIR=$pkgdir install
+}
+
+package_kdeplasma-addons-applets-unitconverter() {
+ pkgdesc='Plasmoid for converting units'
+ depends=('kdebase-workspace' 'kdeplasma-addons-libs')
+ cd $srcdir/build/applets/unitconverter
+ make DESTDIR=$pkgdir install
+}
+
+package_kdeplasma-addons-applets-weather() {
+ pkgdesc='Displays Weather information'
+ depends=('kdebase-workspace' 'kdeplasma-addons-libs')
+ cd $srcdir/build/applets/weather
+ make DESTDIR=$pkgdir install
+}
+
+package_kdeplasma-addons-applets-weatherstation() {
+ pkgdesc='Weather reports with an LCD display style'
+ depends=('kdebase-workspace' 'kdeplasma-addons-libs')
+ cd $srcdir/build/applets/weatherstation
+ make DESTDIR=$pkgdir install
+}
+
+package_kdeplasma-addons-applets-webslice() {
+ pkgdesc='Show a part of a webpage'
+ depends=('kdebase-workspace' 'kdeplasma-addons-libs')
+ cd $srcdir/build/applets/webslice
+ make DESTDIR=$pkgdir install
+}
+
+package_kdeplasma-addons-containments() {
+ pkgdesc='Activities types for Plasma shells'
+ depends=('kdebase-workspace')
+ cd $srcdir/build/containments
+ make DESTDIR=$pkgdir install
+}
+
+package_kdeplasma-addons-libs() {
+ pkgdesc='Plasma Addon Library'
+ depends=('kdebase-workspace')
+ groups=()
+ replaces=('kdeplasma-addons-dataengines')
+ provides=('kdeplasma-addons-dataengines')
+ conflicts=('kdeplasma-addons-dataengines')
+ cd $srcdir/build/libs
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/dataengines
+ make DESTDIR=$pkgdir install
+}
+
+package_kdeplasma-addons-runners-audioplayercontrol() {
+ pkgdesc='Allows to control MPRIS audio players (it is able to search through Amarok´s collection, too)'
+ depends=('kdebase-workspace')
+ cd $srcdir/build/runners/audioplayercontrol
+ make DESTDIR=$pkgdir install
+}
+
+package_kdeplasma-addons-runners-browserhistory() {
+ pkgdesc='Searches in Konqueror´s history'
+ depends=('kdebase-workspace')
+ cd $srcdir/build/runners/browserhistory
+ make DESTDIR=$pkgdir install
+}
+
+package_kdeplasma-addons-runners-characters() {
+ pkgdesc='special Characters'
+ depends=('kdebase-workspace')
+ cd $srcdir/build/runners/characters
+ make DESTDIR=$pkgdir install
+}
+
+package_kdeplasma-addons-runners-contacts() {
+ pkgdesc='Finds entries in your address book'
+ depends=('kdebase-workspace')
+ cd $srcdir/build/runners/contacts
+ make DESTDIR=$pkgdir install
+}
+
+package_kdeplasma-addons-runners-converter() {
+ pkgdesc='Convert values to different units'
+ depends=('kdebase-workspace' 'kdeplasma-addons-libs')
+ cd $srcdir/build/runners/converter
+ make DESTDIR=$pkgdir install
+}
+
+package_kdeplasma-addons-runners-datetime() {
+ pkgdesc='The current date and time, locally or in any timezone'
+ depends=('kdebase-workspace')
+ cd $srcdir/build/runners/datetime
+ make DESTDIR=$pkgdir install
+}
+
+package_kdeplasma-addons-runners-events() {
+ pkgdesc='Calendar Events runner'
+ depends=('kdebase-workspace')
+ cd $srcdir/build/runners/events
+ make DESTDIR=$pkgdir install
+}
+
+package_kdeplasma-addons-runners-katesessions() {
+ pkgdesc='Matches Kate Sessions'
+ depends=('kdebase-workspace')
+ cd $srcdir/build/runners/katesessions
+ make DESTDIR=$pkgdir install
+}
+
+package_kdeplasma-addons-runners-konquerorsessions() {
+ pkgdesc='Matches Konqueror Sessions'
+ depends=('kdebase-workspace')
+ cd $srcdir/build/runners/konquerorsessions
+ make DESTDIR=$pkgdir install
+}
+
+package_kdeplasma-addons-runners-konsolesessions() {
+ pkgdesc='Matches Konsole Sessions'
+ depends=('kdebase-workspace')
+ cd $srcdir/build/runners/konsolesessions
+ make DESTDIR=$pkgdir install
+}
+
+package_kdeplasma-addons-runners-kopete() {
+ pkgdesc='Kopete Contact runner'
+ depends=('kdebase-workspace')
+ cd $srcdir/build/runners/kopete
+ make DESTDIR=$pkgdir install
+}
+
+package_kdeplasma-addons-runners-mediawiki() {
+ pkgdesc='Search on Wikitravel'
+ depends=('kdebase-workspace')
+ cd $srcdir/build/runners/mediawiki
+ make DESTDIR=$pkgdir install
+}
+
+package_kdeplasma-addons-runners-spellchecker() {
+ pkgdesc='Check the spelling of a word'
+ depends=('kdebase-workspace')
+ cd $srcdir/build/runners/spellchecker
+ make DESTDIR=$pkgdir install
+}
+
+package_kdeplasma-addons-wallpapers-mandelbrot() {
+ pkgdesc='Mandelbrot'
+ depends=('kdebase-workspace')
+ cd $srcdir/build/wallpapers/mandelbrot
+ make DESTDIR=$pkgdir install
+}
+
+package_kdeplasma-addons-wallpapers-marble() {
+ pkgdesc='Globe'
+ depends=('kdebase-workspace' 'kdeedu-marble')
+ cd $srcdir/build/wallpapers/marble
+ make DESTDIR=$pkgdir install
+}
+
+package_kdeplasma-addons-wallpapers-pattern() {
+ pkgdesc='Pattern'
+ depends=('kdebase-workspace')
+ cd $srcdir/build/wallpapers/pattern
+ make DESTDIR=$pkgdir install
+}
+
+package_kdeplasma-addons-wallpapers-virus() {
+ pkgdesc='Virus'
+ depends=('kdebase-workspace')
+ cd $srcdir/build/wallpapers/virus
+ make DESTDIR=$pkgdir install
+}
+
+package_kdeplasma-addons-wallpapers-weather() {
+ pkgdesc='Weather'
+ depends=('kdebase-workspace' 'kdeplasma-addons-libs')
+ cd $srcdir/build/wallpapers/weather
+ make DESTDIR=$pkgdir install
+}
diff --git a/kde-unstable/kdeplasma-addons/kdeplasma-addons-applets-lancelot.install b/kde-unstable/kdeplasma-addons/kdeplasma-addons-applets-lancelot.install
new file mode 100644
index 000000000..ce5c32e1b
--- /dev/null
+++ b/kde-unstable/kdeplasma-addons/kdeplasma-addons-applets-lancelot.install
@@ -0,0 +1,12 @@
+post_install() {
+ xdg-icon-resource forceupdate --theme hicolor &> /dev/null
+ update-mime-database usr/share/mime &> /dev/null
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+} \ No newline at end of file
diff --git a/kde-unstable/kdeplasma-addons/kdeplasma-addons-applets.install b/kde-unstable/kdeplasma-addons/kdeplasma-addons-applets.install
new file mode 100644
index 000000000..c4ef46ba8
--- /dev/null
+++ b/kde-unstable/kdeplasma-addons/kdeplasma-addons-applets.install
@@ -0,0 +1,11 @@
+post_install() {
+ xdg-icon-resource forceupdate --theme hicolor &> /dev/null
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+} \ No newline at end of file
diff --git a/kde-unstable/kdesdk-kate/PKGBUILD b/kde-unstable/kdesdk-kate/PKGBUILD
new file mode 100644
index 000000000..c64df1df3
--- /dev/null
+++ b/kde-unstable/kdesdk-kate/PKGBUILD
@@ -0,0 +1,58 @@
+# $Id: PKGBUILD 124689 2011-05-23 21:22:48Z andrea $
+# Maintainer: Andrea Scarpino <andrea@archlinux.org>
+
+pkgbase=kdesdk-kate
+pkgname=('kdebase-kwrite'
+ 'kdesdk-kate')
+pkgver=4.6.80
+pkgrel=1
+arch=('i686' 'x86_64')
+license=('GPL' 'LGPL' 'FDL')
+makedepends=('kdelibs ''cmake' 'automoc4')
+source=("http://download.kde.org/unstable/${pkgver}/src/kate-${pkgver}.tar.bz2"
+ 'pkgbuild-syntax-highlight.patch')
+sha1sums=('9c95690b9f967a0ed52afcf6c4d7ace3ef9284ff'
+ 'ab0c5d2a796b0f283154799add161c99f48ffcd5')
+
+build() {
+ cd "${srcdir}"/kate-${pkgver}
+ patch -p1 -i "${srcdir}"/pkgbuild-syntax-highlight.patch
+
+ cd "${srcdir}"
+ mkdir build
+ cd build
+ cmake ../kate-${pkgver} \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DBUILD_KTEXTEDITOR=OFF
+ make
+}
+
+package_kdebase-kwrite() {
+ pkgdesc="Text Editor"
+ depends=('kdebase-runtime')
+ groups=('kde' 'kdebase')
+ install='kdebase-kwrite.install'
+
+ cd "${srcdir}"/build/kwrite
+ make DESTDIR="${pkgdir}" install
+
+ cd "${srcdir}"/build/part
+ make DESTDIR="${pkgdir}" install
+
+ cd "${srcdir}"/build/doc/kwrite
+ make DESTDIR="${pkgdir}" install
+}
+
+package_kdesdk-kate() {
+ pkgdesc="Advanced Text Editor"
+ depends=('kdebase-kwrite')
+ groups=('kde' 'kdesdk')
+ install='kdesdk-kate.install'
+
+ cd "${srcdir}"/build/kate
+ make DESTDIR="${pkgdir}" install
+
+ cd "${srcdir}"/build/doc/kate
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/kde-unstable/kdesdk-kate/kdebase-kwrite.install b/kde-unstable/kdesdk-kate/kdebase-kwrite.install
new file mode 100644
index 000000000..81ce5c4b0
--- /dev/null
+++ b/kde-unstable/kdesdk-kate/kdebase-kwrite.install
@@ -0,0 +1,12 @@
+post_install() {
+ xdg-icon-resource forceupdate --theme hicolor &> /dev/null
+ update-desktop-database -q
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
diff --git a/kde-unstable/kdesdk-kate/kdesdk-kate.install b/kde-unstable/kdesdk-kate/kdesdk-kate.install
new file mode 100644
index 000000000..81ce5c4b0
--- /dev/null
+++ b/kde-unstable/kdesdk-kate/kdesdk-kate.install
@@ -0,0 +1,12 @@
+post_install() {
+ xdg-icon-resource forceupdate --theme hicolor &> /dev/null
+ update-desktop-database -q
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
diff --git a/kde-unstable/kdesdk-kate/pkgbuild-syntax-highlight.patch b/kde-unstable/kdesdk-kate/pkgbuild-syntax-highlight.patch
new file mode 100644
index 000000000..3c43eca0f
--- /dev/null
+++ b/kde-unstable/kdesdk-kate/pkgbuild-syntax-highlight.patch
@@ -0,0 +1,11 @@
+--- kate-4.6.80/part/syntax/data/bash.xml~ 2011-05-23 21:20:34.295137123 +0000
++++ kate-4.6.80/part/syntax/data/bash.xml 2011-05-23 21:20:54.581993368 +0000
+@@ -8,7 +8,7 @@
+ <!ENTITY noword "(?![\w$+-])"> <!-- no word, $, + or - following -->
+ <!ENTITY pathpart "([\w_@.&#37;*?+-]|\\ )"> <!-- valid character in a file name -->
+ ]>
+-<language name="Bash" version="2.12" kateversion="2.4" section="Scripts" extensions="*.sh;*.bash;*.ebuild;*.eclass;.bashrc;.bash_profile;.bash_login;.profile" mimetype="application/x-shellscript" casesensitive="1" author="Wilbert Berendsen (wilbert@kde.nl)" license="LGPL">
++<language name="Bash" version="2.12" kateversion="2.4" section="Scripts" extensions="*.sh;*.bash;*.ebuild;*.eclass;.bashrc;.bash_profile;.bash_login;.profile;PKGBUILD" mimetype="application/x-shellscript" casesensitive="1" author="Wilbert Berendsen (wilbert@kde.nl)" license="LGPL">
+
+ <!-- (c) 2004 by Wilbert Berendsen (wilbert@kde.nl)
+ Changes by Matthew Woehlke (mw_triad@users.sourceforge.net)
diff --git a/kde-unstable/kdesdk/PKGBUILD b/kde-unstable/kdesdk/PKGBUILD
new file mode 100644
index 000000000..c01ad1d6e
--- /dev/null
+++ b/kde-unstable/kdesdk/PKGBUILD
@@ -0,0 +1,247 @@
+# $Id: PKGBUILD 124846 2011-05-24 18:38:10Z andrea $
+# Maintainer: Andrea Scarpino <andrea@archlinux.org>
+# Contributor: Pierre Schmitz <pierre@archlinux.de>
+
+pkgbase=kdesdk
+pkgname=('kdesdk-cervisia'
+ 'kdesdk-dolphin-plugins'
+ 'kdesdk-kapptemplate'
+ 'kdesdk-kcachegrind'
+ 'kdesdk-kdeaccounts-plugin'
+ 'kdesdk-kdepalettes'
+ 'kdesdk-kioslave'
+ 'kdesdk-kmtrace'
+ 'kdesdk-kompare'
+ 'kdesdk-kpartloader'
+ 'kdesdk-kprofilemethod'
+# 'kdesdk-kspy'
+ 'kdesdk-kstartperf'
+ 'kdesdk-kuiviewer'
+ 'kdesdk-lokalize'
+ 'kdesdk-okteta'
+ 'kdesdk-poxml'
+# 'kdesdk-scheck'
+ 'kdesdk-scripts'
+ 'kdesdk-strigi-analyzer'
+ 'kdesdk-umbrello')
+pkgver=4.6.80
+pkgrel=1
+arch=('i686' 'x86_64')
+url='http://www.kde.org'
+license=('GPL' 'LGPL' 'FDL')
+groups=('kde' 'kdesdk')
+makedepends=('pkgconfig' 'cmake' 'automoc4' 'boost' 'subversion' 'antlr2'
+ 'kdepimlibs' 'kdebase-lib')
+source=("http://download.kde.org/unstable/${pkgver}/src/${pkgbase}-${pkgver}.tar.bz2"
+ 'fix-python2-path.patch')
+sha1sums=('2193e14b8373b833221dbf08ecdb0075e86abe44'
+ 'd05ca0231869c484fd3861955d960a60aff7dcfb')
+
+build() {
+ cd ${srcdir}/${pkgbase}-${pkgver}
+
+ # Fix python2 path
+ patch -Np1 -i ${srcdir}/fix-python2-path.patch
+ sed -i -e "s|#![ ]*/usr/bin/python$|#!/usr/bin/python2|" \
+ -e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" \
+ $(find . -name '*.py')
+
+ cd ${srcdir}
+ mkdir build
+ cd build
+ cmake ../${pkgbase}-${pkgver} \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_SKIP_RPATH=ON \
+ -DCMAKE_INSTALL_PREFIX=/usr
+ make
+}
+
+package_kdesdk-cervisia() {
+ pkgdesc='CVS Frontend'
+ depends=('kdebase-runtime')
+ url="http://kde.org/applications/development/cervisia/"
+ install='kdesdk.install'
+ cd $srcdir/build/cervisia
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/cervisia
+ make DESTDIR=$pkgdir install
+}
+
+package_kdesdk-dolphin-plugins() {
+ pkgdesc='Extra Dolphin plugins'
+ depends=('kdebase-dolphin' 'subversion' 'git' 'kdesdk-kompare')
+ install='kdesdk.install'
+ cd $srcdir/build/dolphin-plugins/git
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/dolphin-plugins/svn
+ make DESTDIR=$pkgdir install
+}
+
+package_kdesdk-kapptemplate() {
+ pkgdesc='KDE Template Generator'
+ depends=('kdebase-runtime')
+ url="http://kde.org/applications/development/kapptemplate/"
+ install='kdesdk.install'
+ cd $srcdir/build/kapptemplate
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/kapptemplate
+ make DESTDIR=$pkgdir install
+}
+
+package_kdesdk-kcachegrind() {
+ pkgdesc='Visualization of Performance Profiling Data'
+ depends=('kdebase-runtime' 'python2')
+ optdepends=('php: PHP support')
+ url="http://kde.org/applications/development/kcachegrind/"
+ install='kdesdk.install'
+ cd $srcdir/build/kcachegrind
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/kcachegrind
+ make DESTDIR=$pkgdir install
+}
+
+package_kdesdk-kdeaccounts-plugin() {
+ pkgdesc='KDE Repository Accounts'
+ depends=('kdepim-runtime')
+ cd $srcdir/build/kdeaccounts-plugin
+ make DESTDIR=$pkgdir install
+}
+
+package_kdesdk-kdepalettes() {
+ pkgdesc='Palettes for the Gimp that match the KDE standard color palette'
+ optdepends=('gimp')
+ install -D -m644 $srcdir/${pkgbase}-${pkgver}/kdepalettes/KDE_Gimp \
+ $pkgdir/usr/share/gimp/2.0/palettes/KDE.gpl
+}
+
+package_kdesdk-kioslave() {
+ pkgdesc='KDED Subversion Module'
+ depends=('kdebase-runtime' 'subversion')
+ cd $srcdir/build/kioslave
+ make DESTDIR=$pkgdir install
+}
+
+package_kdesdk-kmtrace() {
+ pkgdesc='A KDE tool to assist with malloc debugging using glibc´s "mtrace" functionality'
+ depends=('kdebase-runtime')
+ cd $srcdir/build/kmtrace
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/kmtrace
+ make DESTDIR=$pkgdir install
+}
+
+package_kdesdk-kompare() {
+ pkgdesc='Diff/Patch Frontend'
+ depends=('kdebase-runtime')
+ url="http://kde.org/applications/development/kompare/"
+ install='kdesdk.install'
+ cd $srcdir/build/kompare
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/kompare
+ make DESTDIR=$pkgdir install
+}
+
+package_kdesdk-kpartloader() {
+ pkgdesc='A test application for KParts'
+ depends=('kdebase-runtime')
+ install='kdesdk.install'
+ cd $srcdir/build/kpartloader
+ make DESTDIR=$pkgdir install
+}
+
+package_kdesdk-kprofilemethod() {
+ pkgdesc='Macros helping to profile'
+ cd $srcdir/build/kprofilemethod
+ make DESTDIR=$pkgdir install
+}
+
+package_kdesdk-kspy() {
+ pkgdesc='An Object Inspector for Qt/KDE applications'
+ depends=('kdebase-runtime')
+ cd $srcdir/build/kspy
+ make DESTDIR=$pkgdir install
+}
+
+package_kdesdk-kstartperf() {
+ pkgdesc='Startup time measurement tool for KDE applications'
+ depends=('kdebase-runtime')
+ cd $srcdir/build/kstartperf
+ make DESTDIR=$pkgdir install
+}
+
+package_kdesdk-kuiviewer() {
+ pkgdesc='Qt Designer UI File Viewer'
+ depends=('kdebase-runtime')
+ url="http://kde.org/applications/development/kuiviewer/"
+ install='kdesdk.install'
+ cd $srcdir/build/kuiviewer
+ make DESTDIR=$pkgdir install
+}
+
+package_kdesdk-lokalize() {
+ pkgdesc='Computer-Aided Translation System'
+ depends=('kdebase-runtime' 'kdebindings-python')
+ url="http://kde.org/applications/development/lokalize/"
+ optdepends=('translate-toolkit: enable extra python script')
+ install='kdesdk.install'
+ cd $srcdir/build/lokalize
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/lokalize
+ make DESTDIR=$pkgdir install
+}
+
+package_kdesdk-okteta() {
+ pkgdesc='Hex Editor'
+ depends=('kdebase-runtime')
+ replaces=('kdeutils-okteta')
+ conflicts=('kdeutils-okteta')
+ url="http://kde.org/applications/utilities/okteta"
+ install='kdesdk-okteta.install'
+ cd $srcdir/build/okteta
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/okteta
+ make DESTDIR=$pkgdir install
+}
+
+package_kdesdk-poxml() {
+ pkgdesc='Translates DocBook XML files using gettext po files'
+ depends=('qt' 'antlr2')
+ cd $srcdir/build/poxml
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/poxml
+ make DESTDIR=$pkgdir install
+}
+
+package_kdesdk-scheck() {
+ pkgdesc='An interface style to highlight accel and style guide conflicts'
+ depends=('kdebase-runtime')
+ cd $srcdir/build/scheck
+ make DESTDIR=$pkgdir install
+}
+
+package_kdesdk-scripts() {
+ pkgdesc='KDE SDK scripts'
+ depends=('python2')
+ cd $srcdir/build/scripts
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/scripts
+ make DESTDIR=$pkgdir install
+}
+
+package_kdesdk-strigi-analyzer() {
+ pkgdesc='Strigi-Analyzer for KDE SDK'
+ depends=('kdelibs')
+ cd $srcdir/build/strigi-analyzer
+ make DESTDIR=$pkgdir install
+}
+
+package_kdesdk-umbrello() {
+ pkgdesc='UML Modeller'
+ depends=('kdebase-runtime')
+ url="http://kde.org/applications/development/umbrello/"
+ install='kdesdk.install'
+ cd $srcdir/build/umbrello
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/umbrello
+ make DESTDIR=$pkgdir install
+}
diff --git a/kde-unstable/kdesdk/fix-python2-path.patch b/kde-unstable/kdesdk/fix-python2-path.patch
new file mode 100644
index 000000000..c2c0745d1
--- /dev/null
+++ b/kde-unstable/kdesdk/fix-python2-path.patch
@@ -0,0 +1,64 @@
+--- kdesdk-4.5.80/kcachegrind/converters/hotshot2calltree~ 2010-11-24 11:53:38.586666671 +0100
++++ kdesdk-4.5.80/kcachegrind/converters/hotshot2calltree 2010-11-24 11:53:38.623333337 +0100
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+ # _*_ coding: latin1 _*_
+
+ #
+--- kdesdk-4.5.80/lokalize/scripts/msgmerge.py~ 2010-11-24 11:22:42.120000002 +0100
++++ kdesdk-4.5.80/lokalize/scripts/msgmerge.py 2010-11-24 11:22:42.146666670 +0100
+@@ -114,7 +114,7 @@
+ print >>sys.stderr, "Execution failed:", e
+
+ cmd='%s/odf/xliffmerge.py -i %s -t %s -o %s' % (ourPath,xliffpathname,xlifftemplatepathname,xliffpathname)
+- if os.name!='nt': cmd='python '+cmd
++ if os.name!='nt': cmd='python2 '+cmd
+ else: cmd=cmd.replace('/','\\')
+ os.system(cmd)
+
+--- kdesdk-4.5.80/lokalize/scripts/xliff2odf.py~ 2010-11-24 11:24:10.853333336 +0100
++++ kdesdk-4.5.80/lokalize/scripts/xliff2odf.py 2010-11-24 11:24:10.883333336 +0100
+@@ -42,7 +42,7 @@
+ xliff2odf.convertxliff(xliffinput, translatedodfpathname, odf)
+
+ ourpath=([p for p in sys.path if os.path.exists(p+'/xliff2odf.py')]+[''])[0]
+- os.system('python "'+ourpath+'/xliff2odf-standalone.py" "%s" "%s" &'%(translatedodfpathname, Editor.currentEntryId()))
++ os.system('python2 "'+ourpath+'/xliff2odf-standalone.py" "%s" "%s" &'%(translatedodfpathname, Editor.currentEntryId()))
+
+ try: convert()
+ except: print 'error occured'
+--- kdesdk-4.5.80/scripts/rename_source_files~ 2010-11-24 11:45:41.040000004 +0100
++++ kdesdk-4.5.80/scripts/rename_source_files 2010-11-24 11:45:41.093333336 +0100
+@@ -1,4 +1,4 @@
+-#! /usr/bin/env python
++#! /usr/bin/env python2
+ #
+ # Copyright David Faure <faure@kde.org>, License LGPL v2
+ #
+--- kdesdk-4.5.80/scripts/svn2log.sh~ 2010-11-24 11:46:24.863333337 +0100
++++ kdesdk-4.5.80/scripts/svn2log.sh 2010-11-24 11:46:24.896666669 +0100
+@@ -17,6 +17,6 @@
+ svn cat svn://anonsvn.kde.org/home/kde/trunk/kde-common/accounts > /tmp/accounts.$PPID
+
+ echo "Creating changelog...";
+-svn log -v --xml $1 | python $CURRENT/svn2log.py --users=/tmp/accounts.$PPID --users-charset=UTF8
++svn log -v --xml $1 | python2 $CURRENT/svn2log.py --users=/tmp/accounts.$PPID --users-charset=UTF8
+
+ rm /tmp/accounts.$PPID
+--- kdesdk-4.5.80/scripts/kde_generate_export_header~ 2010-11-24 11:48:49.696666669 +0100
++++ kdesdk-4.5.80/scripts/kde_generate_export_header 2010-11-24 11:48:49.753333338 +0100
+@@ -1,4 +1,4 @@
+-#! /usr/bin/env python
++#! /usr/bin/env python2
+
+ import os, sys, string
+
+--- kdesdk-4.5.80/scripts/reviewboarddiff~ 2010-11-24 11:49:37.686666670 +0100
++++ kdesdk-4.5.80/scripts/reviewboarddiff 2010-11-24 11:49:37.740000003 +0100
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python2
+ # encoding: utf-8
+ #
+ # Generates reviewboard compatible diffs from git-svn repositories.
diff --git a/kde-unstable/kdesdk/kdesdk-okteta.install b/kde-unstable/kdesdk/kdesdk-okteta.install
new file mode 100644
index 000000000..3f06b8deb
--- /dev/null
+++ b/kde-unstable/kdesdk/kdesdk-okteta.install
@@ -0,0 +1,12 @@
+post_install() {
+ xdg-icon-resource forceupdate --theme hicolor &> /dev/null
+ update-mime-database usr/share/mime &> /dev/null
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
diff --git a/kde-unstable/kdesdk/kdesdk.install b/kde-unstable/kdesdk/kdesdk.install
new file mode 100644
index 000000000..e70c054ec
--- /dev/null
+++ b/kde-unstable/kdesdk/kdesdk.install
@@ -0,0 +1,11 @@
+post_install() {
+ xdg-icon-resource forceupdate --theme hicolor &> /dev/null
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
diff --git a/kde-unstable/kdetoys/PKGBUILD b/kde-unstable/kdetoys/PKGBUILD
new file mode 100644
index 000000000..1eba40691
--- /dev/null
+++ b/kde-unstable/kdetoys/PKGBUILD
@@ -0,0 +1,56 @@
+# $Id: PKGBUILD 124780 2011-05-24 12:05:42Z andrea $
+# Maintainer: Andrea Scarpino <andrea@archlinux.org>
+# Contributor: Pierre Schmitz <pierre@archlinux.de>
+
+pkgbase=kdetoys
+pkgname=('kdetoys-amor'
+ 'kdetoys-kteatime'
+ 'kdetoys-ktux')
+pkgver=4.6.80
+pkgrel=1
+arch=('i686' 'x86_64')
+url='http://www.kde.org'
+license=('GPL' 'LGPL' 'FDL')
+groups=('kde' 'kdetoys')
+makedepends=('pkgconfig' 'cmake' 'automoc4' 'kdebase-workspace')
+source=("http://download.kde.org/unstable/${pkgver}/src/${pkgbase}-${pkgver}.tar.bz2")
+sha1sums=('b268bb38f84199d33d3be1fe3e0389c0abb35e69')
+
+build() {
+ cd $srcdir
+ mkdir build
+ cd build
+ cmake ../${pkgbase}-${pkgver} \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_SKIP_RPATH=ON \
+ -DCMAKE_INSTALL_PREFIX=/usr
+ make
+}
+
+package_kdetoys-amor() {
+ pkgdesc='On-Screen Creature'
+ depends=('kdebase-runtime')
+ install='kdetoys.install'
+ cd $srcdir/build/amor
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/amor
+ make DESTDIR=$pkgdir install
+}
+
+package_kdetoys-kteatime() {
+ pkgdesc='Tea Cooker'
+ depends=('kdebase-runtime')
+ install='kdetoys.install'
+ cd $srcdir/build/kteatime
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/kteatime
+ make DESTDIR=$pkgdir install
+}
+
+package_kdetoys-ktux() {
+ pkgdesc='KTux'
+ depends=('kdebase-workspace' )
+ install='kdetoys.install'
+ cd $srcdir/build/ktux
+ make DESTDIR=$pkgdir install
+}
diff --git a/kde-unstable/kdetoys/kdetoys.install b/kde-unstable/kdetoys/kdetoys.install
new file mode 100644
index 000000000..e70c054ec
--- /dev/null
+++ b/kde-unstable/kdetoys/kdetoys.install
@@ -0,0 +1,11 @@
+post_install() {
+ xdg-icon-resource forceupdate --theme hicolor &> /dev/null
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
diff --git a/kde-unstable/kdeutils/PKGBUILD b/kde-unstable/kdeutils/PKGBUILD
new file mode 100644
index 000000000..89915c6f6
--- /dev/null
+++ b/kde-unstable/kdeutils/PKGBUILD
@@ -0,0 +1,180 @@
+# $Id: PKGBUILD 124777 2011-05-24 11:52:41Z andrea $
+# Maintainer: Andrea Scarpino <andrea@archlinux.org>
+# Contributor: Pierre Schmitz <pierre@archlinux.de>
+
+pkgbase=kdeutils
+pkgname=('kdeutils-ark'
+ 'kdeutils-filelight'
+ 'kdeutils-kcalc'
+ 'kdeutils-kcharselect'
+ 'kdeutils-kdf'
+ 'kdeutils-kfloppy'
+ 'kdeutils-kgpg'
+ 'kdeutils-kremotecontrol'
+ 'kdeutils-ktimer'
+ 'kdeutils-kwallet'
+ 'kdeutils-printer-applet'
+ 'kdeutils-superkaramba'
+ 'kdeutils-sweeper')
+pkgver=4.6.80
+pkgrel=1
+arch=('i686' 'x86_64')
+url='http://www.kde.org'
+license=('GPL' 'LGPL' 'FDL')
+groups=('kde' 'kdeutils')
+makedepends=('pkgconfig' 'cmake' 'automoc4' 'kdebase-lib' 'kdebase-workspace'
+ 'kdebindings-python' 'system-config-printer-common' 'libarchive' 'qimageblitz'
+ 'qjson')
+source=("http://download.kde.org/unstable/${pkgver}/src/${pkgbase}-${pkgver}.tar.bz2")
+sha1sums=('90b5e5bd95ec2de2d36db20c6155d23dbeab2d60')
+
+build() {
+ cd ${srcdir}
+ mkdir build
+ cd build
+ cmake ../${pkgbase}-${pkgver} \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_SKIP_RPATH=ON \
+ -DCMAKE_INSTALL_PREFIX=/usr
+ make
+}
+
+package_kdeutils-ark() {
+ pkgdesc='Archiving Tool'
+ depends=('kdebase-runtime' 'kdebase-lib' 'libarchive')
+ optdepends=('p7zip' 'zip' 'unzip' 'unrar')
+ url="http://kde.org/applications/utilities/ark/"
+ cd $srcdir/build/ark
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/ark
+ make DESTDIR=$pkgdir install
+}
+
+package_kdeutils-filelight() {
+ pkgdesc='View disk usage information'
+ depends=('kdebase-runtime' 'qimageblitz')
+ replaces=('filelight')
+ conflicts=('filelight')
+ install='kdeutils.install'
+ url="http://methylblue.com/filelight/"
+ cd $srcdir/build/filelight
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/filelight
+ make DESTDIR=$pkgdir install
+}
+
+package_kdeutils-kcalc() {
+ pkgdesc='Scientific Calculator'
+ depends=('kdebase-runtime')
+ url="http://kde.org/applications/utilities/kcalc/"
+ cd $srcdir/build/kcalc
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/kcalc
+ make DESTDIR=$pkgdir install
+}
+
+package_kdeutils-kcharselect() {
+ pkgdesc='Character Selector'
+ depends=('kdebase-runtime')
+ url="http://kde.org/applications/utilities/kcharselect/"
+ cd $srcdir/build/kcharselect
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/kcharselect
+ make DESTDIR=$pkgdir install
+}
+
+package_kdeutils-kdf() {
+ pkgdesc='View Disk Usage'
+ depends=('kdebase-runtime')
+ url="http://kde.org/applications/system/kdiskfree/"
+ install='kdeutils.install'
+ cd $srcdir/build/kdf
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/kdf
+ make DESTDIR=$pkgdir install
+}
+
+package_kdeutils-kfloppy() {
+ pkgdesc='Floppy Formatter'
+ depends=('kdebase-runtime')
+ url="http://kde.org/applications/utilities/kfloppy/"
+ install='kdeutils.install'
+ cd $srcdir/build/kfloppy
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/kfloppy
+ make DESTDIR=$pkgdir install
+}
+
+package_kdeutils-kgpg() {
+ pkgdesc='A GnuPG frontend'
+ depends=('kdepim-runtime' 'kde-agent')
+ url="http://kde.org/applications/utilities/kgpg"
+ install='kdeutils.install'
+ cd $srcdir/build/kgpg
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/kgpg
+ make DESTDIR=$pkgdir install
+}
+
+package_kdeutils-kremotecontrol() {
+ pkgdesc='Configure your remote controls for use with applications'
+ replaces=('kdeutils-kdelirc')
+ conflicts=('kdeutils-kdelirc')
+ depends=('kdebase-workspace')
+ url="http://kde.org/applications/utilities/kremotecontrol"
+ install='kdeutils.install'
+ cd $srcdir/build/kremotecontrol
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/kcontrol/kremotecontrol
+ make DESTDIR=$pkgdir install
+}
+
+package_kdeutils-ktimer() {
+ pkgdesc='Countdown Launcher'
+ depends=('kdebase-runtime')
+ url="http://kde.org/applications/utilities/ktimer"
+ install='kdeutils.install'
+ cd $srcdir/build/ktimer
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/ktimer
+ make DESTDIR=$pkgdir install
+}
+
+package_kdeutils-kwallet() {
+ pkgdesc='Wallet Management Tool'
+ depends=('kdebase-runtime')
+ url="http://kde.org/applications/system/kwalletmanager/"
+ install='kdeutils.install'
+ cd $srcdir/build/kwallet
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/kwallet
+ make DESTDIR=$pkgdir install
+}
+
+package_kdeutils-printer-applet() {
+ pkgdesc='System tray icon for managing print jobs'
+ depends=('kdebase-runtime' 'kdebindings-python' 'system-config-printer-common')
+ url="http://kde.org/applications/system/printerapplet/"
+ cd $srcdir/build/printer-applet
+ make DESTDIR=$pkgdir install
+
+ # Use the python2 executable
+ find "${pkgdir}" -name '*.py' | xargs sed -i 's|#!/usr/bin/env python|#!/usr/bin/env python2|'
+}
+
+package_kdeutils-superkaramba() {
+ pkgdesc='An engine for cool desktop eyecandy'
+ depends=('kdebase-runtime' 'kdebindings-python' 'qimageblitz')
+ url="http://kde.org/applications/utilities/superkaramba"
+ install='kdeutils.install'
+ cd $srcdir/build/superkaramba
+ make DESTDIR=$pkgdir install
+}
+
+package_kdeutils-sweeper() {
+ pkgdesc='System Cleaner'
+ depends=('kdebase-runtime')
+ url="http://kde.org/applications/utilities/sweeper/"
+ cd $srcdir/build/sweeper
+ make DESTDIR=$pkgdir install
+}
diff --git a/kde-unstable/kdeutils/kdeutils.install b/kde-unstable/kdeutils/kdeutils.install
new file mode 100644
index 000000000..e70c054ec
--- /dev/null
+++ b/kde-unstable/kdeutils/kdeutils.install
@@ -0,0 +1,11 @@
+post_install() {
+ xdg-icon-resource forceupdate --theme hicolor &> /dev/null
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
diff --git a/kde-unstable/kdewebdev/PKGBUILD b/kde-unstable/kdewebdev/PKGBUILD
new file mode 100644
index 000000000..d70b92ee0
--- /dev/null
+++ b/kde-unstable/kdewebdev/PKGBUILD
@@ -0,0 +1,67 @@
+# $Id: PKGBUILD 124779 2011-05-24 12:04:03Z andrea $
+# Maintainer: Pierre Schmitz <pierre@archlinux.de>
+
+pkgbase=kdewebdev
+pkgname=('kdewebdev-kfilereplace'
+ 'kdewebdev-kimagemapeditor'
+ 'kdewebdev-klinkstatus'
+ 'kdewebdev-kommander')
+pkgver=4.6.80
+pkgrel=1
+arch=('i686' 'x86_64')
+url='http://www.kde.org'
+license=('GPL' 'LGPL' 'FDL')
+groups=('kde' 'kdewebdev')
+makedepends=('pkgconfig' 'cmake' 'automoc4' 'ruby' 'tidyhtml' 'kdepim-runtime'
+ 'boost')
+source=("http://download.kde.org/unstable/${pkgver}/src/${pkgbase}-${pkgver}.tar.bz2")
+sha1sums=('d5e35391eb64265f66d81c5bdd8d95abf11d474a')
+
+build() {
+ cd $srcdir
+ mkdir build
+ cd build
+ cmake ../${pkgbase}-${pkgver} \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_SKIP_RPATH=ON \
+ -DCMAKE_INSTALL_PREFIX=/usr
+ make
+}
+
+package_kdewebdev-kfilereplace() {
+ pkgdesc='Search & Replace Tool'
+ depends=('kdebase-runtime')
+ url="http://kde.org/applications/utilities/kfilereplace/"
+ install='kdewebdev.install'
+ cd $srcdir/build/kfilereplace
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/kfilereplace
+ make DESTDIR=$pkgdir install
+}
+
+package_kdewebdev-kimagemapeditor() {
+ pkgdesc='HTML Image Map Editor'
+ depends=('kdebase-runtime')
+ install='kdewebdev.install'
+ cd $srcdir/build/kimagemapeditor
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/kimagemapeditor
+ make DESTDIR=$pkgdir install
+}
+
+package_kdewebdev-klinkstatus() {
+ pkgdesc='Link Checker'
+ depends=('kdepim-runtime' 'tidyhtml')
+ install='kdewebdev.install'
+ cd $srcdir/build/klinkstatus
+ make DESTDIR=$pkgdir install
+ cd $srcdir/build/doc/klinkstatus
+ make DESTDIR=$pkgdir install
+}
+
+package_kdewebdev-kommander() {
+ pkgdesc='Executor for Kommander dialogs'
+ depends=('kdebase-runtime')
+ cd $srcdir/build/kommander
+ make DESTDIR=$pkgdir install
+}
diff --git a/kde-unstable/kdewebdev/kdewebdev.install b/kde-unstable/kdewebdev/kdewebdev.install
new file mode 100644
index 000000000..e70c054ec
--- /dev/null
+++ b/kde-unstable/kdewebdev/kdewebdev.install
@@ -0,0 +1,11 @@
+post_install() {
+ xdg-icon-resource forceupdate --theme hicolor &> /dev/null
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
diff --git a/kde-unstable/libkdcraw/PKGBUILD b/kde-unstable/libkdcraw/PKGBUILD
new file mode 100644
index 000000000..95daa4280
--- /dev/null
+++ b/kde-unstable/libkdcraw/PKGBUILD
@@ -0,0 +1,31 @@
+# $Id: PKGBUILD 124799 2011-05-24 13:21:06Z andrea $
+# Maintainer: Andrea Scarpino <andrea@archlinux.org>
+
+pkgname=libkdcraw
+pkgver=4.6.80
+pkgrel=1
+pkgdesc="A C++ interface used to decode RAW picture"
+url="http://kde.org/"
+arch=('i686' 'x86_64')
+license=('GPL' 'LGPL' 'FDL')
+depends=('kdelibs' 'lcms')
+makedepends=('cmake' 'automoc4')
+conflicts=('kdegraphics-libs')
+install=${pkgname}.install
+source=("http://download.kde.org/unstable/${pkgver}/src/${pkgname}-${pkgver}.tar.bz2")
+sha1sums=('19fe60a51ede7bf5b4047f8fff22cd8361ebd90c')
+
+build() {
+ cd "${srcdir}"
+ mkdir build
+ cd build
+ cmake ../${pkgname}-${pkgver} \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr
+ make
+}
+
+package() {
+ cd "${srcdir}"/build
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/kde-unstable/libkdcraw/libkdcraw.install b/kde-unstable/libkdcraw/libkdcraw.install
new file mode 100644
index 000000000..e70c054ec
--- /dev/null
+++ b/kde-unstable/libkdcraw/libkdcraw.install
@@ -0,0 +1,11 @@
+post_install() {
+ xdg-icon-resource forceupdate --theme hicolor &> /dev/null
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
diff --git a/kde-unstable/libkdeedu/PKGBUILD b/kde-unstable/libkdeedu/PKGBUILD
new file mode 100644
index 000000000..fa4986b87
--- /dev/null
+++ b/kde-unstable/libkdeedu/PKGBUILD
@@ -0,0 +1,31 @@
+# $Id: PKGBUILD 124792 2011-05-24 13:04:47Z andrea $
+# Maintainer: Andrea Scarpino <andrea@archlinux.org>
+
+pkgname=libkdeedu
+pkgver=4.6.80
+pkgrel=1
+pkgdesc="Libraries used by KDE Education applications"
+url="http://kde.org/"
+arch=('i686' 'x86_64')
+license=('GPL' 'LGPL' 'FDL')
+depends=('kdelibs')
+makedepends=('cmake' 'automoc4')
+install=${pkgname}.install
+replaces=('kdeedu-libkdeedu' 'kdeedu-data')
+source=("http://download.kde.org/unstable/${pkgver}/src/${pkgname}-${pkgver}.tar.bz2")
+sha1sums=('2349b0a1676b61c7915a272030d6388e8bd6c3b1')
+
+build() {
+ cd "${srcdir}"
+ mkdir build
+ cd build
+ cmake ../${pkgname}-${pkgver} \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr
+ make
+}
+
+package() {
+ cd "${srcdir}"/build
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/kde-unstable/libkdeedu/libkdeedu.install b/kde-unstable/libkdeedu/libkdeedu.install
new file mode 100644
index 000000000..e70c054ec
--- /dev/null
+++ b/kde-unstable/libkdeedu/libkdeedu.install
@@ -0,0 +1,11 @@
+post_install() {
+ xdg-icon-resource forceupdate --theme hicolor &> /dev/null
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
diff --git a/kde-unstable/libkexiv2/PKGBUILD b/kde-unstable/libkexiv2/PKGBUILD
new file mode 100644
index 000000000..c80f8cd71
--- /dev/null
+++ b/kde-unstable/libkexiv2/PKGBUILD
@@ -0,0 +1,30 @@
+# $Id: PKGBUILD 124799 2011-05-24 13:21:06Z andrea $
+# Maintainer: Andrea Scarpino <andrea@archlinux.org>
+
+pkgname=libkexiv2
+pkgver=4.6.80
+pkgrel=1
+pkgdesc="A library to manipulate pictures metadata"
+url="http://kde.org/"
+arch=('i686' 'x86_64')
+license=('GPL' 'LGPL' 'FDL')
+depends=('kdelibs')
+makedepends=('cmake' 'automoc4')
+conflicts=('kdegraphics-libs')
+source=("http://download.kde.org/unstable/${pkgver}/src/${pkgname}-${pkgver}.tar.bz2")
+sha1sums=('cff979e2bcc604ec422feff0bc1fee3483955e5d')
+
+build() {
+ cd "${srcdir}"
+ mkdir build
+ cd build
+ cmake ../${pkgname}-${pkgver} \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr
+ make
+}
+
+package() {
+ cd "${srcdir}"/build
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/kde-unstable/libkface/PKGBUILD b/kde-unstable/libkface/PKGBUILD
new file mode 100644
index 000000000..9bdcab86b
--- /dev/null
+++ b/kde-unstable/libkface/PKGBUILD
@@ -0,0 +1,30 @@
+# $Id: PKGBUILD 124682 2011-05-23 20:54:29Z andrea $
+# Maintainer: Andrea Scarpino <andrea@archlinux.org>
+
+pkgname=libkface
+pkgver=4.6.80
+pkgrel=1
+pkgdesc="A library to perform face recognition and detection over pictures"
+url="http://kde.org/"
+arch=('i686' 'x86_64')
+license=('GPL' 'LGPL' 'FDL')
+depends=('kdelibs' 'opencv')
+makedepends=('cmake' 'automoc4')
+#install=${pkgname}.install
+source=("http://download.kde.org/unstable/${pkgver}/src/${pkgname}-${pkgver}.tar.bz2")
+sha1sums=('197b7c26e70c45339745efc839698c3ad276bb65')
+
+build() {
+ cd "${srcdir}"
+ mkdir build
+ cd build
+ cmake ../${pkgname}-${pkgver} \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr
+ make
+}
+
+package() {
+ cd "${srcdir}"/build
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/kde-unstable/libkipi/PKGBUILD b/kde-unstable/libkipi/PKGBUILD
new file mode 100644
index 000000000..b11e5a1cf
--- /dev/null
+++ b/kde-unstable/libkipi/PKGBUILD
@@ -0,0 +1,31 @@
+# $Id: PKGBUILD 124799 2011-05-24 13:21:06Z andrea $
+# Maintainer: Andrea Scarpino <andrea@archlinux.org>
+
+pkgname=libkipi
+pkgver=4.6.80
+pkgrel=1
+pkgdesc="An interface to use kipi-plugins from a KDE application"
+url="http://kde.org/"
+arch=('i686' 'x86_64')
+license=('GPL' 'LGPL' 'FDL')
+depends=('kdelibs')
+makedepends=('cmake' 'automoc4')
+conflicts=('kdegraphics-libs')
+install=${pkgname}.install
+source=("http://download.kde.org/unstable/${pkgver}/src/${pkgname}-${pkgver}.tar.bz2")
+sha1sums=('f87620e1eaa795129447473c3b89dbc5a27da161')
+
+build() {
+ cd "${srcdir}"
+ mkdir build
+ cd build
+ cmake ../${pkgname}-${pkgver} \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr
+ make
+}
+
+package() {
+ cd "${srcdir}"/build
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/kde-unstable/libkipi/libkipi.install b/kde-unstable/libkipi/libkipi.install
new file mode 100644
index 000000000..e70c054ec
--- /dev/null
+++ b/kde-unstable/libkipi/libkipi.install
@@ -0,0 +1,11 @@
+post_install() {
+ xdg-icon-resource forceupdate --theme hicolor &> /dev/null
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
diff --git a/kde-unstable/libkmap/PKGBUILD b/kde-unstable/libkmap/PKGBUILD
new file mode 100644
index 000000000..b2ae07a94
--- /dev/null
+++ b/kde-unstable/libkmap/PKGBUILD
@@ -0,0 +1,30 @@
+# $Id: PKGBUILD 124764 2011-05-24 08:23:10Z andrea $
+# Maintainer: Andrea Scarpino <andrea@archlinux.org>
+
+pkgname=libkmap
+pkgver=4.6.80
+pkgrel=1
+pkgdesc="A library to browse and arrange photos over a map"
+url="http://kde.org/"
+arch=('i686' 'x86_64')
+license=('GPL' 'LGPL' 'FDL')
+depends=('kdeedu-marble')
+makedepends=('cmake' 'automoc4')
+source=("http://download.kde.org/unstable/${pkgver}/src/${pkgname}-${pkgver}.tar.bz2")
+sha1sums=('87a91c4076e4c8867d129679494a4de19ba2e1bd')
+
+build() {
+ cd "${srcdir}"
+ mkdir build
+ cd build
+ cmake ../${pkgname}-${pkgver} \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DWITH_Kexiv2=OFF
+ make
+}
+
+package() {
+ cd "${srcdir}"/build
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/kde-unstable/libksane/PKGBUILD b/kde-unstable/libksane/PKGBUILD
new file mode 100644
index 000000000..b1f117368
--- /dev/null
+++ b/kde-unstable/libksane/PKGBUILD
@@ -0,0 +1,31 @@
+# $Id: PKGBUILD 124799 2011-05-24 13:21:06Z andrea $
+# Maintainer: Andrea Scarpino <andrea@archlinux.org>
+
+pkgname=libksane
+pkgver=4.6.80
+pkgrel=1
+pkgdesc="An image scanning library"
+url="http://kde.org/"
+arch=('i686' 'x86_64')
+license=('GPL' 'LGPL' 'FDL')
+depends=('kdelibs' 'sane')
+makedepends=('cmake' 'automoc4')
+conflicts=('kdegraphics-libs')
+install=${pkgname}.install
+source=("http://download.kde.org/unstable/${pkgver}/src/${pkgname}-${pkgver}.tar.bz2")
+sha1sums=('19cf8532f5ea046343fcaa51b9a9c0df7aae2978')
+
+build() {
+ cd "${srcdir}"
+ mkdir build
+ cd build
+ cmake ../${pkgname}-${pkgver} \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr
+ make
+}
+
+package() {
+ cd "${srcdir}"/build
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/kde-unstable/libksane/libksane.install b/kde-unstable/libksane/libksane.install
new file mode 100644
index 000000000..e70c054ec
--- /dev/null
+++ b/kde-unstable/libksane/libksane.install
@@ -0,0 +1,11 @@
+post_install() {
+ xdg-icon-resource forceupdate --theme hicolor &> /dev/null
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
diff --git a/kde-unstable/qt/PKGBUILD b/kde-unstable/qt/PKGBUILD
new file mode 100644
index 000000000..89e96034f
--- /dev/null
+++ b/kde-unstable/qt/PKGBUILD
@@ -0,0 +1,222 @@
+# $Id: PKGBUILD 125344 2011-05-26 00:12:04Z andrea $
+# Maintainer: Andrea Scarpino <andrea@archlinux.org>
+# Contributor: Pierre Schmitz <pierre@archlinux.de>
+
+pkgbase=qt
+pkgname=('qt' 'qt-private-headers')
+pkgver=4.7.3
+pkgrel=2
+arch=('i686' 'x86_64')
+url='http://qt.nokia.com/'
+license=('GPL3' 'LGPL')
+makedepends=('libtiff' 'libpng' 'libmng' 'sqlite3' 'ca-certificates' 'glib2' 'dbus'
+ 'fontconfig' 'libgl' 'libsm' 'libxrandr' 'libxv' 'libxi' 'alsa-lib'
+ 'xdg-utils' 'hicolor-icon-theme' 'desktop-file-utils' 'mesa' 'postgresql-libs'
+ 'mysql' 'unixodbc' 'cups' 'gtk2')
+options=('!libtool')
+_pkgfqn="qt-everywhere-opensource-src-${pkgver}"
+source=("ftp://ftp.qt.nokia.com/qt/source/${_pkgfqn}.tar.gz"
+ 'assistant.desktop' 'designer.desktop' 'linguist.desktop'
+ 'qtconfig.desktop'
+ 'qtbug-16292.patch')
+md5sums=('49b96eefb1224cc529af6fe5608654fe'
+ 'fc211414130ab2764132e7370f8e5caa'
+ '85179f5e0437514f8639957e1d8baf62'
+ 'f11852b97583610f3dbb669ebc3e21bc'
+ '6b771c8a81dd90b45e8a79afa0e5bbfd'
+ 'dc7ed8c2e8c68a175f7f05a34dccc937')
+
+build() {
+ unset QMAKESPEC
+ export QT4DIR=$srcdir/$_pkgfqn
+ export PATH=${QT4DIR}/bin:${PATH}
+ export LD_LIBRARY_PATH=${QT4DIR}/lib:${LD_LIBRARY_PATH}
+
+ cd $srcdir/$_pkgfqn
+
+ # Already fixed upstream
+ patch -p1 -i "${srcdir}"/qtbug-16292.patch
+
+ sed -i "s|-O2|$CXXFLAGS|" mkspecs/common/g++.conf
+ sed -i "/^QMAKE_RPATH/s| -Wl,-rpath,||g" mkspecs/common/g++.conf
+ sed -i "/^QMAKE_LFLAGS\s/s|+=|+= $LDFLAGS|g" mkspecs/common/g++.conf
+
+ ./configure -confirm-license -opensource \
+ -prefix /usr \
+ -docdir /usr/share/doc/qt \
+ -plugindir /usr/lib/qt/plugins \
+ -importdir /usr/lib/qt/imports \
+ -datadir /usr/share/qt \
+ -translationdir /usr/share/qt/translations \
+ -sysconfdir /etc \
+ -examplesdir /usr/share/doc/qt/examples \
+ -demosdir /usr/share/doc/qt/demos \
+ -largefile \
+ -plugin-sql-{psql,mysql,sqlite,odbc} \
+ -system-sqlite \
+ -xmlpatterns \
+ -no-phonon \
+ -no-phonon-backend \
+ -svg \
+ -webkit \
+ -script \
+ -scripttools \
+ -system-zlib \
+ -system-libtiff \
+ -system-libpng \
+ -system-libmng \
+ -system-libjpeg \
+ -nomake demos \
+ -nomake examples \
+ -nomake docs \
+ -no-rpath \
+ -openssl-linked \
+ -silent \
+ -optimized-qmake \
+ -dbus \
+ -reduce-relocations \
+ -no-separate-debug-info \
+ -gtkstyle \
+ -opengl \
+ -no-openvg \
+ -glib
+ make
+}
+
+package_qt() {
+ pkgdesc='A cross-platform application and UI framework'
+ depends=('libtiff' 'libpng' 'libmng' 'sqlite3' 'ca-certificates' 'glib2' 'dbus'
+ 'fontconfig' 'libgl' 'libsm' 'libxrandr' 'libxv' 'libxi' 'alsa-lib'
+ 'xdg-utils' 'hicolor-icon-theme' 'desktop-file-utils')
+ optdepends=('postgresql-libs: PostgreSQL driver'
+ 'libmysqlclient: MySQL driver'
+ 'unixodbc: ODBC driver'
+ 'libxinerama: Xinerama support'
+ 'libxcursor: Xcursor support'
+ 'libxfixes: Xfixes support')
+ install='qt.install'
+
+ cd $srcdir/$_pkgfqn
+ make INSTALL_ROOT=$pkgdir install
+
+ # install missing icons and desktop files
+ for icon in tools/linguist/linguist/images/icons/linguist-*-32.png ; do
+ size=$(echo $(basename ${icon}) | cut -d- -f2)
+ install -p -D -m644 ${icon} ${pkgdir}/usr/share/icons/hicolor/${size}x${size}/apps/linguist.png
+ done
+ install -p -D -m644 src/gui/dialogs/images/qtlogo-64.png ${pkgdir}/usr/share/icons/hicolor/64x64/apps/qtlogo.png
+ install -p -D -m644 tools/assistant/tools/assistant/images/assistant.png ${pkgdir}/usr/share/icons/hicolor/32x32/apps/assistant.png
+ install -p -D -m644 tools/designer/src/designer/images/designer.png ${pkgdir}/usr/share/icons/hicolor/128x128/apps/designer.png
+ install -d ${pkgdir}/usr/share/applications
+ install -m644 ${srcdir}/{linguist,designer,assistant,qtconfig}.desktop ${pkgdir}/usr/share/applications/
+
+ # install license addition
+ install -D -m644 LGPL_EXCEPTION.txt ${pkgdir}/usr/share/licenses/qt/LGPL_EXCEPTION.txt
+
+ # Fix wrong path in pkgconfig files
+ find ${pkgdir}/usr/lib/pkgconfig -type f -name '*.pc' \
+ -exec perl -pi -e "s, -L${srcdir}/?\S+,,g" {} \;
+ # Fix wrong path in prl files
+ find ${pkgdir}/usr/lib -type f -name '*.prl' \
+ -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d;s/\(QMAKE_PRL_LIBS =\).*/\1/' {} \;
+}
+
+package_qt-private-headers(){
+ pkgdesc="Qt private headers for development"
+ depends=("qt=${pkgver}")
+
+ install -d ${pkgdir}/usr/include/phonon/private
+ cd ${srcdir}/$_pkgfqn/src/3rdparty/phonon/phonon/
+ find . -name "*_p.h" -exec install -m644 {} \
+ ${pkgdir}/usr/include/phonon/private/ \; &> /dev/null
+
+ install -d ${pkgdir}/usr/include/Qt3Support/private
+ cd ${srcdir}/$_pkgfqn/src/qt3support/
+ find . -name "*_p.h" -exec install -m644 {} \
+ ${pkgdir}/usr/include/Qt3Support/private/ \; &> /dev/null
+
+ install -d ${pkgdir}/usr/include/QtCore/private
+ cd ${srcdir}/$_pkgfqn/src/corelib/
+ find . -name "*_p.h" -exec install -m644 {} \
+ ${pkgdir}/usr/include/QtCore/private/ \; &> /dev/null
+
+ install -d ${pkgdir}/usr/include/QtDBus/private
+ cd ${srcdir}/$_pkgfqn/src/dbus/
+ find . -name "*_p.h" -exec install -m644 {} \
+ ${pkgdir}/usr/include/QtDBus/private/ \; &> /dev/null
+
+ install -d ${pkgdir}/usr/include/QtDeclarative/private
+ cd ${srcdir}/$_pkgfqn/src/declarative/
+ find . -name "*_p.h" -exec install -m644 {} \
+ ${pkgdir}/usr/include/QtDeclarative/private/ \; &> /dev/null
+
+ install -d ${pkgdir}/usr/include/QtDesigner/private
+ cd ${srcdir}/$_pkgfqn/tools/designer/
+ find . -name "*_p.h" -exec install -m644 {} \
+ ${pkgdir}/usr/include/QtDesigner/private/ \; &> /dev/null
+
+ install -d ${pkgdir}/usr/include/QtGui/private
+ cd ${srcdir}/$_pkgfqn/src/gui/
+ find . -name "*_p.h" -exec install -m644 {} \
+ ${pkgdir}/usr/include/QtGui/private/ \; &> /dev/null
+
+ install -d ${pkgdir}/usr/include/QtHelp/private
+ cd ${srcdir}/$_pkgfqn/tools/assistant/
+ find . -name "*_p.h" -exec install -m644 {} \
+ ${pkgdir}/usr/include/QtHelp/private/ \; &> /dev/null
+
+ install -d ${pkgdir}/usr/include/QtMultimedia/private
+ cd ${srcdir}/$_pkgfqn/src/multimedia/
+ find . -name "*_p.h" -exec install -m644 {} \
+ ${pkgdir}/usr/include/QtMultimedia/private/ \; &> /dev/null
+
+ install -d ${pkgdir}/usr/include/QtNetwork/private
+ cd ${srcdir}/$_pkgfqn/src/network/
+ find . -name "*_p.h" -exec install -m644 {} \
+ ${pkgdir}/usr/include/QtNetwork/private/ \; &> /dev/null
+
+ install -d ${pkgdir}/usr/include/QtOpenGL/private
+ cd ${srcdir}/$_pkgfqn/src/opengl/
+ find . -name "*_p.h" -exec install -m644 {} \
+ ${pkgdir}/usr/include/QtOpenGL/private/ \; &> /dev/null
+
+ install -d ${pkgdir}/usr/include/QtScript/private
+ cd ${srcdir}/$_pkgfqn/src/script/
+ find . -name "*_p.h" -exec install -m644 {} \
+ ${pkgdir}/usr/include/QtScript/private/ \; &> /dev/null
+
+ install -d ${pkgdir}/usr/include/QtScriptTools/private
+ cd ${srcdir}/$_pkgfqn/src/scripttools/
+ find . -name "*_p.h" -exec install -m644 {} \
+ ${pkgdir}/usr/include/QtScriptTools/private/ \; &> /dev/null
+
+ install -d ${pkgdir}/usr/include/QtSql/private
+ cd ${srcdir}/$_pkgfqn/src/sql/
+ find . -name "*_p.h" -exec install -m644 {} \
+ ${pkgdir}/usr/include/QtSql/private/ \; &> /dev/null
+
+ install -d ${pkgdir}/usr/include/QtSvg/private
+ cd ${srcdir}/$_pkgfqn/src/svg/
+ find . -name "*_p.h" -exec install -m644 {} \
+ ${pkgdir}/usr/include/QtSvg/private/ \; &> /dev/null
+
+ install -d ${pkgdir}/usr/include/QtTest/private
+ cd ${srcdir}/$_pkgfqn/src/testlib/
+ find . -name "*_p.h" -exec install -m644 {} \
+ ${pkgdir}/usr/include/QtTest/private/ \; &> /dev/null
+
+ install -d ${pkgdir}/usr/include/QtUiTools/private
+ cd ${srcdir}/$_pkgfqn/tools/designer/src/uitools
+ find . -name "*_p.h" -exec install -m644 {} \
+ ${pkgdir}/usr/include/QtUiTools/private/ \; &> /dev/null
+
+ install -d ${pkgdir}/usr/include/QtWebKit/private
+ cd ${srcdir}/$_pkgfqn/src/3rdparty/webkit
+ find . -name "*_p.h" -exec install -m644 {} \
+ ${pkgdir}/usr/include/QtWebKit/private/ \; &> /dev/null
+
+ install -d ${pkgdir}/usr/include/QtXmlPatterns/private
+ cd ${srcdir}/$_pkgfqn/src/xmlpatterns/
+ find . -name "*_p.h" -exec install -m644 {} \
+ ${pkgdir}/usr/include/QtXmlPatterns/private/ \; &> /dev/null
+}
diff --git a/kde-unstable/qt/assistant.desktop b/kde-unstable/qt/assistant.desktop
new file mode 100644
index 000000000..a9e98c44b
--- /dev/null
+++ b/kde-unstable/qt/assistant.desktop
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Name=Qt Assistant
+Comment=Shows Qt documentation and examples
+Exec=/usr/bin/assistant
+Icon=assistant
+Terminal=false
+Encoding=UTF-8
+Type=Application
+Categories=Qt;Development;Documentation;
diff --git a/kde-unstable/qt/designer.desktop b/kde-unstable/qt/designer.desktop
new file mode 100644
index 000000000..9b7b6e9aa
--- /dev/null
+++ b/kde-unstable/qt/designer.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Name=Qt Designer
+GenericName=Interface Designer
+Comment=Design GUIs for Qt applications
+Exec=/usr/bin/designer
+Icon=designer
+MimeType=application/x-designer;
+Terminal=false
+Encoding=UTF-8
+Type=Application
+Categories=Qt;Development;
diff --git a/kde-unstable/qt/linguist.desktop b/kde-unstable/qt/linguist.desktop
new file mode 100644
index 000000000..8cbe86599
--- /dev/null
+++ b/kde-unstable/qt/linguist.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Name=Qt Linguist
+Comment=Add translations to Qt applications
+Exec=/usr/bin/linguist
+Icon=linguist
+MimeType=text/vnd.trolltech.linguist;application/x-linguist;
+Terminal=false
+Encoding=UTF-8
+Type=Application
+Categories=Qt;Development;
diff --git a/kde-unstable/qt/qt.install b/kde-unstable/qt/qt.install
new file mode 100644
index 000000000..81ce5c4b0
--- /dev/null
+++ b/kde-unstable/qt/qt.install
@@ -0,0 +1,12 @@
+post_install() {
+ xdg-icon-resource forceupdate --theme hicolor &> /dev/null
+ update-desktop-database -q
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
diff --git a/kde-unstable/qt/qtbug-16292.patch b/kde-unstable/qt/qtbug-16292.patch
new file mode 100644
index 000000000..9728e28f5
--- /dev/null
+++ b/kde-unstable/qt/qtbug-16292.patch
@@ -0,0 +1,62 @@
+From e340844bd614add505a39a3a6b915632476f6305 Mon Sep 17 00:00:00 2001
+From: Gabriel de Dietrich <gabriel.dietrich-de@nokia.com>
+Date: Tue, 15 Feb 2011 11:19:26 +0100
+Subject: [PATCH] Fix crash in KPackageKit
+
+QTreeViewPrivate::itemHeight() may refer to an invalid QModelIndex
+after calling QTreeView::indexRowSizeHint().
+
+Same thing inside QTreeView::indexRowSizeHint(), since
+QHeaderView::count() will call
+QAbstractItemViewPrivate::executePostedLayout() which may invalidate
+all the QModelIndex.
+
+Reviewed-by: Olivier
+Task-number: QTBUG-16292
+---
+ src/gui/itemviews/qtreeview.cpp | 11 ++++++-----
+ 1 files changed, 6 insertions(+), 5 deletions(-)
+
+diff --git a/src/gui/itemviews/qtreeview.cpp b/src/gui/itemviews/qtreeview.cpp
+index f1f3236..c0573bb 100644
+--- a/src/gui/itemviews/qtreeview.cpp
++++ b/src/gui/itemviews/qtreeview.cpp
+@@ -2753,6 +2753,7 @@ int QTreeView::indexRowSizeHint(const QModelIndex &index) const
+
+ int start = -1;
+ int end = -1;
++ int indexRow = index.row();
+ int count = d->header->count();
+ bool emptyHeader = (count == 0);
+ QModelIndex parent = index.parent();
+@@ -2789,7 +2790,7 @@ int QTreeView::indexRowSizeHint(const QModelIndex &index) const
+ int logicalColumn = emptyHeader ? column : d->header->logicalIndex(column);
+ if (d->header->isSectionHidden(logicalColumn))
+ continue;
+- QModelIndex idx = d->model->index(index.row(), logicalColumn, parent);
++ QModelIndex idx = d->model->index(indexRow, logicalColumn, parent);
+ if (idx.isValid()) {
+ QWidget *editor = d->editorForIndex(idx).editor;
+ if (editor && d->persistent.contains(editor)) {
+@@ -3224,14 +3225,14 @@ int QTreeViewPrivate::itemHeight(int item) const
+ if (viewItems.isEmpty())
+ return 0;
+ const QModelIndex &index = viewItems.at(item).index;
++ if (!index.isValid())
++ return 0;
+ int height = viewItems.at(item).height;
+- if (height <= 0 && index.isValid()) {
++ if (height <= 0) {
+ height = q_func()->indexRowSizeHint(index);
+ viewItems[item].height = height;
+ }
+- if (!index.isValid() || height < 0)
+- return 0;
+- return height;
++ return qMax(height, 0);
+ }
+
+
+--
+1.6.1
+
diff --git a/kde-unstable/qt/qtconfig.desktop b/kde-unstable/qt/qtconfig.desktop
new file mode 100644
index 000000000..46dcf9e3d
--- /dev/null
+++ b/kde-unstable/qt/qtconfig.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Name=Qt Config
+Comment=Configure Qt behavior, styles, fonts
+Exec=/usr/bin/qtconfig
+Icon=qtlogo
+Terminal=false
+Encoding=UTF-8
+Type=Application
+Categories=Qt;Settings;
+NoDisplay=true
diff --git a/staging/claws-mail-extra-plugins/PKGBUILD b/staging/claws-mail-extra-plugins/PKGBUILD
new file mode 100644
index 000000000..9d233d726
--- /dev/null
+++ b/staging/claws-mail-extra-plugins/PKGBUILD
@@ -0,0 +1,67 @@
+# $Id: PKGBUILD 125144 2011-05-25 19:01:27Z foutrelis $
+# Maintainer: Andreas Radke <andyrtr@archlinux.org>
+# Contributor: Mildred <mildred593 at online dot fr>
+
+pkgname=claws-mail-extra-plugins
+pkgver=3.7.9
+pkgrel=4
+pkgdesc="Extra plugins for claws-mail"
+url="http://www.claws-mail.org/plugins.php?branch=EXT"
+license=('GPL3')
+arch=('i686' 'x86_64')
+depends=('claws-mail>=3.7.8')
+makedepends=('make' 'bc' 'perl>=5.10.1-5' 'libgtkhtml>=2.11.1-2' 'libnotify>=0.7'
+ 'libxml2>=2.7.6' 'curl>=7.19.7' 'libytnef>=1.5-2' 'libwebkit>=1.3.13'
+ 'pygtk>=2.16.0' 'libsoup-gnome' 'libcanberra')
+optdepends=('libgtkhtml: for gtkhtml2_viewer plugin'
+ 'perl: for perl plugin'
+ 'libnotify: for notification plugin'
+ 'libcanberra: for notification plugin'
+ 'dbus-core: for notification plugin'
+ 'libxml2: for gtkhtml2_viewer and rssyl plugins'
+ 'curl: for gtkhtml2_viewer, vcalendar, rssyl and spamreport plugins'
+ 'libarchive: for archive plugin'
+ 'libytnef: for tnef_parse plugin'
+ 'libwebkit: for the fancy webkit html plugin'
+ 'libsoup-gnome: for the fancy webkit html plugin'
+ 'python2: for python plugin')
+conflicts=('claws-gtkhtml2_viewer' 'claws-mail-acpinotifier-plugin'
+ 'sylpheed-claws-gtkhtml2-plugin' 'sylpheed-claws-rssyl-plugin'
+ 'sylpheed-claws-extra-plugins' 'claws-tnef-plugin'
+ 'claws-webkit-plugin-svn' 'claws-mayflower-plugin-svn')
+replaces=('sylpheed-claws-extra-plugins')
+options=('!libtool' '!strip')
+source=(http://downloads.sourceforge.net/project/sylpheed-claws/extra%20plugins/$pkgver/claws-mail-extra-plugins-$pkgver.tar.bz2
+ claws-mail-notification-0.26-libnotify-0.7.patch)
+md5sums=('3d1ebc48f686ab10702380c776b5d5d0'
+ 'a02be84594ebd28b18811ccc358509be')
+
+build() {
+ cd "$srcdir/claws-mail-extra-plugins-$pkgver"
+
+ # fix for python2
+ export PYTHON="/usr/bin/python2"
+
+ for dir in */; do
+ [[ $dir != geolocation_plugin-* ]] && (
+ cd $dir
+
+ [[ $dir == notification_plugin-* ]] &&
+ patch -Np2 -i "$srcdir/claws-mail-notification-0.26-libnotify-0.7.patch"
+
+ ./configure --prefix=/usr --disable-static
+ make
+ )
+ done
+}
+
+package() {
+ cd "$srcdir/claws-mail-extra-plugins-$pkgver"
+ for dir in */; do
+ [[ $dir != geolocation_plugin-* ]] &&
+ make -C $dir DESTDIR="$pkgdir" install
+ done
+
+ # fix fileconflict with libical, #11485
+ rm -f "$pkgdir/usr/include/ical.h"
+}
diff --git a/staging/claws-mail-extra-plugins/claws-mail-notification-0.26-libnotify-0.7.patch b/staging/claws-mail-extra-plugins/claws-mail-notification-0.26-libnotify-0.7.patch
new file mode 100644
index 000000000..efc06a472
--- /dev/null
+++ b/staging/claws-mail-extra-plugins/claws-mail-notification-0.26-libnotify-0.7.patch
@@ -0,0 +1,25 @@
+diff -Nur claws-mail-extra-plugins-3.7.6-orig/notification_plugin-0.25/src/notification_popup.c claws-mail-extra-plugins-3.7.6/notification_plugin-0.25/src/notification_popup.c
+--- claws-mail-extra-plugins-3.7.6-orig/notification_plugin-0.25/src/notification_popup.c 2009-04-26 03:05:05.000000000 +0200
++++ claws-mail-extra-plugins-3.7.6/notification_plugin-0.25/src/notification_popup.c 2010-11-12 13:39:02.363909583 +0100
+@@ -339,7 +339,7 @@
+ break;
+ }
+
+- ppopup->notification = notify_notification_new(summary, utf8_str, NULL, NULL);
++ ppopup->notification = notify_notification_new(summary, utf8_str, NULL);
+ g_free(utf8_str);
+ if(ppopup->notification == NULL) {
+ debug_print("Notification Plugin: Failed to create a new "
+diff -Nur claws-mail-extra-plugins-3.7.6-orig/notification_plugin-0.25/src/notification_trayicon.c claws-mail-extra-plugins-3.7.6/notification_plugin-0.25/src/notification_trayicon.c
+--- claws-mail-extra-plugins-3.7.6-orig/notification_plugin-0.25/src/notification_trayicon.c 2010-03-25 09:56:34.000000000 +0100
++++ claws-mail-extra-plugins-3.7.6/notification_plugin-0.25/src/notification_trayicon.c 2010-11-12 13:38:30.809340907 +0100
+@@ -589,8 +589,7 @@
+ summary = notification_trayicon_popup_assemble_summary();
+ utf8_str = notification_trayicon_popup_assemble_body(msginfo);
+
+- popup.notification = notify_notification_new(summary, utf8_str, NULL, NULL);
+- notify_notification_attach_to_status_icon(popup.notification, trayicon);
++ popup.notification = notify_notification_new(summary, utf8_str, NULL);
+
+ g_free(summary);
+ g_free(utf8_str);
diff --git a/staging/dvdrip/PKGBUILD b/staging/dvdrip/PKGBUILD
new file mode 100644
index 000000000..17838b169
--- /dev/null
+++ b/staging/dvdrip/PKGBUILD
@@ -0,0 +1,40 @@
+# $Id: PKGBUILD 125147 2011-05-25 19:02:09Z foutrelis $
+# Maintainer: Giovanni Scafora <giovanni@archlinux.org>
+# Contributor: Fredrik Hammar <Horney_C86@Hotmail.com>
+
+pkgname=dvdrip
+pkgver=0.98.11
+pkgrel=7
+pkgdesc="A Gtk frontend for transcode writen in Perl"
+arch=('i686' 'x86_64')
+license=('custom')
+url="http://www.exit1.org/dvdrip/"
+install=${pkgname}.install
+depends=('perl-gtk2-ex-formfactory' 'transcode' 'imagemagick'
+ 'perl-libintl-perl' 'desktop-file-utils' 'perl-event-execflow')
+optdepends=('ogmtools: for ogm/odd video creation'
+ 'lsdvd: fast reading of DVD table')
+source=(http://www.exit1.org/dvdrip/dist/${pkgname}-${pkgver}.tar.gz \
+ ${pkgname}.desktop)
+options=('!emptydirs' '!makeflags')
+md5sums=('6dfa4199d451757a37eea233a07da4c0'
+ 'e91cf411928fd0500d07a0022b4ef546')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ # install module in vendor directories.
+ PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make install DESTDIR="${pkgdir}"
+
+ # remove perllocal.pod and .packlist
+ find ${pkgdir} -name perllocal.pod -delete
+ find ${pkgdir} -name .packlist -delete
+
+ install -Dm644 ${srcdir}/${pkgname}.desktop "${pkgdir}/usr/share/applications/${pkgname}.desktop"
+ install -Dm 644 COPYRIGHT "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}
diff --git a/staging/dvdrip/dvdrip.desktop b/staging/dvdrip/dvdrip.desktop
new file mode 100644
index 000000000..dd19b4aae
--- /dev/null
+++ b/staging/dvdrip/dvdrip.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Name=dvd::rip
+Comment=DVD Ripper and Encoder - Backup and compression utility for DVDs
+Exec=/usr/bin/vendor_perl/dvdrip
+Icon=/usr/share/perl5/vendor_perl/Video/DVDRip/icon.xpm
+Terminal=false
+Type=Application
+Categories=Application;AudioVideo;Video;
diff --git a/staging/dvdrip/dvdrip.install b/staging/dvdrip/dvdrip.install
new file mode 100644
index 000000000..4cd6160c4
--- /dev/null
+++ b/staging/dvdrip/dvdrip.install
@@ -0,0 +1,19 @@
+# this is the scrollkeeper handling sample file
+
+post_install() {
+ echo "update desktop mime database..."
+ update-desktop-database -q
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+pre_remove() {
+ /bin/true
+}
+
+post_remove() {
+ echo "update desktop mime database..."
+ update-desktop-database -q
+}
diff --git a/staging/git/ChangeLog b/staging/git/ChangeLog
new file mode 100644
index 000000000..76298e68f
--- /dev/null
+++ b/staging/git/ChangeLog
@@ -0,0 +1,53 @@
+Simple version bumps are omitted from the following ChangeLog.
+
+2011-05-05 Dan McGee <dan@archlinux.org>
+ Version 1.7.5.1-1
+ * Byte compile emacs files (FS#20874)
+ * Respect CFLAGS/LDFLAGS (FS#23963)
+
+2011-04-27 Dan McGee <dan@archlinux.org>
+ Version 1.7.5-1
+ * Add missing optdepends for git send-email (FS#20923)
+
+2011-01-05 Dan McGee <dan@archlinux.org>
+ Version 1.7.3.5-1
+ * More flexible git-daemon RC scripts (FS#20575)
+
+2010-10-01 Allan McRae <allan@archlinux.org>
+ Version 1.7.3.1-2
+ * Python 2/3 rebuild
+
+2010-06-29 Dan McGee <dan@archlinux.org>
+ Version 1.7.1.1-1
+ * Add emacs completion files (FS#17968)
+ * Add git-daemon RC scripts (FS#19291)
+
+2009-06-05 Dan McGee <dan@archlinux.org>
+ Version 1.6.3.2-1
+ * Remove gitweb from /usr/share; it needs customization to be helpful
+ * Add NO_CROSS_DIRECTORY_HARDLINKS option to build (FS#13683)
+
+2008-09-14 Dan McGee <dan@archlinux.org>
+ Version 1.6.0.2-1
+ * Moved optional depends from install file to optdepends array
+
+2008-06-15 Dan McGee <dan@archlinux.org>
+ Version 1.5.6-1
+ * Removed 'cpio' dependency, clone is now a builtin and no longer needs it
+
+2008-02-02 Dan McGee <dan@archlinux.org>
+ Version 1.5.4-1
+ * Upstream version 1.5.4
+ * Enable pthreads support in pack-objects. To use, set the pack.threads
+ git config option. Read manpages of pack-objects and config for more
+ details.
+ * Changelog added (with entries going back a bit).
+
+2008-01-28 Kevin Piche <kevin@archlinux.org>
+ Version 1.5.3.7-2
+ * Updated for new perl policy (vendor dirs)
+ * Change license to GPL2
+
+2007-11-01 Eric Belanger <eric@archlinux.org>
+ Version 1.5.3.5-2
+ * Fix Perl module location
diff --git a/staging/git/PKGBUILD b/staging/git/PKGBUILD
new file mode 100644
index 000000000..0a96745dd
--- /dev/null
+++ b/staging/git/PKGBUILD
@@ -0,0 +1,85 @@
+# $Id: PKGBUILD 125150 2011-05-25 19:02:49Z foutrelis $
+# Maintainer: Dan McGee <dan@archlinux.org>
+
+pkgname=git
+pkgver=1.7.5.2
+pkgrel=2
+pkgdesc="the fast distributed version control system"
+arch=(i686 x86_64)
+url="http://git-scm.com/"
+license=('GPL2')
+depends=('curl' 'expat>=2.0' 'perl-error' 'perl>=5.12.2')
+makedepends=('python2' 'emacs')
+optdepends=('tk: gitk and git gui'
+ 'perl-libwww: git svn'
+ 'perl-term-readkey: git svn'
+ 'perl-mime-tools: git send-email'
+ 'perl-net-smtp-ssl: git send-email TLS support'
+ 'perl-authen-sasl: git send-email TLS support'
+ 'python2: various helper scripts'
+ 'subversion: git svn'
+ 'cvsps: git cvsimport')
+replaces=('git-core')
+provides=('git-core')
+backup=('etc/conf.d/git-daemon.conf')
+source=("http://kernel.org/pub/software/scm/git/${pkgname}-${pkgver}.tar.bz2" \
+ "http://kernel.org/pub/software/scm/git/git-manpages-${pkgver}.tar.bz2"
+ git-daemon
+ git-daemon.conf)
+changelog=ChangeLog
+
+build() {
+ export PYTHON_PATH='/usr/bin/python2'
+ cd "$srcdir/$pkgname-$pkgver"
+ make prefix=/usr gitexecdir=/usr/lib/git-core \
+ CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS"
+
+ cd contrib/emacs
+ make prefix=/usr
+}
+
+package() {
+ export PYTHON_PATH='/usr/bin/python2'
+ cd "$srcdir/$pkgname-$pkgver"
+ make prefix=/usr gitexecdir=/usr/lib/git-core \
+ CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" \
+ NO_CROSS_DIRECTORY_HARDLINKS=1 \
+ INSTALLDIRS=vendor DESTDIR="$pkgdir" install
+
+ # bash completion
+ mkdir -p $pkgdir/etc/bash_completion.d/
+ install -m644 ./contrib/completion/git-completion.bash "$pkgdir"/etc/bash_completion.d/git
+ # more contrib stuff
+ cp -a ./contrib $pkgdir/usr/share/git/
+ # scripts are for python 2.x
+ sed -i 's|#![ ]*/usr/bin/env python|#!/usr/bin/env python2|' \
+ $(find "$pkgdir" -name '*.py') \
+ "$pkgdir"/usr/share/git/{fast-import/git-p4,gitview/gitview}
+
+ # emacs interface
+ cd contrib/emacs
+ make prefix=/usr DESTDIR="$pkgdir" install
+
+ # how 'bout some manpages?
+ for mansect in man1 man5 man7; do
+ for manpage in "$srcdir"/$mansect/*; do
+ install -D -m644 $manpage "$pkgdir"/usr/share/man/$mansect/$(basename $manpage)
+ done
+ done
+
+ # remove perllocal.pod, .packlist, and empty directories.
+ rm -rf "$pkgdir"/usr/lib/perl5
+
+ # git daemon script
+ install -D -m755 "$srcdir"/git-daemon "$pkgdir"/etc/rc.d/git-daemon
+ install -D -m644 "$srcdir"/git-daemon.conf "$pkgdir"/etc/conf.d/git-daemon.conf
+}
+
+md5sums=('f79ab8fe79b35346b499f131cbf381a4'
+ '43fc5538f137231f5c96e7da5eb6c934'
+ '8e2648910fd5dd4f1c41d3c7fa9e9156'
+ '2e42bf97779a1c6411d89043334c9e78')
+sha256sums=('65dbb9789a1ff8aa7e4f7e156b9ce36ef101810608ed55a297156348d70f9349'
+ '8521210a77809d189a3fe72e2bd13df50ecf8ec58e7098ec1655dfdb4086b6ca'
+ '2e0a50bdaf8f387a499895e1c204bff78244eaa72b78187c8a84ef40c0b82598'
+ 'e8bfe29d8393d2b87517c4dd56ea834b213aa00bf3d7fcde4ead3457cadbbc68')
diff --git a/staging/git/git-daemon b/staging/git/git-daemon
new file mode 100644
index 000000000..21ba73ed5
--- /dev/null
+++ b/staging/git/git-daemon
@@ -0,0 +1,70 @@
+#!/bin/bash
+
+daemon_bin="/usr/lib/git-core/git-daemon"
+daemon_name=$(basename $daemon_bin)
+PIDF="/var/run/$daemon_name.pid"
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+. /etc/conf.d/$daemon_name.conf
+
+get_pid() {
+ pidof -o %PPID $daemon_name
+}
+
+case "$1" in
+ start)
+ stat_busy "Starting $daemon_name daemon"
+
+ PID=$(get_pid)
+ if [ -z "$PID" ]; then
+ [ -f $PIDF ] && rm -f $PIDF
+ # RUN
+ $daemon_bin --pid-file=$PIDF $GIT_DAEMON_ARGS
+ #
+ if [ $? -gt 0 ]; then
+ stat_fail
+ exit 1
+ else
+ echo $(get_pid) > $PIDF
+ add_daemon $daemon_name
+ stat_done
+ fi
+ else
+ stat_fail
+ exit 1
+ fi
+ ;;
+
+ stop)
+ stat_busy "Stopping $daemon_name daemon"
+ PID=$(get_pid)
+ # KILL
+ [ ! -z "$PID" ] && kill $PID &> /dev/null
+ #
+ if [ $? -gt 0 ]; then
+ stat_fail
+ exit 1
+ else
+ rm -f $PIDF &> /dev/null
+ rm_daemon $daemon_name
+ stat_done
+ fi
+ ;;
+
+ restart)
+ $0 stop
+ sleep 3
+ $0 start
+ ;;
+
+ status)
+ stat_busy "Checking $daemon_name status";
+ ck_status $daemon_name
+ ;;
+
+ *)
+ echo "usage: $0 {start|stop|restart|status}"
+esac
+
+exit 0
diff --git a/staging/git/git-daemon.conf b/staging/git/git-daemon.conf
new file mode 100644
index 000000000..3f9a12060
--- /dev/null
+++ b/staging/git/git-daemon.conf
@@ -0,0 +1,5 @@
+# path to git repositories served
+GIT_REPO="/srv/git/"
+# see `man git-daemon` for all available options
+# $GIT_REPO will be present twice in most configs
+GIT_DAEMON_ARGS="--detach --syslog --verbose --base-path=$GIT_REPO $GIT_REPO"
diff --git a/staging/glade-perl/PKGBUILD b/staging/glade-perl/PKGBUILD
new file mode 100644
index 000000000..96d77bced
--- /dev/null
+++ b/staging/glade-perl/PKGBUILD
@@ -0,0 +1,23 @@
+# $Id: PKGBUILD 125153 2011-05-25 19:04:01Z foutrelis $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+
+pkgname=glade-perl
+_realname=Gtk2-GladeXML
+pkgver=1.007
+pkgrel=4
+pkgdesc="Gtk2-GladeXML perl bindings for glade 2.x"
+arch=(i686 x86_64)
+license=('LGPL')
+url="http://gtk2-perl.sourceforge.net/"
+makedepends=('perl-extutils-pkgconfig' 'perl-extutils-depends')
+depends=('libglade' 'gtk2-perl' 'perl')
+options=('!emptydirs')
+source=(http://downloads.sourceforge.net/sourceforge/gtk2-perl/${_realname}-${pkgver}.tar.gz)
+md5sums=('e6ca234e2a9f0221263acd2a593c583b')
+
+build() {
+ cd "${srcdir}/${_realname}-${pkgver}"
+ perl Makefile.PL INSTALLDIRS=vendor
+ make
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/staging/glew/PKGBUILD b/staging/glew/PKGBUILD
new file mode 100644
index 000000000..6270e8c8f
--- /dev/null
+++ b/staging/glew/PKGBUILD
@@ -0,0 +1,29 @@
+# $Id: PKGBUILD 125318 2011-05-25 20:28:27Z stephane $
+# Maintainer: Stéphane Gaudreault <stephane@archlinux.org>
+# Contributor: SleepyDog
+
+pkgname=glew
+pkgver=1.6.0
+pkgrel=1
+pkgdesc="The OpenGL Extension Wrangler Library"
+arch=('i686' 'x86_64')
+url="http://glew.sourceforge.net"
+license=('BSD' 'MIT' 'GPL')
+depends=('libxmu' 'libxi' 'mesa')
+source=(http://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tgz)
+sha1sums=('ed555d15d0f01239b262c4cf803e97d60d8a18b6')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ sed -i 's|lib64|lib|' config/Makefile.linux
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make GLEW_DEST="${pkgdir}/usr" install.all
+ install -D -m644 LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+
+ rm "${pkgdir}"/usr/lib/{libGLEW,libGLEWmx}.a
+ chmod 0755 "${pkgdir}"/usr/lib/libGLEW*.so.${pkgver}
+}
diff --git a/staging/gnome-perl/PKGBUILD b/staging/gnome-perl/PKGBUILD
new file mode 100644
index 000000000..81f68ee25
--- /dev/null
+++ b/staging/gnome-perl/PKGBUILD
@@ -0,0 +1,23 @@
+# $Id: PKGBUILD 125159 2011-05-25 19:04:51Z foutrelis $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+
+pkgname=gnome-perl
+_realname=Gnome2
+pkgver=1.042
+pkgrel=6
+pkgdesc="Perl bindings for libgnome"
+arch=('i686' 'x86_64')
+license=('LGPL')
+url="http://gtk2-perl.sourceforge.net/"
+makedepends=('perl-extutils-pkgconfig' 'perl-extutils-depends')
+depends=('gnomecanvas-perl' 'gnome-vfs-perl' 'libgnomeui' 'perl')
+options=('!emptydirs')
+source=(http://downloads.sourceforge.net/sourceforge/gtk2-perl/${_realname}-${pkgver}.tar.gz)
+md5sums=('eb7b624114e45e54e022a633ffc1cce6')
+
+build() {
+ cd "${srcdir}/${_realname}-${pkgver}"
+ perl Makefile.PL INSTALLDIRS=vendor
+ make
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/staging/gnome-vfs-perl/PKGBUILD b/staging/gnome-vfs-perl/PKGBUILD
new file mode 100644
index 000000000..3960f5285
--- /dev/null
+++ b/staging/gnome-vfs-perl/PKGBUILD
@@ -0,0 +1,23 @@
+# $Id: PKGBUILD 125162 2011-05-25 19:05:23Z foutrelis $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+
+pkgname=gnome-vfs-perl
+_realname=Gnome2-VFS
+pkgver=1.081
+pkgrel=4
+pkgdesc="Gnome2-VFS perl bindings for gnome-vfs"
+arch=(i686 x86_64)
+license=('LGPL')
+url="http://gtk2-perl.sourceforge.net/"
+makedepends=('perl-extutils-pkgconfig' 'perl-extutils-depends')
+depends=('gtk2-perl' 'gnome-vfs' 'perl')
+options=('!emptydirs')
+source=(http://downloads.sourceforge.net/sourceforge/gtk2-perl/${_realname}-${pkgver}.tar.gz)
+md5sums=('3d220cbbe9f1ebc78d7047593f9cd633')
+
+build() {
+ cd "${srcdir}/${_realname}-${pkgver}"
+ perl Makefile.PL INSTALLDIRS=vendor
+ make
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/staging/gnomecanvas-perl/PKGBUILD b/staging/gnomecanvas-perl/PKGBUILD
new file mode 100644
index 000000000..2563caae4
--- /dev/null
+++ b/staging/gnomecanvas-perl/PKGBUILD
@@ -0,0 +1,23 @@
+# $Id: PKGBUILD 125156 2011-05-25 19:04:24Z foutrelis $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+
+pkgname=gnomecanvas-perl
+_realname=Gnome2-Canvas
+pkgver=1.002
+pkgrel=8
+pkgdesc="Gnome2-Canvas perl bindings for libgnomecanvas"
+arch=('i686' 'x86_64')
+license=('LGPL')
+url="http://gtk2-perl.sourceforge.net/"
+makedepends=('perl-extutils-pkgconfig' 'perl-extutils-depends')
+depends=('gtk2-perl' 'libgnomecanvas' 'perl')
+options=(!emptydirs)
+source=(http://downloads.sourceforge.net/sourceforge/gtk2-perl/${_realname}-${pkgver}.tar.gz)
+md5sums=('93405a987ba4bbd03c2f91592b88f5cb')
+
+build() {
+ cd "${srcdir}/${_realname}-${pkgver}"
+ PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
+ make
+ make install DESTDIR="${pkgdir}"
+}
diff --git a/staging/gnumeric/PKGBUILD b/staging/gnumeric/PKGBUILD
new file mode 100644
index 000000000..2fd9e4799
--- /dev/null
+++ b/staging/gnumeric/PKGBUILD
@@ -0,0 +1,36 @@
+# $Id: PKGBUILD 125165 2011-05-25 19:05:49Z foutrelis $
+# Maintainer: Eric Belanger <eric@archlinux.org>
+# Contributor: Kritoke <typeolinux@yahoo.com>
+
+pkgname=gnumeric
+pkgver=1.10.15
+pkgrel=2
+pkgdesc="A GNOME Spreadsheet Program"
+arch=('i686' 'x86_64')
+url="http://www.gnome.org/projects/gnumeric/"
+license=('GPL')
+depends=('goffice' 'gconf' 'desktop-file-utils' 'hicolor-icon-theme')
+makedepends=('intltool' 'python2' 'gnome-doc-utils' 'pygobject' 'psiconv')
+optdepends=('pygobject: for python plugin support'
+ 'psiconv: for Psion 5 file support'
+ 'yelp: for viewing the help manual')
+install=gnumeric.install
+options=('libtool')
+source=(http://ftp.gnome.org/pub/gnome/sources/${pkgname}/${pkgver%.*}/${pkgname}-${pkgver}.tar.bz2)
+sha256sums=('4343a8e72bd19380d83ab5d4937388b2327e0dbb6187296e66dc7ca2d2b9025a')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
+ --disable-schemas-install --enable-ssindex
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+
+ install -d "${pkgdir}/usr/share/gconf/schemas"
+ gconf-merge-schema "${pkgdir}/usr/share/gconf/schemas/${pkgname}.schemas" --domain gnumeric "${pkgdir}"/etc/gconf/schemas/*.schemas
+ rm -rf "${pkgdir}/etc/gconf"
+}
diff --git a/staging/gnumeric/gnumeric.install b/staging/gnumeric/gnumeric.install
new file mode 100644
index 000000000..50ee0a7e2
--- /dev/null
+++ b/staging/gnumeric/gnumeric.install
@@ -0,0 +1,26 @@
+pkgname=gnumeric
+
+post_install() {
+ usr/bin/glib-compile-schemas usr/share/glib-2.0/schemas
+ usr/sbin/gconfpkg --install ${pkgname}
+ gtk-update-icon-cache -q -t -f usr/share/icons/hicolor
+ update-desktop-database -q
+}
+
+pre_upgrade() {
+ pre_remove $1
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+pre_remove() {
+ usr/sbin/gconfpkg --uninstall ${pkgname}
+}
+
+post_remove() {
+ usr/bin/glib-compile-schemas usr/share/glib-2.0/schemas
+ gtk-update-icon-cache -q -t -f usr/share/icons/hicolor
+ update-desktop-database -q
+}
diff --git a/staging/hugin/PKGBUILD b/staging/hugin/PKGBUILD
new file mode 100644
index 000000000..d09e302dd
--- /dev/null
+++ b/staging/hugin/PKGBUILD
@@ -0,0 +1,40 @@
+# $Id: PKGBUILD 125347 2011-05-26 02:15:23Z eric $
+# Maintainer: Tobias Kieslich <tobias@archlinux.org>
+# Contributor: Giovanni Scafora <giovanni@archlinux.org>
+# Contributor: Dominik Ryba <domryba@post.pl>
+
+pkgname=hugin
+pkgver=2010.4.0
+pkgrel=4
+pkgdesc="A frontend to the panorama-tools"
+arch=('i686' 'x86_64')
+url="http://hugin.sourceforge.net/"
+license=('LGPL')
+depends=('wxgtk' 'libpano13' 'boost-libs' 'enblend-enfuse' 'exiv2' 'openexr'
+ 'autopano-sift-c' 'lapack' 'desktop-file-utils' 'make' 'perl-exiftool')
+makedepends=('zip' 'cmake' 'boost')
+install=${pkgname}.install
+source=(http://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.bz2 hugin-gcc46.patch)
+md5sums=('bfd716655461987312b2f2f00c90dcc5'
+ '4393c7b31da60f230c85e63a6a2e43a0')
+sha1sums=('47f25c0a8b97c27108e567bcd22203c87f268d07'
+ '52798a155a037f853f41402f797e8a4cb6bb3e07')
+
+build() {
+ cd "${srcdir}"
+ (cd ${pkgname}-${pkgver}; patch -p1 -i ../hugin-gcc46.patch)
+ mkdir build && cd build
+
+ cmake "${srcdir}/${pkgname}-${pkgver}" \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_EXE_LINKER_FLAGS="-lpthread" \
+ -DENABLE_LAPACK=yes
+
+ make
+}
+
+package(){
+ cd "${srcdir}/build"
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/staging/hugin/hugin-gcc46.patch b/staging/hugin/hugin-gcc46.patch
new file mode 100644
index 000000000..98a70ad50
--- /dev/null
+++ b/staging/hugin/hugin-gcc46.patch
@@ -0,0 +1,16 @@
+
+diff -r 0377a1af6110 -r 1fc6ad6e7c7a src/foreign/vigra/vigra/multi_iterator.hxx
+--- a/src/foreign/vigra/vigra/multi_iterator.hxx Mon Jun 25 16:36:21 2007 +0000
++++ b/src/foreign/vigra/vigra/multi_iterator.hxx Tue Jan 25 21:14:13 2011 +0000
+@@ -41,6 +41,7 @@
+ #define VIGRA_MULTI_ITERATOR_HXX
+
+ #include <sys/types.h>
++#include <stddef.h>
+ #include "tinyvector.hxx"
+ #include "iteratortags.hxx"
+
+
+
+
+
diff --git a/staging/hugin/hugin.install b/staging/hugin/hugin.install
new file mode 100644
index 000000000..362749233
--- /dev/null
+++ b/staging/hugin/hugin.install
@@ -0,0 +1,15 @@
+post_install() {
+ gtk-update-icon-cache -q -t -f usr/share/icons/gnome
+ update-desktop-database -q
+ update-mime-database usr/share/mime > /dev/null
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+post_remove() {
+ gtk-update-icon-cache -q -t -f usr/share/icons/gnome
+ update-desktop-database -q
+ update-mime-database usr/share/mime > /dev/null
+}
diff --git a/staging/irssi/PKGBUILD b/staging/irssi/PKGBUILD
new file mode 100644
index 000000000..bba878633
--- /dev/null
+++ b/staging/irssi/PKGBUILD
@@ -0,0 +1,29 @@
+# $Id: PKGBUILD 125226 2011-05-25 19:11:10Z foutrelis $
+# Maintainer: Giovanni Scafora <giovanni@archlinux.org>
+# Contributor: Dan McGee <dan@archlinux.org>
+
+pkgname=irssi
+pkgver=0.8.15
+pkgrel=5
+pkgdesc="Modular text mode IRC client with Perl scripting"
+arch=('i686' 'x86_64')
+url="http://irssi.org/"
+license=('GPL')
+depends=('glib2' 'openssl' 'perl')
+optdepends=('perl-libwww: for the scriptassist script')
+backup=(etc/irssi.conf)
+source=(http://irssi.org/files/${pkgname}-${pkgver}.tar.bz2)
+options=('!libtool')
+md5sums=('1dcb3f511b88df94b0c996f36668c7da')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ ./configure --prefix=/usr \
+ --enable-ipv6 \
+ --with-proxy \
+ --sysconfdir=/etc \
+ --with-perl-lib=vendor
+ make
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/staging/libproxy/PKGBUILD b/staging/libproxy/PKGBUILD
new file mode 100644
index 000000000..7fde7ae6d
--- /dev/null
+++ b/staging/libproxy/PKGBUILD
@@ -0,0 +1,41 @@
+# $Id: PKGBUILD 24494 2009-01-17 20:42:01Z jgc $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+
+pkgname=libproxy
+pkgver=0.4.6
+pkgrel=7
+pkgdesc="A library that provides automatic proxy configuration management"
+arch=(i686 x86_64)
+license=('LGPL')
+depends=('gcc-libs')
+optdepends=('gconf: GNOME configuration module'
+ 'kdelibs: KDE configuration module'
+ 'networkmanager: NetworkManager configuration module'
+ 'perl: Perl bindings'
+ 'python2: Python bindings')
+makedepends=('gconf' 'cmake' 'networkmanager' 'automoc4' 'python2' 'kdelibs' 'perl')
+url="http://libproxy.googlecode.com"
+source=(http://libproxy.googlecode.com/files/${pkgname}-${pkgver}.tar.gz)
+options=('!libtool')
+md5sums=('199c6b120baf1f7258a55f38d5ec74f5')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ mkdir build
+ cd build
+ cmake -DCMAKE_INSTALL_PREFIX=/usr \
+ -DLIBEXEC_INSTALL_DIR=/usr/lib/libproxy \
+ -DCMAKE_SKIP_RPATH=ON \
+ -DPERL_VENDORINSTALL=yes \
+ -DCMAKE_BUILD_TYPE=None \
+ -DWITH_WEBKIT=OFF \
+ -DCMAKE_CXX_FLAGS="${CXXFLAGS}" \
+ -DCMAKE_C_FLAGS="${CFLAGS}" \
+ ..
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}/build"
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/staging/mod_perl/PKGBUILD b/staging/mod_perl/PKGBUILD
new file mode 100644
index 000000000..33f4e7901
--- /dev/null
+++ b/staging/mod_perl/PKGBUILD
@@ -0,0 +1,27 @@
+# $Id: PKGBUILD 125232 2011-05-25 19:12:54Z foutrelis $
+# Maintainer: Firmicus <francois.archlinux.org>
+# Contributor: Tom K <tomk@runbox.com>
+
+pkgname=mod_perl
+pkgver=2.0.5
+pkgrel=2
+pkgdesc="Apache module that embeds the Perl interpreter within the server"
+url="http://search.cpan.org/dist/${_realname}/"
+depends=('perl=5.12.3' 'apache' 'db' 'apr-util')
+license=('APACHE')
+arch=('i686' 'x86_64')
+options=(!emptydirs)
+source=(http://search.cpan.org/CPAN/authors/id/P/PH/PHRED/${pkgname}-${pkgver}.tar.gz)
+md5sums=('03d01d135a122bd8cebd0cd5b185d674')
+
+build() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ # install module in vendor directories.
+ perl Makefile.PL INSTALLDIRS=vendor MP_APXS=/usr/sbin/apxs
+ make
+}
+
+package() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ make install DESTDIR=${pkgdir}
+}
diff --git a/staging/net-snmp/PKGBUILD b/staging/net-snmp/PKGBUILD
new file mode 100644
index 000000000..42faa88a3
--- /dev/null
+++ b/staging/net-snmp/PKGBUILD
@@ -0,0 +1,43 @@
+# $Id: PKGBUILD 125239 2011-05-25 19:13:43Z foutrelis $
+# Maintainer: Eric Belanger <eric@archlinux.org>
+# Contributor: Dale Blount <dale@archlinux.org>
+
+pkgname=net-snmp
+pkgver=5.6.1
+pkgrel=2
+pkgdesc="A suite of applications used to implement SNMP v1, SNMP v2c and SNMP v3 using both IPv4 and IPv6"
+arch=('i686' 'x86_64')
+url="http://www.net-snmp.org/"
+license=('custom')
+depends=('openssl' 'tcp_wrappers' 'libnl')
+makedepends=('setuptools')
+optdepends=('perl-term-readkey: for snmpcheck application'
+ 'perl-tk: for snmpcheck and tkmib applications'
+ 'python2: for the python modules')
+provides=('ucd-snmp')
+options=('!libtool' '!makeflags' '!emptydirs')
+source=("http://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}-${pkgver}.tar.gz"
+ 'snmpd.rc')
+md5sums=('b4e30ead5783b0bb1d280172c6095ea4'
+ '9f0d13676ba1fae1eb7eb178edd85b43')
+sha1sums=('45bbf1295253d5379a5d1efd918593160387fd00' '2c679b564a2c319d9ce2714a9776aa0e6d89c60a')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ sed -i -e "s:\(install --basedir=\$\$dir\):\1 --root='${pkgdir}':" Makefile.in
+ ./configure --prefix=/usr --sysconfdir=/etc --mandir=/usr/share/man \
+ --enable-ucd-snmp-compatibility --enable-ipv6 --with-libwrap --with-python-modules \
+ --with-default-snmp-version="3" --with-sys-contact="root@localhost" \
+ --with-sys-location="Unknown" --with-logfile="/var/log/snmpd.log" \
+ --with-mib-modules="host misc/ipfwacc ucd-snmp/diskio tunnel ucd-snmp/dlmod" \
+ --with-persistent-directory="/var/net-snmp" \
+ PYTHONPROG=/usr/bin/python2
+ make NETSNMP_DONT_CHECK_VERSION=1 LDFLAGS+="-Wl,-rpath -Wl,/usr/lib/perl5/core_perl/CORE"
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make DESTDIR="${pkgdir}" INSTALL_PREFIX="${pkgdir}" INSTALLDIRS=vendor install
+ install -D -m755 "${srcdir}/snmpd.rc" "${pkgdir}/etc/rc.d/snmpd"
+ install -D -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING"
+}
diff --git a/staging/net-snmp/libnl-2.patch b/staging/net-snmp/libnl-2.patch
new file mode 100644
index 000000000..7c140fe83
--- /dev/null
+++ b/staging/net-snmp/libnl-2.patch
@@ -0,0 +1,67 @@
+diff -Nur net-snmp-5.5.orig//agent/mibgroup/mibII/tcpTable.c net-snmp-5.5//agent/mibgroup/mibII/tcpTable.c
+--- net-snmp-5.5.orig//agent/mibgroup/mibII/tcpTable.c 2009-06-13 04:02:02.000000000 +0200
++++ net-snmp-5.5//agent/mibgroup/mibII/tcpTable.c 2011-01-15 10:31:03.579735957 +0100
+@@ -555,8 +555,10 @@
+ static int
+ tcpTable_load_netlink()
+ {
++ int err;
++
+ /* TODO: perhaps use permanent nl handle? */
+- struct nl_handle *nl = nl_handle_alloc();
++ struct nl_sock *nl = nl_socket_alloc();
+
+ if (nl == NULL) {
+ DEBUGMSGTL(("mibII/tcpTable", "Failed to allocate netlink handle\n"));
+@@ -564,10 +566,10 @@
+ return -1;
+ }
+
+- if (nl_connect(nl, NETLINK_INET_DIAG) < 0) {
+- DEBUGMSGTL(("mibII/tcpTable", "Failed to connect to netlink: %s\n", nl_geterror()));
+- snmp_log(LOG_ERR, "snmpd: Couldn't connect to netlink: %s\n", nl_geterror());
+- nl_handle_destroy(nl);
++ if ((err = nl_connect(nl, NETLINK_INET_DIAG)) < 0) {
++ DEBUGMSGTL(("mibII/tcpTable", "Failed to connect to netlink: %s\n", nl_geterror(err)));
++ snmp_log(LOG_ERR, "snmpd: Couldn't connect to netlink: %s\n", nl_geterror(err));
++ nl_socket_free(nl);
+ return -1;
+ }
+
+@@ -579,10 +581,10 @@
+ struct nl_msg *nm = nlmsg_alloc_simple(TCPDIAG_GETSOCK, NLM_F_ROOT|NLM_F_MATCH|NLM_F_REQUEST);
+ nlmsg_append(nm, &req, sizeof(struct inet_diag_req), 0);
+
+- if (nl_send_auto_complete(nl, nm) < 0) {
+- DEBUGMSGTL(("mibII/tcpTable", "nl_send_autocomplete(): %s\n", nl_geterror()));
+- snmp_log(LOG_ERR, "snmpd: nl_send_autocomplete(): %s\n", nl_geterror());
+- nl_handle_destroy(nl);
++ if ((err = nl_send_auto_complete(nl, nm)) < 0) {
++ DEBUGMSGTL(("mibII/tcpTable", "nl_send_autocomplete(): %s\n", nl_geterror(err)));
++ snmp_log(LOG_ERR, "snmpd: nl_send_autocomplete(): %s\n", nl_geterror(err));
++ nl_socket_free(nl);
+ return -1;
+ }
+ nlmsg_free(nm);
+@@ -593,9 +595,9 @@
+
+ while (running) {
+ if ((len = nl_recv(nl, &peer, &buf, NULL)) <= 0) {
+- DEBUGMSGTL(("mibII/tcpTable", "nl_recv(): %s\n", nl_geterror()));
+- snmp_log(LOG_ERR, "snmpd: nl_recv(): %s\n", nl_geterror());
+- nl_handle_destroy(nl);
++ DEBUGMSGTL(("mibII/tcpTable", "nl_recv(): %s\n", nl_geterror(len)));
++ snmp_log(LOG_ERR, "snmpd: nl_recv(): %s\n", nl_geterror(len));
++ nl_socket_free(nl);
+ return -1;
+ }
+
+@@ -644,7 +646,7 @@
+ free(buf);
+ }
+
+- nl_handle_destroy(nl);
++ nl_socket_free(nl);
+
+ if (tcp_head) {
+ DEBUGMSGTL(("mibII/tcpTable", "Loaded TCP Table using netlink\n"));
diff --git a/staging/net-snmp/snmpd.rc b/staging/net-snmp/snmpd.rc
new file mode 100644
index 000000000..9f1b83f64
--- /dev/null
+++ b/staging/net-snmp/snmpd.rc
@@ -0,0 +1,38 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+PID=`pidof -o %PPID /usr/sbin/snmpd`
+case "$1" in
+ start)
+ stat_busy "Starting Net-SNMP"
+ [ -z "$PID" ] && /usr/sbin/snmpd
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ echo $PID > /var/run/snmpd.pid
+ add_daemon snmpd
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping Net-SNMP"
+ [ ! -z "$PID" ] && kill $PID &> /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm /var/run/snmpd.pid
+ rm_daemon snmpd
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 2
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0
diff --git a/staging/perl-bit-vector/PKGBUILD b/staging/perl-bit-vector/PKGBUILD
new file mode 100644
index 000000000..ebdc0719d
--- /dev/null
+++ b/staging/perl-bit-vector/PKGBUILD
@@ -0,0 +1,33 @@
+# $Id: PKGBUILD 125243 2011-05-25 19:15:01Z foutrelis $
+# Maintainer: Kevin Piche <kevin@archlinux.org>
+# Contributor: K. Piche <kpiche@rogers.com>
+
+pkgname=perl-bit-vector
+_cpanname=Bit-Vector
+pkgver=7.1
+pkgrel=3
+pkgdesc='Efficient bit vector, set of integers and "big int" math library'
+arch=(i686 x86_64)
+license=('GPL' 'LGPL' 'PerlArtistic')
+url="http://search.cpan.org/dist/${_cpanname}/"
+depends=('perl-carp-clan' 'perl>=5.10.0')
+options=(!emptydirs)
+source=(http://search.cpan.org/CPAN/authors/id/S/ST/STBEY/${_cpanname}-${pkgver}.tar.gz)
+md5sums=('164c8574b728f6171b2a6f564fcd2e50')
+
+build() {
+ cd ${srcdir}/${_cpanname}-$pkgver
+ # install module in vendor directories.
+ PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
+ make
+ make test
+}
+
+package() {
+ cd ${srcdir}/${_cpanname}-$pkgver
+ make install DESTDIR=${pkgdir}
+
+ # remove perllocal.pod and .packlist
+ find ${pkgdir} -name perllocal.pod -delete
+ find ${pkgdir} -name .packlist -delete
+}
diff --git a/staging/perl-crypt-ssleay/PKGBUILD b/staging/perl-crypt-ssleay/PKGBUILD
new file mode 100644
index 000000000..37f315f89
--- /dev/null
+++ b/staging/perl-crypt-ssleay/PKGBUILD
@@ -0,0 +1,31 @@
+# $Id: PKGBUILD 125246 2011-05-25 19:15:29Z foutrelis $
+# Maintainer: Giovanni Scafora <giovanni@archlinux.org>
+# Contributor: François Charette <firmicus ατ gmx δοτ net>
+
+pkgname=perl-crypt-ssleay
+pkgver=0.58
+pkgrel=3
+pkgdesc="OpenSSL glue that provides LWP https support"
+arch=('i686' 'x86_64')
+url="http://search.cpan.org/dist/Crypt-SSLeay"
+license=('GPL' 'PerlArtistic')
+depends=('openssl')
+options=('!emptydirs')
+source=(http://www.cpan.org/CPAN/authors/id/N/NA/NANIS/Crypt-SSLeay-$pkgver.tar.gz)
+md5sums=('fbf3d12e58462cee00ea63239c0b13c7')
+
+build() {
+ cd "${srcdir}/Crypt-SSLeay-${pkgver}"
+
+ PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
+ make
+ make test
+}
+
+package() {
+ cd "${srcdir}/Crypt-SSLeay-${pkgver}"
+ make install DESTDIR="${pkgdir}"
+
+ find ${pkgdir} -name '.packlist' -delete
+ find ${pkgdir} -name '*.pod' -delete
+}
diff --git a/staging/perl-dbd-mysql/PKGBUILD b/staging/perl-dbd-mysql/PKGBUILD
new file mode 100644
index 000000000..42d22d211
--- /dev/null
+++ b/staging/perl-dbd-mysql/PKGBUILD
@@ -0,0 +1,49 @@
+# $Id: PKGBUILD 125309 2011-05-25 19:54:00Z remy $
+# Maintainer: kevin <kevin@archlinux.org>
+# Contributor: Eric Johnson <eric@coding-zone.com>
+
+pkgname=perl-dbd-mysql
+_realname=DBD-mysql
+pkgver=4.019
+pkgrel=1
+pkgdesc="Perl/CPAN DBD::mysql module for interacting with MySQL via DBD"
+arch=(i686 x86_64)
+license=('GPL' 'PerlArtistic')
+url="http://search.cpan.org/dist/${_realname}/"
+depends=('libmysqlclient' 'perl-dbi' 'perl>=5.14.0')
+makedepends=('mysql')
+options=(!emptydirs)
+source=(http://search.cpan.org/CPAN/authors/id/C/CA/CAPTTOFU/${_realname}-${pkgver}.tar.gz)
+md5sums=('566d98ab8ffac9626a31f6f6d455558e')
+
+build() {
+ cd ${srcdir}/${_realname}-${pkgver}
+
+ # install module in vendor directories.
+ perl Makefile.PL INSTALLDIRS=vendor --testsocket=/tmp/socket.mysql
+ make
+}
+
+check() {
+ cd ${srcdir}/${_realname}-${pkgver}
+ mkdir -p /tmp/mysql_test
+ mysql_install_db \
+ --basedir=/usr \
+ --datadir=/tmp/mysql_test
+ mysqld -P 17999 \
+ --socket=/tmp/socket.mysql \
+ --datadir=/tmp/mysql_test &
+ sleep 10
+ DAEMON_PORT=$!
+ make test || true
+ kill -9 $DAEMON_PORT
+}
+
+package() {
+ cd ${srcdir}/${_realname}-${pkgver}
+ make install DESTDIR=${pkgdir}
+
+ # remove perllocal.pod and .packlist
+ find ${pkgdir} -name perllocal.pod -delete
+ find ${pkgdir} -name .packlist -delete
+}
diff --git a/staging/perl-dbd-sqlite/PKGBUILD b/staging/perl-dbd-sqlite/PKGBUILD
new file mode 100644
index 000000000..298cc2008
--- /dev/null
+++ b/staging/perl-dbd-sqlite/PKGBUILD
@@ -0,0 +1,28 @@
+# $Id: PKGBUILD 125249 2011-05-25 19:15:53Z foutrelis $
+# Contributor: Tom Killian <tomk@runbox.com>
+# Contributor: francois at archlinux dot org
+
+pkgname=perl-dbd-sqlite
+_cpanname=DBD-SQLite
+pkgver=1.31
+pkgrel=2
+pkgdesc="Self-contained RDBMS in a DBI driver"
+arch=('i686' 'x86_64')
+url="http://search.cpan.org/dist/${_cpanname}"
+license=('GPL' 'PerlArtistic')
+depends=('perl-dbi>=1.61' 'sqlite3')
+options=('!emptydirs')
+source=(http://www.cpan.org/authors/id/A/AD/ADAMK/${_cpanname}-${pkgver}.tar.gz)
+md5sums=('67b3575104efd606c8093bc416e3338d')
+
+build() {
+ cd "${srcdir}/${_cpanname}-${pkgver}"
+ PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
+ make
+ make test
+}
+
+package() {
+ cd "${srcdir}/${_cpanname}-${pkgver}"
+ make install DESTDIR="${pkgdir}"
+}
diff --git a/staging/perl-dbi/PKGBUILD b/staging/perl-dbi/PKGBUILD
new file mode 100644
index 000000000..42f7a5770
--- /dev/null
+++ b/staging/perl-dbi/PKGBUILD
@@ -0,0 +1,32 @@
+# $Id: PKGBUILD 124915 2011-05-25 07:47:08Z foutrelis $
+# Maintainer: kevin <kevin@archlinux.org>
+# Contributor: Matt Thompson <mattt@defunct.ca>
+
+pkgname=perl-dbi
+_realname=DBI
+pkgver=1.616
+pkgrel=2
+pkgdesc="Database independent interface for Perl"
+arch=(i686 x86_64)
+license=('GPL' 'PerlArtistic')
+url="http://search.cpan.org/dist/${_realname}/"
+depends=('perl>=5.12.1')
+options=(!emptydirs)
+source=(http://www.cpan.org/authors/id/T/TI/TIMB/${_realname}-${pkgver}.tar.gz)
+md5sums=('799313e54a693beb635b47918458f7c4')
+
+build() {
+ cd "${srcdir}/${_realname}-${pkgver}"
+
+ # install module in vendor directories.
+ perl Makefile.PL INSTALLDIRS=vendor
+ make
+ make test
+}
+
+package() {
+ cd "${srcdir}/${_realname}-${pkgver}"
+ make install DESTDIR="${pkgdir}"
+}
+
+# vim: ts=2 sw=2 et ft=sh
diff --git a/staging/perl-digest-nilsimsa/PKGBUILD b/staging/perl-digest-nilsimsa/PKGBUILD
new file mode 100644
index 000000000..40e9ae353
--- /dev/null
+++ b/staging/perl-digest-nilsimsa/PKGBUILD
@@ -0,0 +1,35 @@
+# $Id: PKGBUILD 125252 2011-05-25 19:16:38Z foutrelis $
+# Maintainer: kevin <kevin@archlinux.org>
+# Contributor: Manolis Tzanidakis
+
+pkgname=perl-digest-nilsimsa
+_realname=Digest-Nilsimsa
+pkgver=0.06
+pkgrel=7
+pkgdesc="Perl version of Nilsimsa code."
+arch=('i686' 'x86_64')
+license=('LGPL')
+url="http://search.cpan.org/dist/${_realname}/"
+depends=('perl>=5.10.0')
+options=(!emptydirs)
+source=(http://www.cpan.org/authors/id/V/VI/VIPUL/${_realname}-${pkgver}.tar.gz)
+replaces=('digest-nilsimsa')
+provides=('digest-nilsimsa')
+md5sums=('08e940bd7f5d1167ef3fd1aa7ce234d7')
+
+build() {
+ cd ${srcdir}/${_realname}-${pkgver}
+ # install module in vendor directories.
+ PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
+ make
+ make test
+}
+
+package() {
+ cd ${srcdir}/${_realname}-${pkgver}
+ make install DESTDIR=${pkgdir}
+ # remove perllocal.pod and .packlist
+ find ${pkgdir} -name perllocal.pod -delete
+ find ${pkgdir} -name .packlist -delete
+}
+# vim: ts=2 sw=2 et ft=sh
diff --git a/staging/perl-digest-sha1/PKGBUILD b/staging/perl-digest-sha1/PKGBUILD
new file mode 100644
index 000000000..eaae5e528
--- /dev/null
+++ b/staging/perl-digest-sha1/PKGBUILD
@@ -0,0 +1,38 @@
+# $Id: PKGBUILD 125255 2011-05-25 19:17:02Z foutrelis $
+# Maintainer: kevin <kevin@archlinux.org>
+# Contributor: Manolis Tzanidakis
+
+pkgname=perl-digest-sha1
+_realname=Digest-SHA1
+pkgver=2.13
+pkgrel=2
+pkgdesc="Perl interface to the SHA-1 Algorithm"
+arch=(i686 x86_64)
+license=('PerlArtistic')
+url="http://search.cpan.org/dist/${_realname}/"
+depends=('perl>=5.10.0')
+options=(!emptydirs)
+source=(http://www.cpan.org/authors/id/G/GA/GAAS/${_realname}-${pkgver}.tar.gz)
+replaces=('digest-sha1')
+provides=('digest-sha1')
+md5sums=('bd22388f268434f2b24f64e28bf1aa35')
+
+build() {
+ cd ${srcdir}/${_realname}-${pkgver}
+
+ # install module in vendor directories.
+ perl Makefile.PL INSTALLDIRS=vendor
+ make
+ make test
+}
+
+package() {
+ cd ${srcdir}/${_realname}-${pkgver}
+
+ make install DESTDIR=${pkgdir}
+
+ # remove perllocal.pod and .packlist
+ find ${pkgdir} -name perllocal.pod -delete
+ find ${pkgdir} -name .packlist -delete
+}
+# vim: ts=2 sw=2 et ft=sh
diff --git a/staging/perl-event/PKGBUILD b/staging/perl-event/PKGBUILD
new file mode 100644
index 000000000..3e20ec4c2
--- /dev/null
+++ b/staging/perl-event/PKGBUILD
@@ -0,0 +1,36 @@
+# $Id: PKGBUILD 125258 2011-05-25 19:17:24Z foutrelis $
+# Maintainer: tobias <tobias@archlinux.org>
+# Contributor: Tobias Kieslich <tobias@justdreams.de>
+# Contributor: François Charette <francois.archlinux.org>
+
+pkgname=perl-event
+_srcname=Event
+pkgver=1.17
+pkgrel=1
+pkgdesc="Framework for GUI events"
+arch=('i686' 'x86_64')
+license=('PerlArtistic' 'GPL')
+url="http://search.cpan.org/dist/${_srcname}/"
+depends=('perl')
+options=(!emptydirs)
+source=(http://search.cpan.org/CPAN/authors/id/J/JP/JPRIT/${_srcname}-${pkgver}.tar.gz)
+md5sums=('c58cdf7c56cd5f10a58b234d2c81295f')
+
+build() {
+ cd "${srcdir}/${_srcname}-${pkgver}"
+
+ # install module in vendor directories.
+ perl Makefile.PL INSTALLDIRS=vendor
+ make
+ make test
+}
+
+package() {
+ cd "${srcdir}/${_srcname}-${pkgver}"
+
+ make install DESTDIR="${pkgdir}"
+
+ # remove perllocal.pod and .packlist
+ find ${pkgdir} -name perllocal.pod -delete
+ find ${pkgdir} -name .packlist -delete
+}
diff --git a/staging/perl-fcgi/PKGBUILD b/staging/perl-fcgi/PKGBUILD
new file mode 100644
index 000000000..d44eddf2a
--- /dev/null
+++ b/staging/perl-fcgi/PKGBUILD
@@ -0,0 +1,31 @@
+# $Id: PKGBUILD 125303 2011-05-25 19:27:52Z remy $
+# Maintainer: Giovanni Scafora <giovanni@archlinux.org>
+# Contributor: François Charette <firmicus ατ gmx δοτ net>
+
+pkgname=perl-fcgi
+pkgver=0.72
+pkgrel=1
+pkgdesc="Fast CGI"
+arch=('i686' 'x86_64')
+url="http://search.cpan.org/dist/FCGI"
+license=('GPL' 'PerlArtistic')
+depends=('perl>=5.14')
+options=('!emptydirs')
+source=(http://www.cpan.org/CPAN/authors/id/F/FL/FLORA/FCGI-${pkgver}.tar.gz)
+md5sums=('7b793e177caa93d972c6fb7ebe7c7ae1')
+
+build() {
+ cd "${srcdir}/FCGI-${pkgver}"
+ PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
+ make
+}
+
+check() {
+ cd "${srcdir}/FCGI-${pkgver}"
+ make test
+}
+
+package() {
+ cd "${srcdir}/FCGI-${pkgver}"
+ make install DESTDIR="${pkgdir}"
+}
diff --git a/staging/perl-html-parser/PKGBUILD b/staging/perl-html-parser/PKGBUILD
new file mode 100644
index 000000000..7e3b0a701
--- /dev/null
+++ b/staging/perl-html-parser/PKGBUILD
@@ -0,0 +1,31 @@
+# $Id: PKGBUILD 125261 2011-05-25 19:17:47Z foutrelis $
+# Maintainer: kevin <kevin@archlinux.org>
+# Contributor: Manolis Tzanidakis
+# Contributor: Firmicus <francois.archlinux.org>
+
+pkgname=perl-html-parser
+_realname=HTML-Parser
+pkgver=3.68
+pkgrel=2
+pkgdesc="Perl HTML parser class"
+arch=('i686' 'x86_64')
+license=('PerlArtistic')
+url="http://search.cpan.org/dist/${_realname}/"
+depends=('perl-html-tagset' 'perl>=5.12.1')
+options=(!emptydirs)
+source=(http://www.cpan.org/authors/id/G/GA/GAAS/${_realname}-${pkgver}.tar.gz)
+md5sums=('5550b2da7aa94341f1e8a17a4ac20c68')
+
+build() {
+ cd "${srcdir}/${_realname}-${pkgver}"
+ # install module in vendor directories.
+ perl Makefile.PL INSTALLDIRS=vendor
+ make
+ make test
+}
+
+package() {
+ cd "${srcdir}/${_realname}-${pkgver}"
+ make install DESTDIR="${pkgdir}"
+}
+# vim: ts=2 sw=2 et ft=sh
diff --git a/staging/perl-libintl-perl/PKGBUILD b/staging/perl-libintl-perl/PKGBUILD
new file mode 100644
index 000000000..af266d871
--- /dev/null
+++ b/staging/perl-libintl-perl/PKGBUILD
@@ -0,0 +1,33 @@
+# $Id: PKGBUILD 125264 2011-05-25 19:18:10Z foutrelis $
+# Maintainer: kevin <kevin@archlinux.org>
+# Contributor: Tobias Kieslich <tobias@justdreams.de>
+
+pkgname=perl-libintl-perl
+_realname=libintl-perl
+pkgver=1.20
+pkgrel=3
+pkgdesc="Perl Module: Localization support"
+arch=('i686' 'x86_64')
+license=('LGPL')
+url="http://search.cpan.org/dist/${_realname}/"
+depends=('gettext' 'perl>=5.10.0')
+options=(!emptydirs)
+source=(http://www.cpan.org/authors/id/G/GU/GUIDO/${_realname}-$pkgver.tar.gz)
+md5sums=('cb36f58a7d2e15974f25b35381548b1b')
+
+build() {
+ cd ${srcdir}/${_realname}-$pkgver
+ # install module in vendor directories.
+ perl Makefile.PL INSTALLDIRS=vendor
+ make
+ make test
+}
+
+package() {
+ cd ${srcdir}/${_realname}-$pkgver
+ make install DESTDIR=${pkgdir}
+
+ # remove perllocal.pod and .packlist
+ find ${pkgdir} -name perllocal.pod -delete
+ find ${pkgdir} -name .packlist -delete
+}
diff --git a/staging/perl-locale-gettext/PKGBUILD b/staging/perl-locale-gettext/PKGBUILD
new file mode 100644
index 000000000..6f916e28e
--- /dev/null
+++ b/staging/perl-locale-gettext/PKGBUILD
@@ -0,0 +1,38 @@
+# $Id: PKGBUILD 125267 2011-05-25 19:18:48Z foutrelis $
+# Maintainer: Giovanni Scafora <giovanni@archlinux.org>
+# Contributor: Mark Rosenstand <mark@borkware.net>
+# Contributor: Paul Mattal <paul@archlinux.org>
+
+pkgname=perl-locale-gettext
+_realname=gettext
+pkgver=1.05
+pkgrel=7
+pkgdesc="Permits access from Perl to the gettext() family of functions"
+arch=('i686' 'x86_64')
+license=('GPL' 'PerlArtistic')
+url="http://search.cpan.org/dist/${_realname}/"
+depends=('gettext' 'perl>=5.10.0')
+options=(!emptydirs)
+source=(http://search.cpan.org/CPAN/authors/id/P/PV/PVANDRY/${_realname}-${pkgver}.tar.gz
+ compatibility-with-POSIX-module.patch)
+md5sums=('f3d3f474a1458f37174c410dfef61a46'
+ '854302f34d01a2f8ae739187788973dd')
+
+build() {
+ cd "${srcdir}/${_realname}-${pkgver}"
+
+ patch -Np1 -i ${srcdir}/compatibility-with-POSIX-module.patch
+ # install module in vendor directories.
+ PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
+ make
+ make test
+}
+
+package() {
+ cd "${srcdir}/${_realname}-${pkgver}"
+ make install DESTDIR="${pkgdir}"
+
+ # remove perllocal.pod and .packlist
+ find "${pkgdir}" -name perllocal.pod -delete
+ find "${pkgdir}" -name .packlist -delete
+}
diff --git a/staging/perl-locale-gettext/compatibility-with-POSIX-module.patch b/staging/perl-locale-gettext/compatibility-with-POSIX-module.patch
new file mode 100644
index 000000000..ad675516b
--- /dev/null
+++ b/staging/perl-locale-gettext/compatibility-with-POSIX-module.patch
@@ -0,0 +1,10 @@
+--- a/gettext.pm 2005-05-31 20:11:16.000000000 -0700
++++ b/gettext.pm 2009-10-07 12:39:42.000000000 -0700
+@@ -32,6 +32,7 @@
+ =cut
+
+ use Carp;
++use POSIX qw(:locale_h);
+
+ require Exporter;
+ require DynaLoader;
diff --git a/staging/perl-net-dns/PKGBUILD b/staging/perl-net-dns/PKGBUILD
new file mode 100644
index 000000000..1a4f7c0cc
--- /dev/null
+++ b/staging/perl-net-dns/PKGBUILD
@@ -0,0 +1,33 @@
+# $Id: PKGBUILD 125273 2011-05-25 19:19:34Z foutrelis $
+# Maintainer: kevin <kevin@archlinux.org>
+# Contributor: Manolis Tzanidakis
+
+pkgname=perl-net-dns
+_realname=Net-DNS
+pkgver=0.66
+pkgrel=4
+pkgdesc="Perl Module: Interface to the DNS resolver."
+arch=(i686 x86_64)
+license=('PerlArtistic')
+url="http://search.cpan.org/dist/${_realname}/"
+depends=('perl-digest-hmac' 'perl-net-ip' 'perl>=5.10.0')
+source=(http://www.cpan.org/authors/id/O/OL/OLAF/${_realname}-$pkgver.tar.gz)
+options=(!emptydirs)
+
+build() {
+ cd $srcdir/${_realname}-${pkgver}
+ # install module in vendor directories.
+ PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
+ make
+}
+
+package() {
+ cd $srcdir/${_realname}-${pkgver}
+ make install DESTDIR=${pkgdir}
+
+ # remove perllocal.pod and .packlist
+ find ${pkgdir} -name perllocal.pod -delete
+ find ${pkgdir} -name .packlist -delete
+}
+# vim: ts=2 sw=2 et ft=sh
+md5sums=('1635d876324e3c2f6e277d5778bfe94c')
diff --git a/staging/perl-net-ssleay/PKGBUILD b/staging/perl-net-ssleay/PKGBUILD
new file mode 100644
index 000000000..6620fbd6f
--- /dev/null
+++ b/staging/perl-net-ssleay/PKGBUILD
@@ -0,0 +1,33 @@
+# $Id: PKGBUILD 125276 2011-05-25 19:20:00Z foutrelis $
+# Maintainer: Giovanni Scafora <giovanni@archlinux.org>
+# Contributor: Manolis Tzanidakis
+
+pkgname=perl-net-ssleay
+_cpanname=Net-SSLeay
+pkgver=1.36
+pkgrel=5
+pkgdesc="Perl extension for using OpenSSL"
+arch=('i686' 'x86_64')
+license=('custom:BSD')
+url="http://search.cpan.org/dist/${_cpanname}/"
+depends=('perl' 'openssl')
+options=(!emptydirs)
+replaces=('net-ssleay')
+provides=('net-ssleay')
+source=(http://www.cpan.org/authors/id/F/FL/FLORA/${_cpanname}-${pkgver}.tar.gz)
+md5sums=('54061638720dd6a325395331c77f21d8')
+
+build() {
+ cd ${srcdir}/${_cpanname}-${pkgver}
+ # install module in vendor directories.
+ PERL_MM_USE_DEFAULT=1 perl Makefile.PL -- INSTALLDIRS=vendor
+ make
+ make install DESTDIR=${pkgdir}
+
+ # remove perllocal.pod and .packlist
+ find ${pkgdir} -name perllocal.pod -delete
+ find ${pkgdir} -name .packlist -delete
+
+ install -D -m644 README ${pkgdir}/usr/share/licenses/${pkgname}/README
+}
+# vim: ts=2 sw=2 et ft=sh
diff --git a/staging/perl-net-upnp/PKGBUILD b/staging/perl-net-upnp/PKGBUILD
new file mode 100644
index 000000000..e54c70917
--- /dev/null
+++ b/staging/perl-net-upnp/PKGBUILD
@@ -0,0 +1,27 @@
+# $Id: PKGBUILD 125279 2011-05-25 19:20:27Z foutrelis $
+# Maintainer: Giovanni Scafora <giovanni@archlinux.org>
+# Contributor: Drew Gilbert <gilbert dot drew at gmail dot com>
+
+pkgname=perl-net-upnp
+pkgver=1.4.2
+pkgrel=3
+pkgdesc="Perl Module UPnP"
+arch=('i686' 'x86_64')
+url="http://search.cpan.org/~skonno/Net-UPnP-1.4.2/"
+license=('BSD' 'PerlArtistic')
+options=('!emptydirs')
+source=("http://search.cpan.org/CPAN/authors/id/S/SK/SKONNO/Net-UPnP-${pkgver}.tar.gz")
+depends=('perl')
+md5sums=('bc009fd76b565df40a70aca49af82a7d')
+
+build() {
+ cd "${srcdir}/Net-UPnP-${pkgver}"
+
+ # install module in vendor directories.
+ PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
+ make
+ make install DESTDIR="${pkgdir}"
+
+ find ${pkgdir} -name '.packlist' -delete
+ find ${pkgdir} -name '*.pod' -delete
+}
diff --git a/staging/perl-netaddr-ip/PKGBUILD b/staging/perl-netaddr-ip/PKGBUILD
new file mode 100644
index 000000000..fa6549515
--- /dev/null
+++ b/staging/perl-netaddr-ip/PKGBUILD
@@ -0,0 +1,34 @@
+# $Id: PKGBUILD 125270 2011-05-25 19:19:11Z foutrelis $
+# Maintainer: Dale Blount <dale@archlinux.org>
+# Contributor: Dale Blount <dale@archlinux.org>
+# Contributor: Francois Charette <francois.archlinux.org>
+
+pkgname=perl-netaddr-ip
+_realname=NetAddr-IP
+pkgver=4.037
+pkgrel=2
+pkgdesc="Perl module to manage IP addresses and subnets"
+arch=(i686 x86_64)
+license=('PerlArtistic' 'GPL')
+depends=('perl>=5.10.0')
+options=(!emptydirs)
+url="http://search.cpan.org/dist/${_realname}/"
+source=(http://search.cpan.org/CPAN/authors/id/M/MI/MIKER/${_realname}-${pkgver}.tar.gz)
+md5sums=('d966eac6b5941af3f7c1fad839569cb4')
+
+build() {
+ cd ${srcdir}/${_realname}-${pkgver}
+ # install module in vendor directories.
+ perl Makefile.PL INSTALLDIRS=vendor
+ make
+ make test
+}
+
+package() {
+ cd ${srcdir}/${_realname}-${pkgver}
+ make install DESTDIR=${pkgdir}
+
+ # remove perllocal.pod and .packlist
+ find ${pkgdir} -name perllocal.pod -delete
+ find ${pkgdir} -name .packlist -delete
+}
diff --git a/staging/perl-template-toolkit/PKGBUILD b/staging/perl-template-toolkit/PKGBUILD
new file mode 100644
index 000000000..d955edfdd
--- /dev/null
+++ b/staging/perl-template-toolkit/PKGBUILD
@@ -0,0 +1,32 @@
+# Maintainer: Firmicus <francois.archlinux.org>
+# Contributor: Tom Killian <tomk@runbox.com>
+# Contributor: FJ <joostef@gmail.com>
+
+pkgname=perl-template-toolkit
+_realname=Template-Toolkit
+pkgver=2.22
+pkgrel=4
+pkgdesc="Perl template processing system"
+arch=(i686 x86_64)
+license=('PerlArtistic')
+url="http://search.cpan.org/dist/${_realname}/"
+depends=('perl-appconfig' 'perl>=5.10.0')
+options=(!emptydirs)
+source=(http://search.cpan.org/CPAN/authors/id/A/AB/ABW/${_realname}-$pkgver.tar.gz)
+md5sums=('d98277f6420e5da6b93d99a8db2b3934')
+
+build() {
+ cd ${srcdir}/${_realname}-$pkgver
+ # install module in vendor directories.
+ PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
+ make
+}
+
+package() {
+ cd ${srcdir}/${_realname}-$pkgver
+ make install DESTDIR=${startdir}/pkg
+
+ # remove perllocal.pod and .packlist
+ find ${startdir}/pkg -name perllocal.pod -delete
+ find ${startdir}/pkg -name .packlist -delete
+}
diff --git a/staging/perl-term-readkey/PKGBUILD b/staging/perl-term-readkey/PKGBUILD
new file mode 100644
index 000000000..25f9e397d
--- /dev/null
+++ b/staging/perl-term-readkey/PKGBUILD
@@ -0,0 +1,36 @@
+# $Id: PKGBUILD 125285 2011-05-25 19:22:27Z foutrelis $
+# Maintainer: kevin <kevin@archlinux.org>
+# Contributor: Wael Nasreddine <gandalf@siemens-mobiles.org>
+# Contributor: Francois Charette <francois.archlinux.org>
+
+pkgname=perl-term-readkey
+_realname=TermReadKey
+pkgver=2.30.01
+pkgrel=4
+pkgdesc="Provides simple control over terminal driver modes"
+arch=('i686' 'x86_64')
+license=('custom')
+depends=('perl>=5.10.0' 'glibc')
+url="http://search.cpan.org/~stsi/${_realname}/"
+source=(http://search.cpan.org/CPAN/authors/id/S/ST/STSI/${_realname}-$pkgver.tar.gz)
+options=('!emptydirs')
+md5sums=('6c099eddb76ec9b92179f1ed929be71a')
+
+build()
+{
+ cd ${srcdir}/TermReadKey-$pkgver
+ perl Makefile.PL INSTALLDIRS=vendor
+ make
+ make test
+}
+
+package() {
+ cd ${srcdir}/TermReadKey-$pkgver
+ make DESTDIR=${pkgdir} install
+ install -d ${pkgdir}/usr/share/licenses/$pkgname/
+ head -7 README > ${pkgdir}/usr/share/licenses/$pkgname/LICENSE
+
+ # remove perllocal.pod and .packlist
+ find ${pkgdir} -name perllocal.pod -delete
+ find ${pkgdir} -name .packlist -delete
+}
diff --git a/staging/perl-text-iconv/PKGBUILD b/staging/perl-text-iconv/PKGBUILD
new file mode 100644
index 000000000..acd6932e2
--- /dev/null
+++ b/staging/perl-text-iconv/PKGBUILD
@@ -0,0 +1,28 @@
+# $Id: PKGBUILD 125288 2011-05-25 19:22:57Z foutrelis $
+# Maintainer:
+# Contributor: Francois Charette <firmicus@gmx.net>
+
+pkgname=perl-text-iconv
+_realname=Text-Iconv
+pkgver=1.7
+pkgrel=6
+pkgdesc="Interface to iconv codeset conversion"
+arch=('i686' 'x86_64')
+url="http://search.cpan.org/dist/${_realname}/"
+license=('GPL' 'PerlArtistic')
+depends=('perl>=5.10.0')
+options=('!emptydirs')
+source=(http://www.cpan.org/authors/id/M/MP/MPIOTR/${_realname}-${pkgver}.tar.gz)
+md5sums=('81b26e069eaebb084e91ea3c009b67ae')
+
+build() {
+ cd ${srcdir}/${_realname}-${pkgver}
+ perl Makefile.PL INSTALLDIRS=vendor
+ make
+ make test
+}
+
+package() {
+ cd ${srcdir}/${_realname}-${pkgver}
+ make DESTDIR=${pkgdir} install
+}
diff --git a/staging/perl-time-hires/PKGBUILD b/staging/perl-time-hires/PKGBUILD
new file mode 100644
index 000000000..db9ddcb7f
--- /dev/null
+++ b/staging/perl-time-hires/PKGBUILD
@@ -0,0 +1,25 @@
+# $Id: PKGBUILD 125291 2011-05-25 19:23:52Z foutrelis $
+# Maintainer: Giovanni Scafora <giovanni@archlinux.org>
+# Contributor: mezcal <fila at pruda dot com>
+
+pkgname=perl-time-hires
+pkgver=1.9721
+pkgrel=4
+pkgdesc="Perl module: high resolution time, sleep, and alarm"
+arch=('i686' 'x86_64')
+license=('PerlArtistic')
+url="http://search.cpan.org/dist/Time-HiRes/"
+depends=('perl')
+options=(!emptydirs)
+source=(http://search.cpan.org/CPAN/authors/id/J/JH/JHI/Time-HiRes-${pkgver}.tar.gz)
+md5sums=('bf09911a36b9481537c8e0d28fbb3aaf')
+
+build() {
+ cd "${srcdir}/Time-HiRes-${pkgver}"
+
+ # install module in vendor directories.
+ perl Makefile.PL INSTALLDIRS=vendor
+ make
+ make test
+ make install DESTDIR="${pkgdir}"
+}
diff --git a/staging/perl-unicode-string/PKGBUILD b/staging/perl-unicode-string/PKGBUILD
new file mode 100644
index 000000000..c8bcd6c7a
--- /dev/null
+++ b/staging/perl-unicode-string/PKGBUILD
@@ -0,0 +1,33 @@
+# $Id: PKGBUILD 125294 2011-05-25 19:24:14Z foutrelis $
+# Maintainer: James Rayner <iphitus@gmail.com>
+# Contributor: Andrew Simmons <andrew.simmons@gmail.com>
+
+pkgname=perl-unicode-string
+_realname=Unicode-String
+pkgver=2.09
+pkgrel=6
+pkgdesc="String of Unicode characters for perl (UCS2/UTF16)"
+arch=('i686' 'x86_64')
+license=('PerlArtistic')
+url="http://search.cpan.org/dist/${_realname}/"
+depends=('perl>=5.10.0')
+options=(!emptydirs)
+source=(http://search.cpan.org/CPAN/authors/id/G/GA/GAAS/${_realname}-${pkgver}.tar.gz)
+md5sums=('553e68e603723bf7c631f8701ab0d678')
+
+build() {
+ cd ${srcdir}/${_realname}-${pkgver}
+ # in stall module in vendor directories.
+ PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
+ make
+ make test
+}
+
+package() {
+ cd ${srcdir}/${_realname}-${pkgver}
+ make install DESTDIR=${pkgdir}
+
+ # remove perllocal.pod and .packlist
+ find ${pkgdir} -name perllocal.pod -delete
+ find ${pkgdir} -name .packlist -delete
+}
diff --git a/staging/perl-yaml-syck/PKGBUILD b/staging/perl-yaml-syck/PKGBUILD
new file mode 100644
index 000000000..c2ab5a4f8
--- /dev/null
+++ b/staging/perl-yaml-syck/PKGBUILD
@@ -0,0 +1,37 @@
+# $Id: PKGBUILD 125297 2011-05-25 19:24:39Z foutrelis $
+# This PKGBUILD was generated by cpan4pacman via CPANPLUS::Dist::Pacman
+# Maintainer: kevin <kevin@archlinux.org>
+
+pkgname=perl-yaml-syck
+_realname=YAML-Syck
+pkgver=1.17
+pkgrel=2
+pkgdesc="Fast, lightweight YAML loader and dumper"
+arch=('i686' 'x86_64')
+license=('custom')
+url="http://search.cpan.org/dist/${_realname}/"
+depends=('perl>=5.10.0')
+options=('!emptydirs')
+source=(http://www.cpan.org/authors/id/A/AV/AVAR/${_realname}-$pkgver.tar.gz)
+md5sums=('f788529ad4b2c2fd037ccdfd5e7a88ab')
+
+build() {
+ cd ${srcdir}/${_realname}-$pkgver
+
+ # install module in vendor directories.
+ perl Makefile.PL INSTALLDIRS=vendor
+ make
+ make test
+}
+
+package() {
+ cd ${srcdir}/${_realname}-$pkgver
+ make install DESTDIR=${pkgdir}
+
+ # remove perllocal.pod and .packlist
+ find ${pkgdir} -name perllocal.pod -delete
+ find ${pkgdir} -name .packlist -delete
+
+ # license.
+ install -D -m644 COPYING ${pkgdir}/usr/share/licenses/${pkgname}/COPYING
+}
diff --git a/staging/pidgin/PKGBUILD b/staging/pidgin/PKGBUILD
index a6da4e4f2..3ed646b74 100644
--- a/staging/pidgin/PKGBUILD
+++ b/staging/pidgin/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 124591 2011-05-23 06:05:31Z foutrelis $
+# $Id: PKGBUILD 124935 2011-05-25 09:46:33Z foutrelis $
# Maintainer: Evangelos Foutras <foutrelis@gmail.com>
# Contributor: Ionut Biru <ibiru@archlinux.org>
# Contributor: Andrea Scarpino <andrea@archlinux.org>
@@ -7,7 +7,7 @@
pkgname=('pidgin' 'libpurple' 'finch')
pkgver=2.7.11
-pkgrel=4
+pkgrel=6
arch=('i686' 'x86_64')
url="http://pidgin.im/"
license=('GPL')
@@ -16,12 +16,22 @@ makedepends=('startup-notification' 'gtkspell' 'libxss' 'nss' 'libsasl' 'libsm'
'farsight2' 'avahi' 'tk' 'ca-certificates' 'intltool'
'networkmanager')
options=('!libtool')
-source=(http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.bz2)
-md5sums=('07c2a2535b4d7436b5ec7685fe063fec')
+source=(http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.bz2
+ nm09-pidgin.patch
+ nm09-more.patch)
+md5sums=('07c2a2535b4d7436b5ec7685fe063fec'
+ '744a21b4dbaf949dba7cd3b75b12b4fe'
+ 'a673659d86c7a65aa710f7c8c7feda82')
build() {
cd "$srcdir/$pkgname-$pkgver"
+ # Update for NetworkManager 0.9 connection states
+ # (http://developer.pidgin.im/ticket/13505)
+ # (http://developer.pidgin.im/ticket/13859)
+ patch -Np1 -i "$srcdir/nm09-pidgin.patch"
+ patch -Np1 -i "$srcdir/nm09-more.patch"
+
# Use Python 2
sed -i 's/env python$/\02/' */plugins/*.py \
libpurple/purple-{remote,notifications-example,url-handler}
@@ -100,3 +110,5 @@ package_finch(){
rm "$pkgdir"/usr/share/man/man1/pidgin.1
}
+
+# vim:set ts=2 sw=2 et:
diff --git a/staging/pidgin/nm09-more.patch b/staging/pidgin/nm09-more.patch
new file mode 100644
index 000000000..8c708df9a
--- /dev/null
+++ b/staging/pidgin/nm09-more.patch
@@ -0,0 +1,49 @@
+diff -up pidgin-2.7.11/libpurple/network.c.nm09more pidgin-2.7.11/libpurple/network.c
+--- pidgin-2.7.11/libpurple/network.c.nm09more 2011-04-26 12:01:27.700085246 -0500
++++ pidgin-2.7.11/libpurple/network.c 2011-05-24 13:13:28.185165657 -0500
+@@ -833,8 +833,20 @@ purple_network_is_available(void)
+ purple_debug_warning("network", "NetworkManager not active. Assuming connection exists.\n");
+ }
+
+- if (nm_state == NM_STATE_UNKNOWN || nm_state == NM_STATE_CONNECTED)
+- return TRUE;
++ switch (nm_state)
++ {
++ case NM_STATE_UNKNOWN:
++#if NM_CHECK_VERSION(0,8,992)
++ case NM_STATE_CONNECTED_LOCAL:
++ case NM_STATE_CONNECTED_SITE:
++ case NM_STATE_CONNECTED_GLOBAL:
++#else
++ case NM_STATE_CONNECTED:
++#endif
++ return TRUE;
++ default:
++ break;
++ }
+
+ return FALSE;
+
+@@ -1170,9 +1182,14 @@ purple_network_init(void)
+ NM_DBUS_SERVICE,
+ NM_DBUS_PATH,
+ NM_DBUS_INTERFACE);
++ /* NM 0.6 signal */
+ dbus_g_proxy_add_signal(nm_proxy, "StateChange", G_TYPE_UINT, G_TYPE_INVALID);
+ dbus_g_proxy_connect_signal(nm_proxy, "StateChange",
+ G_CALLBACK(nm_state_change_cb), NULL, NULL);
++ /* NM 0.7 and later signal */
++ dbus_g_proxy_add_signal(nm_proxy, "StateChanged", G_TYPE_UINT, G_TYPE_INVALID);
++ dbus_g_proxy_connect_signal(nm_proxy, "StateChanged",
++ G_CALLBACK(nm_state_change_cb), NULL, NULL);
+
+ dbus_proxy = dbus_g_proxy_new_for_name(nm_conn,
+ DBUS_SERVICE_DBUS,
+@@ -1207,6 +1224,7 @@ purple_network_uninit(void)
+ #ifdef HAVE_NETWORKMANAGER
+ if (nm_proxy) {
+ dbus_g_proxy_disconnect_signal(nm_proxy, "StateChange", G_CALLBACK(nm_state_change_cb), NULL);
++ dbus_g_proxy_disconnect_signal(nm_proxy, "StateChanged", G_CALLBACK(nm_state_change_cb), NULL);
+ g_object_unref(G_OBJECT(nm_proxy));
+ }
+ if (dbus_proxy) {
diff --git a/staging/pidgin/nm09-pidgin.patch b/staging/pidgin/nm09-pidgin.patch
new file mode 100644
index 000000000..1c2471d1f
--- /dev/null
+++ b/staging/pidgin/nm09-pidgin.patch
@@ -0,0 +1,38 @@
+diff -up pidgin-2.7.10/libpurple/network.c.foo pidgin-2.7.10/libpurple/network.c
+--- pidgin-2.7.10/libpurple/network.c.foo 2011-03-10 02:21:43.920933267 -0600
++++ pidgin-2.7.10/libpurple/network.c 2011-03-10 02:23:11.466838793 -0600
+@@ -71,6 +71,10 @@
+ #include <dbus/dbus-glib.h>
+ #include <NetworkManager.h>
+
++#if !defined(NM_CHECK_VERSION)
++#define NM_CHECK_VERSION(x,y,z) 0
++#endif
++
+ static DBusGConnection *nm_conn = NULL;
+ static DBusGProxy *nm_proxy = NULL;
+ static DBusGProxy *dbus_proxy = NULL;
+@@ -863,7 +867,13 @@ nm_update_state(NMState state)
+
+ switch(state)
+ {
++#if NM_CHECK_VERSION(0,8,992)
++ case NM_STATE_CONNECTED_LOCAL:
++ case NM_STATE_CONNECTED_SITE:
++ case NM_STATE_CONNECTED_GLOBAL:
++#else
+ case NM_STATE_CONNECTED:
++#endif
+ /* Call res_init in case DNS servers have changed */
+ res_init();
+ /* update STUN IP in case we it changed (theoretically we could
+@@ -880,6 +890,9 @@ nm_update_state(NMState state)
+ case NM_STATE_ASLEEP:
+ case NM_STATE_CONNECTING:
+ case NM_STATE_DISCONNECTED:
++#if NM_CHECK_VERSION(0,8,992)
++ case NM_STATE_DISCONNECTING:
++#endif
+ if (prev != NM_STATE_CONNECTED && prev != NM_STATE_UNKNOWN)
+ break;
+ if (ui_ops != NULL && ui_ops->network_disconnected != NULL)
diff --git a/staging/postgresql/PKGBUILD b/staging/postgresql/PKGBUILD
new file mode 100644
index 000000000..d5a887585
--- /dev/null
+++ b/staging/postgresql/PKGBUILD
@@ -0,0 +1,141 @@
+# $Id: PKGBUILD 125329 2011-05-25 22:33:15Z dan $
+# Maintainer: Dan McGee <dan@archlinux.org>
+
+pkgbase=postgresql
+pkgname=('postgresql-libs' 'postgresql-docs' 'postgresql')
+pkgver=9.0.4
+pkgrel=4
+arch=('i686' 'x86_64')
+url="http://www.postgresql.org"
+license=('custom:PostgreSQL')
+makedepends=('libxml2' 'python2' 'perl')
+source=(ftp://ftp.postgresql.org/pub/source/v${pkgver}/postgresql-${pkgver}.tar.bz2 \
+ postgresql postgresql.confd build.patch postgresql.pam postgresql.logrotate
+ perl-5.14-fix.patch)
+install=postgresql.install
+
+build() {
+ cd "${srcdir}/${pkgbase}-${pkgver}"
+
+ # patch to remove regress/test make target (won't build with it present)
+ patch -Np1 -i ../build.patch
+ # fix for perl 5.14
+ patch -Np1 -i ../perl-5.14-fix.patch
+
+ # configure
+ ./configure --prefix=/usr --mandir=/usr/share/man --with-libxml \
+ --with-openssl --with-perl \
+ --with-python PYTHON=/usr/bin/python2 --with-pam \
+ --with-system-tzdata=/usr/share/zoneinfo --enable-nls \
+ --datadir=/usr/share/postgresql --enable-thread-safety
+
+ sed -i -e '/interfaces/d' src/Makefile
+
+ # build
+ make world
+
+ # build libs
+ for dir in src/interfaces src/bin/pg_config; do
+ pushd ${dir}
+ make
+ popd
+ done
+}
+
+package_postgresql-libs() {
+ pkgdesc="Libraries for use with PostgreSQL"
+ depends=('openssl>=1.0.0')
+
+ cd "${srcdir}/${pkgbase}-${pkgver}"
+
+ # install license
+ install -D -m644 COPYRIGHT "${pkgdir}/usr/share/licenses/postgresql-libs/LICENSE"
+
+ # install libs
+ for dir in src/interfaces src/bin/pg_config; do
+ pushd ${dir}
+ make DESTDIR="${pkgdir}" install
+ popd
+ done
+
+ install -D -m644 doc/src/sgml/man1/pg_config.1 "${pkgdir}/usr/share/man/man1/pg_config.1"
+
+ cd src/include
+
+ mkdir -p "${pkgdir}"/usr/include/{libpq,postgresql/internal/libpq}
+
+ # these headers are needed by the public headers of the interfaces
+ install -m644 pg_config.h "${pkgdir}/usr/include/"
+ install -m644 pg_config_os.h "${pkgdir}/usr/include/"
+ install -m644 postgres_ext.h "${pkgdir}/usr/include/"
+ install -m644 libpq/libpq-fs.h "${pkgdir}/usr/include/libpq/"
+ install -m644 pg_config_manual.h "${pkgdir}/usr/include/"
+
+ # these headers are needed by the not-so-public headers of the interfaces
+ install -m644 c.h "${pkgdir}/usr/include/postgresql/internal/"
+ install -m644 port.h "${pkgdir}/usr/include/postgresql/internal/"
+ install -m644 postgres_fe.h "${pkgdir}/usr/include/postgresql/internal/"
+ install -m644 libpq/pqcomm.h "${pkgdir}/usr/include/postgresql/internal/libpq/"
+}
+
+package_postgresql-docs() {
+ pkgdesc="HTML documentation for PostgreSQL"
+ options=(docs)
+
+ cd "${srcdir}/${pkgbase}-${pkgver}"
+
+ # install license
+ install -D -m644 COPYRIGHT "${pkgdir}/usr/share/licenses/postgresql-docs/LICENSE"
+
+ make -C doc/src/sgml DESTDIR="${pkgdir}" install-html
+ chown -R root:root "${pkgdir}/usr/share/doc/postgresql/html/"
+}
+
+package_postgresql() {
+ pkgdesc="A sophisticated object-relational DBMS"
+ backup=('etc/conf.d/postgresql' 'etc/pam.d/postgresql' 'etc/logrotate.d/postgresql')
+ depends=("postgresql-libs>=${pkgver}" 'libxml2' 'readline>=6.0')
+ optdepends=('python2: for PL/Python support'
+ 'perl: for PL/Perl support')
+ provides=('postgresql-client')
+ conflicts=('postgresql-client')
+
+ cd "${srcdir}/${pkgbase}-${pkgver}"
+
+ # install
+ make DESTDIR="${pkgdir}" install
+ make -C contrib DESTDIR="${pkgdir}" install
+ make -C doc/src/sgml DESTDIR="${pkgdir}" install-man
+ # we don't want this, it is in the -libs package
+ make -C src/bin/pg_config DESTDIR="${pkgdir}" uninstall
+ rm "${pkgdir}/usr/share/man/man1/pg_config.1"
+
+ # install license
+ install -D -m644 COPYRIGHT "${pkgdir}/usr/share/licenses/${pkgbase}/LICENSE"
+
+ # clean up unneeded installed items
+ rm -rf "${pkgdir}/usr/include/postgresql/internal"
+ rm -rf "${pkgdir}/usr/include/libpq"
+ find "${pkgdir}/usr/include" -maxdepth 1 -type f -execdir rm {} +
+
+ # install launch script
+ install -D -m755 "${srcdir}/postgresql" "${pkgdir}/etc/rc.d/postgresql"
+
+ # install conf file
+ install -D -m644 ${srcdir}/postgresql.confd \
+ "${pkgdir}/etc/conf.d/postgresql"
+
+ install -D -m644 ${srcdir}/postgresql.pam \
+ "${pkgdir}/etc/pam.d/postgresql"
+
+ install -D -m644 ${srcdir}/postgresql.logrotate \
+ "${pkgdir}/etc/logrotate.d/postgresql"
+}
+
+md5sums=('80390514d568a7af5ab61db1cda27e29'
+ 'eacf91f987d230f2dc2d040618ea1817'
+ 'd63a05943cf0a2726aa2070f3033c569'
+ '4d74f4227dc5e12bf95b3490758d86c9'
+ '96f82c38f3f540b53f3e5144900acf17'
+ 'd28e443f9f65a5712c52018b84e27137'
+ '6606e4279d91fc617b5c4dae0d76c603')
diff --git a/staging/postgresql/build.patch b/staging/postgresql/build.patch
new file mode 100644
index 000000000..c8f665d12
--- /dev/null
+++ b/staging/postgresql/build.patch
@@ -0,0 +1,11 @@
+diff -Naur postgresql-8.2.3-orig/src/Makefile postgresql-8.2.3/src/Makefile
+--- postgresql-8.2.3-orig/src/Makefile 2006-06-22 16:50:35.000000000 -0700
++++ postgresql-8.2.3/src/Makefile 2007-03-05 10:46:24.000000000 -0800
+@@ -23,7 +23,6 @@
+ $(MAKE) -C bin $@
+ $(MAKE) -C pl $@
+ $(MAKE) -C makefiles $@
+- $(MAKE) -C test/regress $@
+
+ install: install-local
+
diff --git a/staging/postgresql/perl-5.14-fix.patch b/staging/postgresql/perl-5.14-fix.patch
new file mode 100644
index 000000000..82ef7d688
--- /dev/null
+++ b/staging/postgresql/perl-5.14-fix.patch
@@ -0,0 +1,25 @@
+--- a/src/pl/plperl/plperl.c
++++ b/src/pl/plperl/plperl.c
+@@ -926,7 +926,7 @@ plperl_trusted_init(void)
+ if (!isGV_with_GP(sv) || !GvCV(sv))
+ continue;
+ SvREFCNT_dec(GvCV(sv)); /* free the CV */
+- GvCV(sv) = NULL; /* prevent call via GV */
++ GvCV_set(sv, NULL); /* prevent call via GV */
+ }
+ hv_clear(stash);
+
+--- a/src/pl/plperl/plperl.h
++++ b/src/pl/plperl/plperl.h
+@@ -49,6 +49,11 @@
+ (U32)HeKUTF8(he))
+ #endif
+
++/* supply GvCV_set if it's missing - ppport.h doesn't supply it, unfortunately */
++#ifndef GvCV_set
++#define GvCV_set(gv, cv) (GvCV(gv) = cv)
++#endif
++
+ /* declare routines from plperl.c for access by .xs files */
+ HV *plperl_spi_exec(char *, int);
+ void plperl_return_next(SV *);
diff --git a/staging/postgresql/postgresql b/staging/postgresql/postgresql
new file mode 100755
index 000000000..0fbe94036
--- /dev/null
+++ b/staging/postgresql/postgresql
@@ -0,0 +1,79 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+. /etc/conf.d/postgresql
+
+# Default PGROOT if it wasn't defined in the conf.d file
+PGROOT=${PGROOT:-/var/lib/postgres}
+PG_CTL="/usr/bin/pg_ctl -D $PGROOT/data -l /var/log/postgresql.log -s -w"
+
+postgres_init() {
+ # initialization
+ if [ ! -d $PGROOT/data ]; then
+ mkdir -p $PGROOT/data && chown -R postgres:postgres $PGROOT
+ su - postgres -c "/usr/bin/initdb $INITOPTS -D $PGROOT/data"
+ fi
+ if [ ! -e /var/log/postgresql.log ]; then
+ touch /var/log/postgresql.log
+ chown postgres /var/log/postgresql.log
+ fi
+}
+
+case "$1" in
+ start)
+ postgres_init
+ stat_busy "Starting PostgreSQL"
+ su - postgres -c \
+ "$PG_CTL start"
+ if [ $? -gt 0 ]; then
+ stat_fail
+ exit 1
+ else
+ add_daemon postgresql
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping PostgreSQL"
+ su - postgres -c \
+ "$PG_CTL stop -m fast"
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon postgresql
+ stat_done
+ fi
+ ;;
+ reload)
+ stat_busy "Reloading PostgreSQL"
+ su - postgres -c \
+ "$PG_CTL reload"
+ if [ $? -gt 0 ]; then
+ stat_fail
+ exit 1
+ else
+ stat_done
+ fi
+ ;;
+ restart)
+ postgres_init
+ stat_busy "Restarting PostgreSQL"
+ su - postgres -c \
+ "$PG_CTL restart -m fast"
+ if [ $? -gt 0 ]; then
+ stat_fail
+ exit 1
+ else
+ add_daemon postgresql
+ stat_done
+ fi
+ ;;
+ status)
+ stat_busy "Checking PostgreSQL status";
+ ck_status postgresql
+ ;;
+ *)
+ echo "usage: $0 {start|stop|reload|restart|status}"
+esac
+exit 0
diff --git a/staging/postgresql/postgresql.confd b/staging/postgresql/postgresql.confd
new file mode 100644
index 000000000..5f8fa034c
--- /dev/null
+++ b/staging/postgresql/postgresql.confd
@@ -0,0 +1,5 @@
+#
+# Parameters to be passed to postgresql
+#
+PGROOT="/var/lib/postgres"
+INITOPTS="--locale $LANG"
diff --git a/staging/postgresql/postgresql.install b/staging/postgresql/postgresql.install
new file mode 100644
index 000000000..d65bb6a7f
--- /dev/null
+++ b/staging/postgresql/postgresql.install
@@ -0,0 +1,22 @@
+post_install() {
+ if [ ! -d '/var/lib/postgres' ]; then
+ mkdir -p '/var/lib/postgres'
+ fi
+ getent group postgres >/dev/null || groupadd -g 88 postgres
+ getent passwd postgres >/dev/null || useradd -c 'PostgreSQL user' -u 88 -g postgres -d '/var/lib/postgres' -s /bin/bash postgres
+ passwd -l postgres >/dev/null
+}
+
+post_upgrade() {
+ post_install $1
+ # FS#23858, fix postgres user shell issue
+ postgres_shell=$(getent passwd postgres | cut -d: -f7)
+ if [ "$postgres_shell" = "/sbin/nologin" ]; then
+ chsh -s /bin/bash postgres
+ fi
+}
+
+post_remove() {
+ getent passwd postgres >/dev/null && userdel postgres
+ getent group postgres >/dev/null && groupdel postgres
+}
diff --git a/staging/postgresql/postgresql.logrotate b/staging/postgresql/postgresql.logrotate
new file mode 100644
index 000000000..9c36918be
--- /dev/null
+++ b/staging/postgresql/postgresql.logrotate
@@ -0,0 +1,4 @@
+/var/log/postgresql.log {
+ copytruncate
+ missingok
+}
diff --git a/staging/postgresql/postgresql.pam b/staging/postgresql/postgresql.pam
new file mode 100644
index 000000000..53724d1f8
--- /dev/null
+++ b/staging/postgresql/postgresql.pam
@@ -0,0 +1,3 @@
+auth required pam_unix.so
+account required pam_unix.so
+session required pam_unix.so
diff --git a/staging/spamassassin/PKGBUILD b/staging/spamassassin/PKGBUILD
new file mode 100644
index 000000000..6b97ea8c1
--- /dev/null
+++ b/staging/spamassassin/PKGBUILD
@@ -0,0 +1,54 @@
+# $Id: PKGBUILD 125325 2011-05-25 21:40:50Z remy $
+# Maintainer: Dale Blount <dale@archlinux.org>
+# Contributor: Manolis Tzanidakis
+
+pkgname=spamassassin
+pkgver=3.3.1
+pkgrel=5
+pkgdesc="A mail filter to identify spam."
+arch=(i686 x86_64)
+license=(APACHE)
+url="http://spamassassin.apache.org"
+depends=('perl>=5.14' 'perl-net-dns' 'perl-uri' 'perl-html-parser' \
+ 'perl-digest-sha1' 'perl-io-socket-ssl' 'openssl' \
+ 'perl-libwww' 'perl-mail-spf' \
+ 'zlib' 're2c')
+ # perl-archive-tar perl-io-zlib)
+makedepends=('razor' 'perl-dbi')
+optdepends=('razor: to identify collaborately-flagged spam'
+ 'gnupg: gpg support, without this use --nogpg flag for sa-update'
+ 're2c: regexp compiler, for compiling rules with sa-compile')
+backup=(etc/conf.d/spamd etc/mail/spamassassin/local.cf \
+ etc/mail/spamassassin/init.pre \
+ etc/mail/spamassassin/v310.pre \
+ etc/mail/spamassassin/v312.pre \
+ etc/mail/spamassassin/v320.pre)
+install=${pkgname}.install
+options=(!emptydirs)
+source=(http://mirrors.devlib.org/apache/${pkgname}/source/Mail-SpamAssassin-${pkgver}.tar.gz \
+ spamd.conf.d spamd)
+md5sums=('5a93f81fda315411560ff5da099382d2'
+ 'af501c6b0bb937a2775b747cc4b6d150'
+ '0534d3071a526a27ddc2b297afa03b04')
+
+build() {
+ cd ${srcdir}/Mail-SpamAssassin-${pkgver}
+
+ # install module in vendor directories.
+ PERL_MM_USE_DEFAULT=1 /usr/bin/perl Makefile.PL INSTALLDIRS=vendor \
+ CONTACT_ADDRESS=root@localhost ENABLE_SSL=yes PERL_TAINT=no
+ /usr/bin/make
+}
+
+check() {
+ cd ${srcdir}/Mail-SpamAssassin-${pkgver}
+ /usr/bin/make test || true
+}
+
+package() {
+ cd ${srcdir}/Mail-SpamAssassin-${pkgver}
+ /usr/bin/make DESTDIR=${pkgdir} install
+
+ /bin/install -D -m644 ${srcdir}/spamd.conf.d ${pkgdir}/etc/conf.d/spamd
+ /bin/install -D -m755 ${srcdir}/spamd ${pkgdir}/etc/rc.d/spamd
+}
diff --git a/staging/spamassassin/spamassassin.install b/staging/spamassassin/spamassassin.install
new file mode 100644
index 000000000..5109956c9
--- /dev/null
+++ b/staging/spamassassin/spamassassin.install
@@ -0,0 +1,25 @@
+# arg 1: the new package version
+post_install() {
+ echo "You must run 'sa-update' to install spam rules before use."
+ /bin/true
+}
+
+# arg 1: the new package version
+# arg 2: the old package version
+post_upgrade() {
+ # Compile rules, if rules have previously been compiled, and it's possible
+ if [ -x /usr/bin/re2c -a -x /usr/bin/perlbin/vendor/sa-compile -a -d /var/lib/spamassassin/compiled ]; then
+ echo "Detected compiled rules, running sa-compile..."
+ sa-compile > /dev/null 2>&1
+fi
+}
+
+# arg 1: the old package version
+pre_remove() {
+ /bin/true
+}
+
+# arg 1: the old package version
+post_remove() {
+ /bin/true
+}
diff --git a/staging/spamassassin/spamd b/staging/spamassassin/spamd
new file mode 100644
index 000000000..11d35f7cd
--- /dev/null
+++ b/staging/spamassassin/spamd
@@ -0,0 +1,49 @@
+#!/bin/bash
+
+# source application-specific settings
+[ -f /etc/conf.d/spamd ] && . /etc/conf.d/spamd
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+PID=`pidof -o %PPID /usr/bin/vendor_perl/spamd`
+case "$1" in
+ start)
+ stat_busy "Starting spamd"
+ [ -z "$PID" ] && /usr/bin/vendor_perl/spamd -d ${SPAMD_OPTS}
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon spamd
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping spamd"
+ [ ! -z "$PID" ] && kill $PID &> /dev/null
+ if [ $? -gt 0 ]; then
+ # Some users report that a second attempt at stopping the process
+ # works. So, take a little nap and give it another whirl...
+ sleep 2
+ kill $PID &> /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon spamd
+ stat_done
+ fi
+ else
+ rm_daemon spamd
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 3
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0
+# vim: ts=2 sw=2 et ft=sh
diff --git a/staging/spamassassin/spamd.conf.d b/staging/spamassassin/spamd.conf.d
new file mode 100644
index 000000000..4295e0073
--- /dev/null
+++ b/staging/spamassassin/spamd.conf.d
@@ -0,0 +1 @@
+SPAMD_OPTS="-c"
diff --git a/staging/vim/PKGBUILD b/staging/vim/PKGBUILD
new file mode 100644
index 000000000..603de624a
--- /dev/null
+++ b/staging/vim/PKGBUILD
@@ -0,0 +1,198 @@
+# $Id: PKGBUILD 125313 2011-05-25 20:09:55Z heftig $
+# Contributor: Jan "heftig" Steffens <jan.steffens@gmail.com>
+# Maintainer: tobias [ tobias at archlinux org ]
+# Maintainer: Daniel J Griffiths <ghost1227@archlinux.us>
+
+pkgbase=vim
+pkgname=(vim gvim vim-runtime)
+_topver=7.3
+_patchlevel=206
+pkgver=${_topver}.${_patchlevel}
+__hgrev=e9538cfd0d9c
+pkgrel=1
+arch=('i686' 'x86_64')
+license=('custom:vim')
+url="http://www.vim.org"
+makedepends=('gpm' 'perl' 'python2>=2.7.1' 'ruby' 'libxt' 'desktop-file-utils' 'gtk2'
+ 'gettext' 'pkgconfig' 'mercurial' 'rsync' 'sed')
+source=(pythoncomplete.vim::http://www.vim.org/scripts/download_script.php\?src_id=10872
+ vimrc archlinux.vim gvim.desktop)
+md5sums=('6e7adfbd5d26c1d161030ec203a7f243'
+ 'e57777374891063b9ca48a1fe392ac05'
+ '10353a61aadc3f276692d0e17db1478e'
+ '4b83e5fe0e534c53daaba91dd1cd4cbb')
+
+__hgroot='http://vim.googlecode.com/hg/'
+__hgrepo='vim'
+__hgbranch='default'
+
+_versiondir="vim${_topver//./}"
+
+##### Build #####
+
+build() {
+ cd ${srcdir}
+
+ msg2 'Checking out source from Mercurial...'
+
+ if [[ -d ${__hgrepo} ]]; then
+ cd ${__hgrepo}
+ hg pull -b ${__hgbranch}|| warning 'hg pull failed!'
+ hg update -r ${__hgrev}
+ else
+ hg clone -b ${__hgbranch} -u ${__hgrev} "${__hgroot}${__hgrepo}" ${__hgrepo}
+ cd ${__hgrepo}
+ fi
+
+ if (( $(hg id -n) < $(hg id -nr ${__hgbranch}) )); then
+ warning 'You are not building the latest revision!'
+ warning "Consider updating __hgrev to $(hg id -r ${__hgbranch})."
+ sleep 10
+ fi
+
+ cd ..
+ rm -rf vim-build gvim-build
+ rsync -a --exclude='.hg/' ${__hgrepo}/ vim-build
+
+ msg2 'Patching...'
+
+ # define the place for the global (g)vimrc file (set to /etc/vimrc)
+ sed -i 's|^.*\(#define SYS_.*VIMRC_FILE.*"\) .*$|\1|' \
+ vim-build/src/feature.h
+ sed -i 's|^.*\(#define VIMRC_FILE.*"\) .*$|\1|' \
+ vim-build/src/feature.h
+ # fix python name
+ sed -i -e 's|vi_cv_path_python, python|vi_cv_path_python, python2|' \
+ vim-build/src/configure.in
+ (cd vim-build/src && autoconf)
+
+ msg2 'Building...'
+
+ cp -a vim-build gvim-build
+
+ cd ${srcdir}/vim-build
+
+ ./configure --prefix=/usr --localstatedir=/var/lib/vim \
+ --mandir=/usr/share/man --with-compiledby=ArchLinux \
+ --with-features=big --enable-gpm --enable-acl --with-x=no \
+ --disable-gui --enable-multibyte --enable-cscope \
+ --disable-netbeans --enable-perlinterp --disable-pythoninterp \
+ --disable-rubyinterp
+
+ make
+
+ cd ${srcdir}/gvim-build
+
+ ./configure --prefix=/usr --localstatedir=/var/lib/vim \
+ --mandir=/usr/share/man --with-compiledby=ArchLinux \
+ --with-features=big --enable-gpm --enable-acl --with-x=yes \
+ --enable-gui=gtk2 --enable-multibyte --enable-cscope \
+ --enable-netbeans --enable-perlinterp --enable-pythoninterp \
+ --enable-rubyinterp
+
+ make
+}
+
+##### Packaging #####
+
+package_vim() {
+ pkgdesc='Vi Improved, a highly configurable, improved version of the vi text editor'
+ depends=("vim-runtime=${pkgver}-${pkgrel}" 'gpm' 'perl')
+ conflicts=('gvim')
+
+ cd ${srcdir}/vim-build
+ make -j1 VIMRCLOC=/etc DESTDIR=${pkgdir} install
+
+ # provided by (n)vi in core
+ rm ${pkgdir}/usr/bin/{ex,view}
+
+ # delete some manpages
+ find ${pkgdir}/usr/share/man -type d -name 'man1' 2>/dev/null | \
+ while read _mandir; do
+ cd ${_mandir}
+ rm -f ex.1 view.1 # provided by (n)vi
+ rm -f evim.1 # this does not make sense if we have no GUI
+ done
+
+ # Runtime provided by runtime package
+ rm -r ${pkgdir}/usr/share/vim
+
+ # license
+ install -dm755 ${pkgdir}/usr/share/licenses/vim
+ ln -s /usr/share/vim/${_versiondir}/doc/uganda.txt \
+ ${pkgdir}/usr/share/licenses/vim/license.txt
+}
+
+package_gvim() {
+ pkgdesc='Vi Improved, a highly configurable, improved version of the vi text editor (with advanced features, such as a GUI)'
+ depends=("vim-runtime=${pkgver}-${pkgrel}" 'gpm' 'perl' 'python2>=2.7.1' 'ruby' 'libxt'
+ 'desktop-file-utils' 'gtk2')
+ provides=("vim=${pkgver}-${pkgrel}")
+ conflicts=('vim')
+ install=gvim.install
+
+ cd ${srcdir}/gvim-build
+ make -j1 VIMRCLOC=/etc DESTDIR=${pkgdir} install
+
+ # provided by (n)vi in core
+ rm ${pkgdir}/usr/bin/{ex,view}
+
+ # delete some manpages
+ find ${pkgdir}/usr/share/man -type d -name 'man1' 2>/dev/null | \
+ while read _mandir; do
+ cd ${_mandir}
+ rm -f ex.1 view.1 # provided by (n)vi
+ done
+
+ # Move the runtime for later packaging
+ mv ${pkgdir}/usr/share/vim ${srcdir}/runtime-install
+
+ # freedesktop links
+ install -Dm644 ${srcdir}/gvim.desktop \
+ ${pkgdir}/usr/share/applications/gvim.desktop
+ install -Dm644 runtime/vim48x48.png ${pkgdir}/usr/share/pixmaps/gvim.png
+
+ # license
+ install -dm755 ${pkgdir}/usr/share/licenses/gvim
+ ln -s /usr/share/vim/${_versiondir}/doc/uganda.txt \
+ ${pkgdir}/usr/share/licenses/gvim/license.txt
+}
+
+package_vim-runtime() {
+ pkgdesc='Runtime for vim and gvim'
+ backup=(etc/vimrc)
+
+ # Install the runtime split from gvim
+ install -dm755 ${pkgdir}/usr/share
+ mv ${srcdir}/runtime-install ${pkgdir}/usr/share/vim
+
+ # Don't forget logtalk.dict
+ install -Dm644 ${srcdir}/gvim-build/runtime/ftplugin/logtalk.dict \
+ ${pkgdir}/usr/share/vim/${_versiondir}/ftplugin/logtalk.dict
+
+ # fix FS#17216
+ sed -i 's|messages,/var|messages,/var/log/messages.log,/var|' \
+ ${pkgdir}/usr/share/vim/${_versiondir}/filetype.vim
+
+ # patch filetype.vim for better handling of pacman related files
+ sed -i "s/rpmsave/pacsave/;s/rpmnew/pacnew/;s/,\*\.ebuild/\0,PKGBUILD*,*.install/" \
+ ${pkgdir}/usr/share/vim/${_versiondir}/filetype.vim
+ sed -i "/find the end/,+3{s/changelog_date_entry_search/changelog_date_end_entry_search/}" \
+ ${pkgdir}/usr/share/vim/${_versiondir}/ftplugin/changelog.vim
+
+ # make Aaron happy
+ install -Dm644 ${srcdir}/pythoncomplete.vim \
+ ${pkgdir}/usr/share/vim/${_versiondir}/autoload/pythoncomplete.vim
+
+ # rc files
+ install -Dm644 ${srcdir}/vimrc ${pkgdir}/etc/vimrc
+ install -Dm644 ${srcdir}/archlinux.vim \
+ ${pkgdir}/usr/share/vim/vimfiles/archlinux.vim
+
+ # license
+ install -dm755 ${pkgdir}/usr/share/licenses/vim-runtime
+ ln -s /usr/share/vim/${_versiondir}/doc/uganda.txt \
+ ${pkgdir}/usr/share/licenses/vim-runtime/license.txt
+}
+
+# vim:set sw=2 sts=2 et:
diff --git a/staging/vim/archlinux.vim b/staging/vim/archlinux.vim
new file mode 100644
index 000000000..148bb930f
--- /dev/null
+++ b/staging/vim/archlinux.vim
@@ -0,0 +1,26 @@
+" The ArchLinux global vimrc - setting only a few sane defaults
+"
+" Maintainer: Tobias Kieslich [tobias funnychar archlinux dot org]
+"
+" NEVER EDIT THIS FILE, IT'S OVERWRITTEN UPON UPGRADES, GLOBAL CONFIGURATION
+" SHALL BE DONE IN /etc/vimrc, USER SPECIFIC CONFIGURATION IN ~/.vimrc
+
+" Normally we use vim-extensions. If you want true vi-compatibility
+" remove change the following statements
+set nocompatible " Use Vim defaults instead of 100% vi compatibility
+set backspace=indent,eol,start " more powerful backspacing
+
+" Now we set some defaults for the editor
+set history=50 " keep 50 lines of command line history
+set ruler " show the cursor position all the time
+
+" Suffixes that get lower priority when doing tab completion for filenames.
+" These are files we are not likely to want to edit or read.
+set suffixes=.bak,~,.swp,.o,.info,.aux,.log,.dvi,.bbl,.blg,.brf,.cb,.ind,.idx,.ilg,.inx,.out,.toc
+
+
+if has('gui_running')
+ " Make shift-insert work like in Xterm
+ map <S-Insert> <MiddleMouse>
+ map! <S-Insert> <MiddleMouse>
+endif
diff --git a/staging/vim/gvim.desktop b/staging/vim/gvim.desktop
new file mode 100644
index 000000000..56fd61b8f
--- /dev/null
+++ b/staging/vim/gvim.desktop
@@ -0,0 +1,42 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Name=gVim
+Name[eo]=VIM-fasado
+Name[sv]=gVim
+Name[xx]=xx
+Comment=GTK2 enhanced vim text editor
+Comment[ar]=محرر نصوص
+Comment[bg]=Текст Редактор
+Comment[de]=Texteditor
+Comment[el]=Διορθωτής Κειμένου
+Comment[eo]=Tekstredaktilo
+Comment[et]=Tekstiredaktor
+Comment[eu]=Testu Editorea
+Comment[fi]=Tekstieditori
+Comment[he]=עורך טקסט
+Comment[is]=Textaritill
+Comment[ja]=テキストエディタ
+Comment[lt]=Teksto redaktorius
+Comment[mt]=Editur tat-test
+Comment[pt_BR]=Editor de Texto
+Comment[ro]=Editor de text
+Comment[ru]=редактор
+Comment[sk]=Textový editor
+Comment[sl]=Urejevalnik besedil
+Comment[ta]=¯¨Ã ¦¾¡ÌôÀ¡Ç÷
+Comment[tr]=Metin Düzenleyici
+Comment[uk]=Редактор текстів
+Comment[vi]=Trình soạn văn bản
+Comment[xx]=xx
+Comment[zh_CN]=文本编辑器
+Comment[zh_TW]=文字編輯器
+GenericName=Text Editor
+Type=Application
+TryExec=gvim
+Exec=gvim %u
+Icon=gvim
+Terminal=false
+X-MultipleArgs=false
+Categories=GTK;Application;Utility;TextEditor;
+MimeType=application/mathml+xml;application/xhtml+xml;application/x-perl;application/x-python;application/x-shellscript;audio/x-mpegurl;audio/x-scpls;image/svg+xml;message/news;message/rfc822;text/calendar;text/css;text/english;text/html;text/mrml;text/plain;text/rdf;text/rss;text/rtf;text/sgml;text/vnd.wap.wml;text/x-adasrc;text/x-bibtex;text/x-chdr;text/x-c++hdr;text/x-csrc;text/x-c++src;text/x-c;text/x-objc;text/x-csv;text/x-diff;text/x-java;text/x-katefilelist;text/x-latex;text/x-log;text/x-lyx;text/x-makefile;text/xmcd;text/xml;text/x-moc;text/x-mswinurl;text/x-objcsrc;text/x-pascal;text/x-perl;text/x-php;text/x-php-source;text/x-python;text/x-tcl;text/x-tex;text/x-vcalendar;text/x-vcard;text/x-xslfo;text/x-xslt;
diff --git a/staging/vim/gvim.install b/staging/vim/gvim.install
new file mode 100644
index 000000000..0a8d3b0a9
--- /dev/null
+++ b/staging/vim/gvim.install
@@ -0,0 +1,13 @@
+post_install() {
+ echo -n "Updating desktop and mime database..."
+ update-desktop-database -q
+ echo "done."
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+post_remove() {
+ post_install $1
+}
diff --git a/staging/vim/vimrc b/staging/vim/vimrc
new file mode 100644
index 000000000..92d3ff980
--- /dev/null
+++ b/staging/vim/vimrc
@@ -0,0 +1,16 @@
+" All system-wide defaults are set in $VIMRUNTIME/archlinux.vim (usually just
+" /usr/share/vim/vimfiles/archlinux.vim) and sourced by the call to :runtime
+" you can find below. If you wish to change any of those settings, you should
+" do it in this file (/etc/vimrc), since archlinux.vim will be overwritten
+" everytime an upgrade of the vim packages is performed. It is recommended to
+" make changes after sourcing archlinux.vim since it alters the value of the
+" 'compatible' option.
+
+" This line should not be removed as it ensures that various options are
+" properly set to work with the Vim-related packages.
+runtime! archlinux.vim
+
+" If you prefer the old-style vim functionalty, add 'runtime! vimrc_example.vim'
+" Or better yet, read /usr/share/vim/vim72/vimrc_example.vim or the vim manual
+" and configure vim to your own liking!
+
diff --git a/staging/weechat/PKGBUILD b/staging/weechat/PKGBUILD
new file mode 100644
index 000000000..7e2144efc
--- /dev/null
+++ b/staging/weechat/PKGBUILD
@@ -0,0 +1,33 @@
+# $Id: PKGBUILD 125306 2011-05-25 19:29:12Z foutrelis $
+# Maintainer: Giovanni Scafora <giovanni@archlinux.org>
+# Contributor: lucke <lucke at o2 dot pl>
+
+pkgname=weechat
+pkgver=0.3.5
+pkgrel=2
+pkgdesc="Fast, light and extensible IRC client (curses UI)"
+arch=('i686' 'x86_64')
+url="http://www.weechat.org/"
+license=('GPL')
+depends=('gnutls')
+makedepends=('cmake' 'pkgconfig' 'perl' 'python2' 'lua' 'tcl' 'ruby' 'aspell')
+optdepends=('perl' 'python2' 'lua' 'tcl' 'ruby' 'aspell')
+options=('!libtool')
+source=("http://www.weechat.org/files/src/${pkgname}-${pkgver}.tar.bz2")
+md5sums=('0d2a089bfbfa550e0c65618a171fb3c4')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ mkdir build
+ cd build
+ cmake .. -DPREFIX=/usr \
+ -DPYTHON_EXECUTABLE=/usr/bin/python2 \
+ -DPYTHON_LIBRARY=/usr/lib/libpython2.7.so
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}/build"
+
+ make DESTDIR="${pkgdir}/" install
+}
diff --git a/testing/gedit/PKGBUILD b/testing/gedit/PKGBUILD
new file mode 100644
index 000000000..445dfff8c
--- /dev/null
+++ b/testing/gedit/PKGBUILD
@@ -0,0 +1,33 @@
+# $Id: PKGBUILD 124957 2011-05-25 12:36:33Z ibiru $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+
+pkgname=gedit
+pkgver=3.0.3
+pkgrel=1
+pkgdesc="A text editor for GNOME"
+arch=('i686' 'x86_64')
+license=('GPL')
+depends=('gtksourceview3' 'gsettings-desktop-schemas' 'libpeas' 'enchant'
+ 'iso-codes' 'libsm' 'desktop-file-utils' 'pygobject')
+makedepends=('gnome-doc-utils' 'intltool')
+groups=('gnome-extra')
+options=('!libtool' '!emptydirs')
+url="http://www.gnome.org"
+install=gedit.install
+source=(http://ftp.gnome.org/pub/gnome/sources/${pkgname}/${pkgver%.*}/${pkgname}-${pkgver}.tar.bz2)
+sha256sums=('16764f0cf17fcd85f9c3f031bb151aa87ef1e727e8d19814a4746d376adca578')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ PYTHON=/usr/bin/python2 ./configure --prefix=/usr \
+ --sysconfdir=/etc --localstatedir=/var \
+ --libexecdir=/usr/lib --disable-scrollkeeper \
+ --disable-updater --disable-schemas-compile \
+ --enable-python
+ make
+}
+
+package(){
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/testing/gedit/gedit.install b/testing/gedit/gedit.install
new file mode 100644
index 000000000..9d88a1341
--- /dev/null
+++ b/testing/gedit/gedit.install
@@ -0,0 +1,18 @@
+post_install() {
+ glib-compile-schemas usr/share/glib-2.0/schemas
+ update-desktop-database -q
+}
+
+pre_upgrade() {
+ if [ -f usr/share/gconf/schemas/gedit.schemas ]; then
+ usr/sbin/gconfpkg --uninstall gedit
+ fi
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+post_remove() {
+ post_install $1
+}
diff --git a/testing/gnome-shell/PKGBUILD b/testing/gnome-shell/PKGBUILD
new file mode 100644
index 000000000..0c005f56e
--- /dev/null
+++ b/testing/gnome-shell/PKGBUILD
@@ -0,0 +1,50 @@
+# $Id: PKGBUILD 125332 2011-05-25 22:41:23Z ibiru $
+# Maintainer: Ionut Biru <ibiru@archlinux.org>
+# Contributor: Flamelab <panosfilip@gmail.com
+
+pkgname=gnome-shell
+pkgver=3.0.2
+pkgrel=1
+pkgdesc="The next generation GNOME Shell"
+arch=('i686' 'x86_64')
+url="http://live.gnome.org/GnomeShell"
+license=('GPL2')
+depends=('mutter' 'gconf' 'dconf' 'gjs' 'gnome-menus' 'gnome-desktop' 'libcroco' 'libcanberra' 'libpulse' 'telepathy-glib' 'polkit-gnome'
+ 'gobject-introspection' 'evolution-data-server' 'gnome-bluetooth' 'gstreamer0.10' 'telepathy-logger')
+makedepends=('intltool' 'gnome-doc-utils')
+optdepends=('network-manager-applet: shell integration for networkmanager'
+ 'gnome-power-manager: shell integration for power management')
+options=('!libtool' '!emptydirs')
+install=gnome-shell.install
+groups=(gnome)
+source=(http://ftp.gnome.org/pub/GNOME/sources/$pkgname/${pkgver%.*}/$pkgname-$pkgver.tar.bz2
+ arch.patch
+ bluetoothstatus-always-update-devices.patch
+ shell-recorder-missing-XFree.patch)
+sha256sums=('a44963877da895d9b9f1ea98617067c5e88a5c4b414c6ccf0fcbfacdeac7db95'
+ 'a35d5e5f9f781728070aecae3bfe329f49dadcd50ca2984e0fbdd2219825a0db'
+ 'f592752875085fceebdb27e65802e09c07edd7be57eec0da3edfcad5052be2ae'
+ '070edd5e720c063be41c158f39b7ef62a0d4a7f547ca0d23216104d5428ff971')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ patch -Np1 -i "${srcdir}/arch.patch"
+ patch -Np1 -i "${srcdir}/bluetoothstatus-always-update-devices.patch"
+ patch -Np1 -i "${srcdir}/shell-recorder-missing-XFree.patch"
+
+ ./configure --prefix=/usr --sysconfdir=/etc \
+ --libexecdir=/usr/lib/gnome-shell \
+ --localstatedir=/var --disable-static \
+ --disable-schemas-compile
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 DESTDIR="${pkgdir}" install
+
+ install -m755 -d "${pkgdir}/usr/share/gconf/schemas"
+ gconf-merge-schema "${pkgdir}/usr/share/gconf/schemas/${pkgname}.schemas" --domain gnome-shell ${pkgdir}/etc/gconf/schemas/*.schemas
+ rm -f ${pkgdir}/etc/gconf/schemas/*.schemas
+}
diff --git a/testing/gnome-shell/arch.patch b/testing/gnome-shell/arch.patch
new file mode 100644
index 000000000..67baefdcb
--- /dev/null
+++ b/testing/gnome-shell/arch.patch
@@ -0,0 +1,12 @@
+diff -Nur gnome-shell.orig/data/org.gnome.shell.gschema.xml.in gnome-shell/data/org.gnome.shell.gschema.xml.in
+--- gnome-shell.orig/data/org.gnome.shell.gschema.xml.in 2011-04-06 08:47:58.638600793 -0700
++++ gnome-shell/data/org.gnome.shell.gschema.xml.in 2011-04-06 08:49:17.035274675 -0700
+@@ -30,7 +30,7 @@
+ </_description>
+ </key>
+ <key name="favorite-apps" type="as">
+- <default>[ 'mozilla-firefox.desktop', 'evolution.desktop', 'empathy.desktop', 'rhythmbox.desktop', 'shotwell.desktop', 'openoffice.org-writer.desktop', 'nautilus.desktop' ]</default>
++ <default>[ 'firefox.desktop', 'evolution.desktop', 'empathy.desktop', 'rhythmbox.desktop', 'shotwell.desktop', 'writer.desktop', 'nautilus.desktop' ]</default>
+ <_summary>List of desktop file IDs for favorite applications</_summary>
+ <_description>
+ The applications corresponding to these identifiers
diff --git a/testing/gnome-shell/bluetoothstatus-always-update-devices.patch b/testing/gnome-shell/bluetoothstatus-always-update-devices.patch
new file mode 100644
index 000000000..0272169f5
--- /dev/null
+++ b/testing/gnome-shell/bluetoothstatus-always-update-devices.patch
@@ -0,0 +1,132 @@
+From 76fce94b66be7bdebbedcc3bce62898da51da15a Mon Sep 17 00:00:00 2001
+From: Giovanni Campagna <gcampagna@src.gnome.org>
+Date: Wed, 13 Apr 2011 17:08:45 +0000
+Subject: BluetoothStatus: always update devices
+
+Previously, we skipped rebuilding device items in case the device
+had already been seen, but this caused the connected switch not to
+be updated. Now it has been refactored to update in case the device
+changes, and to create only when the device is completely new.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=647565
+---
+diff --git a/js/ui/status/bluetooth.js b/js/ui/status/bluetooth.js
+index 070016a..cee2f90 100644
+--- a/js/ui/status/bluetooth.js
++++ b/js/ui/status/bluetooth.js
+@@ -127,13 +127,6 @@ Indicator.prototype = {
+ }
+ },
+
+- _deviceCompare: function(d1, d2) {
+- return d1.device_path == d2.device_path &&
+- d1.bdaddr == d2.bdaddr &&
+- d1.can_connect == d2.can_connect &&
+- d1.capabilities == d2.capabilities;
+- },
+-
+ _updateDevices: function() {
+ let devices = this._applet.get_devices();
+
+@@ -142,12 +135,8 @@ Indicator.prototype = {
+ let item = this._deviceItems[i];
+ let destroy = true;
+ for (let j = 0; j < devices.length; j++) {
+- // we need to deep compare because BluetoothSimpleDevice is a boxed type
+- // (but we take advantage of that, because _skip will disappear the next
+- // time get_devices() is called)
+- if (this._deviceCompare(item._device, devices[j])) {
+- item.label.text = devices[j].alias;
+- devices[j]._skip = true;
++ if (item._device.device_path == devices[j].device_path) {
++ this._updateDeviceItem(item, devices[j]);
+ destroy = false;
+ break;
+ }
+@@ -162,7 +151,7 @@ Indicator.prototype = {
+ this._hasDevices = newlist.length > 0;
+ for (let i = 0; i < devices.length; i++) {
+ let d = devices[i];
+- if (d._skip)
++ if (d._item)
+ continue;
+ let item = this._createDeviceItem(d);
+ if (item) {
+@@ -177,17 +166,55 @@ Indicator.prototype = {
+ this._deviceSep.actor.hide();
+ },
+
++ _updateDeviceItem: function(item, device) {
++ if (!device.can_connect && device.capabilities == GnomeBluetoothApplet.Capabilities.NONE) {
++ item.destroy();
++ return;
++ }
++
++ let prevDevice = item._device;
++ let prevCapabilities = prevDevice.capabilities;
++ let prevCanConnect = prevDevice.can_connect;
++
++ // adopt the new device object
++ item._device = device;
++ device._item = item;
++
++ // update properties
++ item.label.text = device.alias;
++
++ if (prevCapabilities != device.capabilities ||
++ prevCanConnect != device.can_connect) {
++ // need to rebuild the submenu
++ item.menu.removeAll();
++ this._buildDeviceSubMenu(item, device);
++ }
++
++ // update connected property
++ if (device.can_connect)
++ item._connectedMenuitem.setToggleState(device.connected);
++ },
++
+ _createDeviceItem: function(device) {
+ if (!device.can_connect && device.capabilities == GnomeBluetoothApplet.Capabilities.NONE)
+ return null;
+ let item = new PopupMenu.PopupSubMenuMenuItem(device.alias);
++
++ // adopt the device object, and add a back link
+ item._device = device;
++ device._item = item;
+
++ this._buildDeviceSubMenu(item, device);
++
++ return item;
++ },
++
++ _buildDeviceSubMenu: function(item, device) {
+ if (device.can_connect) {
+ item._connected = device.connected;
+- let menuitem = new PopupMenu.PopupSwitchMenuItem(_("Connection"), device.connected);
++ item._connectedMenuitem = new PopupMenu.PopupSwitchMenuItem(_("Connection"), device.connected);
+
+- menuitem.connect('toggled', Lang.bind(this, function() {
++ item._connectedMenuitem.connect('toggled', Lang.bind(this, function() {
+ if (item._connected > ConnectionState.CONNECTED) {
+ // operation already in progress, revert
+ menuitem.setToggleState(menuitem.state);
+@@ -217,7 +244,7 @@ Indicator.prototype = {
+ }
+ }));
+
+- item.menu.addMenuItem(menuitem);
++ item.menu.addMenuItem(item._connectedMenuitem);
+ }
+
+ if (device.capabilities & GnomeBluetoothApplet.Capabilities.OBEX_PUSH) {
+@@ -263,8 +290,6 @@ Indicator.prototype = {
+ default:
+ break;
+ }
+-
+- return item;
+ },
+
+ _updateFullMenu: function() {
+--
+cgit v0.9
diff --git a/testing/gnome-shell/gnome-shell.install b/testing/gnome-shell/gnome-shell.install
new file mode 100644
index 000000000..a07105c24
--- /dev/null
+++ b/testing/gnome-shell/gnome-shell.install
@@ -0,0 +1,22 @@
+pkgname=gnome-shell
+
+post_install() {
+ glib-compile-schemas usr/share/glib-2.0/schemas
+ usr/sbin/gconfpkg --install ${pkgname}
+}
+
+pre_upgrade() {
+ pre_remove $1
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+pre_remove() {
+ usr/sbin/gconfpkg --uninstall ${pkgname}
+}
+
+post_remove() {
+ glib-compile-schemas usr/share/glib-2.0/schemas
+}
diff --git a/testing/gnome-shell/shell-recorder-missing-XFree.patch b/testing/gnome-shell/shell-recorder-missing-XFree.patch
new file mode 100644
index 000000000..a7329166f
--- /dev/null
+++ b/testing/gnome-shell/shell-recorder-missing-XFree.patch
@@ -0,0 +1,22 @@
+From 88df18345069c295e68d319606a11b7727b2bd4b Mon Sep 17 00:00:00 2001
+From: Maxim Ermilov <zaspire@rambler.ru>
+Date: Tue, 24 May 2011 22:46:47 +0000
+Subject: shell-recorder: missing XFree
+
+https://bugzilla.gnome.org/show_bug.cgi?id=650934
+---
+diff --git a/src/shell-recorder.c b/src/shell-recorder.c
+index 6555187..d297923 100644
+--- a/src/shell-recorder.c
++++ b/src/shell-recorder.c
+@@ -412,6 +412,8 @@ recorder_fetch_cursor_image (ShellRecorder *recorder)
+ *(guint32 *)(data + i * stride + 4 * j) = cursor_image->pixels[i * cursor_image->width + j];
+
+ cairo_surface_mark_dirty (recorder->cursor_image);
++
++ XFree (cursor_image);
+ }
+
+ /* Overlay the cursor image on the frame. We draw the cursor image
+--
+cgit v0.9
diff --git a/testing/gtksourceview3/PKGBUILD b/testing/gtksourceview3/PKGBUILD
new file mode 100644
index 000000000..23b576238
--- /dev/null
+++ b/testing/gtksourceview3/PKGBUILD
@@ -0,0 +1,28 @@
+# $Id: PKGBUILD 124948 2011-05-25 12:12:09Z ibiru $
+# Maintainer: Ionut Biru <ibiru@archlinux.org>
+
+pkgname=gtksourceview3
+_pkgbasename=gtksourceview
+pkgver=3.0.2
+pkgrel=1
+pkgdesc="A text widget adding syntax highlighting and more to GNOME"
+arch=('i686' 'x86_64')
+license=('GPL')
+depends=('gtk3' 'libxml2')
+makedepends=('intltool' 'pkgconfig' 'gobject-introspection')
+options=('!libtool')
+url="http://www.gnome.org"
+source=(http://ftp.gnome.org/pub/gnome/sources/$_pkgbasename/${pkgver%.*}/$_pkgbasename-${pkgver}.tar.bz2)
+sha256sums=('2cda7851594778c903a3f2a6e303edbe665d18d4ffd0c143ab2d3cfe54ccf8ab')
+
+build() {
+ cd "${srcdir}/$_pkgbasename-${pkgver}"
+ ./configure --prefix=/usr --sysconfdir=/etc \
+ --localstatedir=/var --disable-static
+ make
+}
+
+package() {
+ cd "${srcdir}/$_pkgbasename-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/testing/mutter/PKGBUILD b/testing/mutter/PKGBUILD
new file mode 100644
index 000000000..7f1a0f89a
--- /dev/null
+++ b/testing/mutter/PKGBUILD
@@ -0,0 +1,36 @@
+# $Id: PKGBUILD 125321 2011-05-25 21:21:29Z ibiru $
+# Maintainer: Jan "heftig" Steffens <jan.steffens@gmail.com>
+# Maintainer: Ionut Biru <ibiru@archlinux.org>
+# Contributor: Michael Kanis <mkanis_at_gmx_dot_de>
+
+pkgname=mutter
+pkgver=3.0.2.1
+pkgrel=1
+pkgdesc="A window manager for GNOME3"
+arch=(i686 x86_64)
+license=('GPL')
+depends=('startup-notification' 'gconf' 'zenity' 'libcanberra' 'clutter' 'gobject-introspection')
+makedepends=('intltool' 'gnome-doc-utils')
+url="http://www.gnome.org"
+groups=('gnome')
+options=('!libtool' '!emptydirs')
+install=mutter.install
+source=(http://ftp.gnome.org/pub/gnome/sources/${pkgname}/${pkgver%.*.*}/${pkgname}-${pkgver}.tar.bz2)
+sha256sums=('b122ffe170078af3edb9d4aa076c89eefd7a12a8aa57a1025227c1ab92912b3c')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ./configure --prefix=/usr --sysconfdir=/etc \
+ --libexecdir=/usr/lib/mutter \
+ --localstatedir=/var --disable-static
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 DESTDIR="${pkgdir}" install
+
+ install -m755 -d "${pkgdir}/usr/share/gconf/schemas"
+ gconf-merge-schema "${pkgdir}/usr/share/gconf/schemas/${pkgname}.schemas" --domain mutter ${pkgdir}/etc/gconf/schemas/*.schemas
+ rm -f ${pkgdir}/etc/gconf/schemas/*.schemas
+}
diff --git a/testing/mutter/mutter.install b/testing/mutter/mutter.install
new file mode 100644
index 000000000..199f12584
--- /dev/null
+++ b/testing/mutter/mutter.install
@@ -0,0 +1,17 @@
+pkgname=mutter
+
+post_install() {
+ usr/sbin/gconfpkg --install ${pkgname}
+}
+
+pre_upgrade() {
+ pre_remove $1
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+pre_remove() {
+ usr/sbin/gconfpkg --uninstall ${pkgname}
+}
diff --git a/testing/upower/PKGBUILD b/testing/upower/PKGBUILD
new file mode 100644
index 000000000..4f45a4e78
--- /dev/null
+++ b/testing/upower/PKGBUILD
@@ -0,0 +1,28 @@
+# $Id: PKGBUILD 124973 2011-05-25 14:17:57Z ibiru $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+
+pkgname=upower
+pkgver=0.9.11
+pkgrel=1
+pkgdesc="Abstraction for enumerating power devices, listening to device events and querying history and statistics"
+arch=('i686' 'x86_64')
+url="http://upower.freedesktop.org"
+license=('GPL')
+depends=('udev' 'libusb' 'polkit' 'pm-utils' 'dbus-glib')
+makedepends=('pkg-config' 'intltool' 'docbook-xsl' 'gobject-introspection')
+replaces=('devicekit-power')
+options=('!libtool')
+source=($url/releases/${pkgname}-${pkgver}.tar.bz2)
+sha256sums=('567358cc1b4887485d29e309897dd091c2c2ae95e48dfbb3279ffdc44a4b2956')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
+ --libexecdir=/usr/lib/upower --disable-static
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/testing/xf86-input-wacom/70-wacom.rules b/testing/xf86-input-wacom/70-wacom.rules
new file mode 100644
index 000000000..67e5580cc
--- /dev/null
+++ b/testing/xf86-input-wacom/70-wacom.rules
@@ -0,0 +1,8 @@
+ACTION!="add|change", GOTO="wacom_end"
+
+# Match all wacom tablets with a serial ID starting with WACf
+ATTRS{id}=="WACf*" ENV{NAME}="Serial Wacom Tablet", ENV{SUBSYSTEM}="input", ENV{ID_INPUT}="1", ENV{ID_INPUT_TABLET}="1"
+ATTRS{id}=="FUJ*" ENV{NAME}="Serial Wacom Tablet", ENV{SUBSYSTEM}="input", ENV{ID_INPUT}="1", ENV{ID_INPUT_TABLET}="1"
+
+LABEL="wacom_end"
+
diff --git a/testing/xf86-input-wacom/PKGBUILD b/testing/xf86-input-wacom/PKGBUILD
new file mode 100644
index 000000000..f1bf57b06
--- /dev/null
+++ b/testing/xf86-input-wacom/PKGBUILD
@@ -0,0 +1,31 @@
+# $Id: PKGBUILD 124965 2011-05-25 13:01:43Z heftig $
+# Maintainer: Jan "heftig" Steffens <jan.steffens@gmail.com>
+# Contributor: Jan de Groot <jgc@archlinux.org>
+# Contributor: M Rawash <mrawash@gmail.com>
+
+pkgname=xf86-input-wacom
+pkgver=0.11.0
+pkgrel=1
+pkgdesc="X.Org Wacom tablet driver"
+arch=('i686' 'x86_64')
+url="http://linuxwacom.sourceforge.net/"
+license=('GPL')
+backup=('etc/X11/xorg.conf.d/50-wacom.conf')
+depends=('libxi' 'libxrandr')
+makedepends=('xorg-server-devel' 'libxext' 'libxi')
+conflicts=('xorg-server<1.10.0')
+options=(!libtool)
+source=(http://downloads.sourceforge.net/project/linuxwacom/${pkgname}/${pkgname}-${pkgver}.tar.bz2
+ 70-wacom.rules)
+md5sums=('e0f6182cf7fba19c13f3db7e0da1baf3'
+ '4d3665bb2ef8a8190734640dffa4c6f7')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ./configure --prefix=/usr --with-xorg-conf-dir=/etc/X11/xorg.conf.d
+ make
+ make DESTDIR="${pkgdir}" install
+
+ install -m755 -d "${pkgdir}/lib/udev/rules.d"
+ install -m644 "${srcdir}/70-wacom.rules" "${pkgdir}/lib/udev/rules.d/"
+}