diff options
31 files changed, 1781 insertions, 795 deletions
diff --git a/community/android-tools/PKGBUILD b/community/android-tools/PKGBUILD new file mode 100644 index 000000000..775301e11 --- /dev/null +++ b/community/android-tools/PKGBUILD @@ -0,0 +1,38 @@ +# $Id: PKGBUILD 110180 2014-04-25 20:24:14Z anatolik $ +# Maintainer: Anatol Pomozov +# Contributor: 謝致邦 <Yeking@Red54.com> +# Contributor: Alucryd <alucryd at gmail dot com> + +pkgname=android-tools +pkgver=4.4.2_r2 +pkgrel=1 +pkgdesc='Android platform tools' +arch=(i686 x86_64) +url='http://tools.android.com/' +license=(Apache MIT) +depends=(openssl) +makedepends=(git) +source=(git+https://android.googlesource.com/platform/system/core#tag=android-$pkgver + git+https://android.googlesource.com/platform/system/extras#tag=android-$pkgver + git+https://android.googlesource.com/platform/external/libselinux#tag=android-$pkgver + adbMakefile + fastbootMakefile + bash_completion) # Bash completion file was taken from https://github.com/mbrubeck/android-completion +md5sums=('SKIP' + 'SKIP' + 'SKIP' + '887d868e544330ef850334961685cab3' + 'cd1a1a9d16b523119245bfe17120d73b' + '94ba9c753e9c3d2f29ffdef2eaf7888d') + +build() { + make -C core/adb -f "$srcdir"/adbMakefile + make -C core/fastboot -f "$srcdir"/fastbootMakefile +} + +package(){ + install -Dm 755 core/adb/adb "$pkgdir"/usr/bin/adb + install -Dm 755 core/fastboot/fastboot "$pkgdir"/usr/bin/fastboot + + install -Dm 644 bash_completion "$pkgdir"/etc/bash_completion.d/$pkgname +} diff --git a/community/android-tools/adbMakefile b/community/android-tools/adbMakefile new file mode 100644 index 000000000..9a76a9be8 --- /dev/null +++ b/community/android-tools/adbMakefile @@ -0,0 +1,43 @@ +SRCS+= adb.c +SRCS+= adb_auth_host.c +SRCS+= adb_client.c +SRCS+= commandline.c +SRCS+= console.c +SRCS+= fdevent.c +SRCS+= file_sync_client.c +SRCS+= get_my_path_linux.c +SRCS+= services.c +SRCS+= sockets.c +SRCS+= transport.c +SRCS+= transport_local.c +SRCS+= transport_usb.c +SRCS+= usb_linux.c +SRCS+= usb_vendors.c + +VPATH+= ../libcutils +SRCS+= list.c +SRCS+= load_file.c +SRCS+= socket_inaddr_any_server.c +SRCS+= socket_local_client.c +SRCS+= socket_local_server.c +SRCS+= socket_loopback_client.c +SRCS+= socket_loopback_server.c +SRCS+= socket_network_client.c + +VPATH+= ../libzipfile +SRCS+= centraldir.c +SRCS+= zipfile.c + +CPPFLAGS+= -DADB_HOST=1 +CPPFLAGS+= -DHAVE_FORKEXEC=1 +CPPFLAGS+= -I. +CPPFLAGS+= -I../include + +LIBS+= -lcrypto -lpthread -lz + +OBJS= $(SRCS:.c=.o) + +all: adb + +adb: $(OBJS) + cc -o $@ $(LDFLAGS) $(OBJS) $(LIBS) diff --git a/community/android-tools/bash_completion b/community/android-tools/bash_completion new file mode 100644 index 000000000..1d222d431 --- /dev/null +++ b/community/android-tools/bash_completion @@ -0,0 +1,204 @@ +## Bash completion for the Android SDK tools. +## +## Copyright (c) 2009 Matt Brubeck +## +## Permission is hereby granted, free of charge, to any person obtaining a copy +## of this software and associated documentation files (the "Software"), to deal +## in the Software without restriction, including without limitation the rights +## to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +## copies of the Software, and to permit persons to whom the Software is +## furnished to do so, subject to the following conditions: +## +## The above copyright notice and this permission notice shall be included in +## all copies or substantial portions of the Software. +## +## THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +## IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +## FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +## AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +## LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +## OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +## THE SOFTWARE. + + +function _adb() +{ + local cur prev opts cmds c subcommand device_selected + COMPREPLY=() + cur="${COMP_WORDS[COMP_CWORD]}" + prev="${COMP_WORDS[COMP_CWORD-1]}" + opts="-d -e -s -p" + cmds="devices push pull sync shell emu logcat forward jdwp install sideload \ + uninstall bugreport help version wait-for-device start-server \ + reboot reboot-bootloader \ + connect disconnect \ + kill-server get-state get-serialno status-window remount root ppp backup restore" + cmds_not_need_device="devices help version start-server kill-server connect disconnect" + subcommand="" + device_selected="" + + # Look for the subcommand. + c=1 + while [ $c -lt $COMP_CWORD ]; do + word="${COMP_WORDS[c]}" + if [ "$word" = "-d" -o "$word" = "-e" -o "$word" = "-s" ]; then + device_selected=true + opts="-p" + fi + for cmd in $cmds; do + if [ "$cmd" = "$word" ]; then + subcommand="$word" + fi + done + c=$((++c)) + done + + case "${subcommand}" in + '') + case "${prev}" in + -p) + return 0; + ;; + -s) + # Use 'adb devices' to list serial numbers. + COMPREPLY=( $(compgen -W "$(adb devices|grep 'device$'|cut -f1)" -- ${cur} ) ) + return 0 + ;; + esac + case "${cur}" in + -*) + COMPREPLY=( $(compgen -W "$opts" -- ${cur}) ) + return 0 + ;; + esac + if [ -z "$device_selected" ]; then + local num_devices=$(( $(adb devices 2>/dev/null|wc -l) - 2 )) + if [ "$num_devices" -gt "1" ]; then + # With multiple devices, you must choose a device first. + COMPREPLY=( $(compgen -W "${opts} ${cmds_not_need_device}" -- ${cur}) ) + return 0 + fi + fi + COMPREPLY=( $(compgen -W "${cmds}" -- ${cur}) ) + return 0 + ;; + install) + case "${cur}" in + -*) + COMPREPLY=( $(compgen -W "-l -r -s" -- ${cur}) ) + return 0 + ;; + esac + ;; + forward) + # Filename or installation option. + COMPREPLY=( $(compgen -W "tcp: localabstract: localreserved: localfilesystem: dev: jdwp:" -- ${cur}) ) + return 0 + ;; + uninstall) + case "${cur}" in + -*) + COMPREPLY=( $(compgen -W "-k" -- ${cur}) ) + return 0 + ;; + esac + ;; + logcat) + case "${cur}" in + -*) + COMPREPLY=( $(compgen -W "-v -b -c -d -f -g -n -r -s" -- ${cur}) ) + return 0 + ;; + esac + case "${prev}" in + -v) + COMPREPLY=( $(compgen -W "brief process tag thread raw time long" -- ${cur}) ) + return 0 + ;; + -b) + COMPREPLY=( $(compgen -W "radio events main" -- ${cur}) ) + return 0 + ;; + esac + ;; + backup) + case "${cur}" in + -*) + COMPREPLY=( $(compgen -W "-f -apk -noapk -obb -noobb -shared -noshared -all -system -nosystem" -- ${cur}) ) + return 0 + ;; + esac + ;; + esac +} +complete -o default -F _adb adb + + + +function _fastboot() +{ + local cur prev opts cmds c subcommand device_selected + COMPREPLY=() + cur="${COMP_WORDS[COMP_CWORD]}" + prev="${COMP_WORDS[COMP_CWORD-1]}" + opts="-w -s -p -c -i -b -n" + cmds="update flashall flash erase getvar boot devices \ + reboot reboot-bootloader oem continue" + subcommand="" + partition_list="boot recovery system userdata bootloader radio" + device_selected="" + + # Look for the subcommand. + c=1 + while [ $c -lt $COMP_CWORD ]; do + word="${COMP_WORDS[c]}" + if [ "$word" = "-s" ]; then + device_selected=true + fi + for cmd in $cmds; do + if [ "$cmd" = "$word" ]; then + subcommand="$word" + fi + done + c=$((++c)) + done + + case "${subcommand}" in + '') + case "${prev}" in + -s) + # Use 'fastboot devices' to list serial numbers. + COMPREPLY=( $(compgen -W "$(fastboot devices|cut -f1)" -- ${cur} ) ) + return 0 + ;; + esac + case "${cur}" in + -*) + COMPREPLY=( $(compgen -W "$opts" -- ${cur}) ) + return 0 + ;; + esac + if [ -z "$device_selected" ]; then + local num_devices=$(( $(fastboot devices 2>/dev/null|wc -l) )) + if [ "$num_devices" -gt "1" ]; then + # With multiple devices, you must choose a device first. + COMPREPLY=( $(compgen -W "-s" -- ${cur}) ) + return 0 + fi + fi + COMPREPLY=( $(compgen -W "${cmds}" -- ${cur}) ) + return 0 + ;; + flash) + # partition name + COMPREPLY=( $(compgen -W "${partition_list}" -- ${cur}) ) + return 0 + ;; + erase) + # partition name + COMPREPLY=( $(compgen -W "${partition_list}" -- ${cur}) ) + return 0 + ;; + esac +} +complete -o default -F _fastboot fastboot diff --git a/community/android-tools/fastbootMakefile b/community/android-tools/fastbootMakefile new file mode 100644 index 000000000..778da3d0b --- /dev/null +++ b/community/android-tools/fastbootMakefile @@ -0,0 +1,54 @@ +SRCS+=bootimg.c +SRCS+=engine.c +SRCS+=fastboot.c +SRCS+=protocol.c +SRCS+=usb_linux.c +SRCS+=util_linux.c + +VPATH+= ../libsparse +SRCS+= backed_block.c +SRCS+= output_file.c +SRCS+= sparse.c +SRCS+= sparse_crc32.c +SRCS+= sparse_err.c +SRCS+= sparse_read.c + +VPATH+= ../libzipfile +SRCS+= centraldir.c +SRCS+= zipfile.c + +VPATH+= ../../extras/ext4_utils +SRCS+= allocate.c +SRCS+= contents.c +SRCS+= crc16.c +SRCS+= ext4_utils.c +SRCS+= extent.c +SRCS+= indirect.c +SRCS+= make_ext4fs.c +SRCS+= sha1.c +SRCS+= uuid.c +SRCS+= wipe.c + +VPATH+= ../../libselinux/src +SRCS+= callbacks.c +SRCS+= check_context.c +SRCS+= freecon.c +SRCS+= init.c +SRCS+= label.c +SRCS+= label_android_property.c +SRCS+= label_file.c + +CPPFLAGS+= -I../include +CPPFLAGS+= -I../libsparse/include +CPPFLAGS+= -I../mkbootimg +CPPFLAGS+= -I../../extras/ext4_utils +CPPFLAGS+= -I../../libselinux/include + +LIBS+= -lz + +OBJS= $(SRCS:.c=.o) + +all: fastboot + +fastboot: $(OBJS) + cc -o $@ $(OBJS) $(LIBS) diff --git a/community/atop/PKGBUILD b/community/atop/PKGBUILD index 2d1f99a9a..1ce3611e6 100644 --- a/community/atop/PKGBUILD +++ b/community/atop/PKGBUILD @@ -1,10 +1,10 @@ -# $Id: PKGBUILD 92271 2013-06-03 13:35:40Z spupykin $ +# $Id: PKGBUILD 110162 2014-04-25 13:27:08Z spupykin $ # Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com> # Contributor: John Gerritse <john.gerritse@gmail.com> pkgname=atop pkgver=2.0.2 -pkgrel=1 +pkgrel=2 pkgdesc="A system and process level monitor." arch=(i686 x86_64) url="http://www.atoptool.nl/" @@ -13,9 +13,14 @@ depends=('ncurses' 'sh' 'zlib') source=(http://www.atoptool.nl/download/atop-${pkgver}.tar.gz) md5sums=('f1dd1984584f9635712cb7196e25620c') -build() { +prepare() { cd $srcdir/$pkgname-${pkgver/_/-} sed -i 's#root ##' atop.cron + sed -i 's|%|%%|g' atop.service +} + +build() { + cd $srcdir/$pkgname-${pkgver/_/-} make } diff --git a/community/caja/PKGBUILD b/community/caja/PKGBUILD index 7150c7973..71a326c53 100644 --- a/community/caja/PKGBUILD +++ b/community/caja/PKGBUILD @@ -1,9 +1,9 @@ -# $Id: PKGBUILD 109911 2014-04-21 15:45:57Z flexiondotorg $ +# $Id: PKGBUILD 110165 2014-04-25 15:44:33Z flexiondotorg $ # Maintainer : Martin Wimpress <code@flexion.org> pkgname=caja -pkgver=1.8.0 -pkgrel=3 +pkgver=1.8.1 +pkgrel=1 pkgdesc="The MATE shell and file manager" url="http://mate-desktop.org" arch=('i686' 'x86_64') @@ -17,17 +17,10 @@ replaces=('mate-file-manager') provides=('mate-file-manager') conflicts=('mate-file-manager') groups=('mate') -source=("http://pub.mate-desktop.org/releases/1.8/${pkgname}-${pkgver}.tar.xz" - "4f1e756e08e61840eb9a52de4debee30006ea31e.diff") -sha1sums=('3bfb52dceae4fa7b39eb26099b07326fa4197f3f' - 'b2b619091643521b1e7263f883780abdf7bd7d71') +source=("http://pub.mate-desktop.org/releases/1.8/${pkgname}-${pkgver}.tar.xz") +sha1sums=('fcb8ab7b237fe8b1bd834dbdcbbd92f5aa210413') install=${pkgname}.install -prepare() { - cd "${srcdir}/${pkgname}-${pkgver}" - patch -Np1 -i "${srcdir}/4f1e756e08e61840eb9a52de4debee30006ea31e.diff" -} - build() { cd "${srcdir}/${pkgname}-${pkgver}" ./configure \ diff --git a/community/cgmanager/PKGBUILD b/community/cgmanager/PKGBUILD index 7b65f1686..4eab42dd3 100644 --- a/community/cgmanager/PKGBUILD +++ b/community/cgmanager/PKGBUILD @@ -1,9 +1,9 @@ -# $Id: PKGBUILD 110119 2014-04-24 14:03:51Z spupykin $ +# $Id: PKGBUILD 110156 2014-04-25 09:39:46Z spupykin $ # Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com> pkgname=cgmanager pkgver=0.23 -pkgrel=1 +pkgrel=2 pkgdesc="Another daemon for managing control groups" arch=(i686 x86_64) url="https://github.com/cgmanager/cgmanager" @@ -16,7 +16,7 @@ md5sums=('332705388ac51a7b165e4abbf7a0d2a8') build() { cd "$srcdir/$pkgname-$pkgver" ./bootstrap.sh - ./configure --prefix=/usr + ./configure --prefix=/usr --sbindir=/usr/bin make } diff --git a/community/intellij-idea-libs/PKGBUILD b/community/intellij-idea-libs/PKGBUILD index 8c6750c5f..56584ba60 100644 --- a/community/intellij-idea-libs/PKGBUILD +++ b/community/intellij-idea-libs/PKGBUILD @@ -1,8 +1,8 @@ -# $Id: PKGBUILD 108116 2014-03-23 10:11:55Z stativ $ +# $Id: PKGBUILD 110176 2014-04-25 19:56:50Z stativ $ # Maintainer: Lukas Jirkovsky <l.jirkovsky@gmail.com> pkgname=intellij-idea-libs -pkgver=13.1.1 -_pkgver=135.480 +pkgver=13.1.2 +_pkgver=135.690 pkgrel=1 pkgdesc="Architecture dependent libraries needed by the Intellij Idea IDE" arch=('i686' 'x86_64') @@ -11,7 +11,7 @@ license=('Apache') depends=('glibc') options=(!strip) source=(http://download.jetbrains.com/idea/ideaIC-$pkgver.tar.gz) -md5sums=('a20ade9bc4addbc341af8dcc1a0830ce') +md5sums=('48daa326a1bce3666dbb06cedaf7b66a') package() { [ $CARCH == "x86_64" ] && SUFFIX=64 diff --git a/community/kid3/PKGBUILD b/community/kid3/PKGBUILD index 8e4efa056..c05e2c9d9 100644 --- a/community/kid3/PKGBUILD +++ b/community/kid3/PKGBUILD @@ -1,11 +1,11 @@ -# $Id: PKGBUILD 101955 2013-12-02 22:15:37Z jlichtblau $ +# $Id: PKGBUILD 110169 2014-04-25 18:51:17Z jlichtblau $ # Maintainer: Jaroslav Lichtblau <dragonlord@aur.archlinux.org> # Contributor: Alois Nespor <alois.nespor@gmail.com> pkgbase=kid3 pkgname=('kid3' 'kid3-qt') -pkgver=3.0.2 -pkgrel=2 +pkgver=3.1 +pkgrel=1 arch=('i686' 'x86_64') url="http://kid3.sourceforge.net/" license=('GPL') @@ -13,10 +13,10 @@ makedepends=('automoc4' 'cmake' 'docbook-xml' 'docbook-xsl' 'phonon-qt4' 'chroma install=$pkgbase.install changelog=$pkgbase.changelog source=(http://downloads.sourceforge.net/$pkgbase/$pkgbase-$pkgver.tar.gz) -sha256sums=('31492e01039e78d2e73ba342a2d2c837395597eb48a101366b160c36fcdcfab4') +sha256sums=('08661266250670620a51e3d55b97b00fe545625c74f7cf0834b5308572ffcc51') build() { - cd ${srcdir} + cd "${srcdir}" [[ ! -d build ]] && mkdir build mkdir build-qt @@ -31,7 +31,7 @@ build() { make #kid3-qt - cd $srcdir/build-qt + cd "$srcdir"/build-qt cmake \ ../${pkgbase}-${pkgver} \ @@ -47,9 +47,9 @@ pkgdesc="An MP3, Ogg/Vorbis and FLAC tag editor, KDE version" depends=('chromaprint' 'id3lib' 'taglib' 'libmp4v2' 'kdebase-runtime') conflicts=('kid3-qt') - cd $srcdir/build + cd "$srcdir"/build - make DESTDIR=${pkgdir} install + make DESTDIR="${pkgdir}" install } package_kid3-qt() { @@ -58,7 +58,7 @@ depends=('chromaprint' 'id3lib' 'taglib' 'libmp4v2' 'qt4') conflicts=('kid3') provides=('kid3') - cd $srcdir/build-qt + cd "$srcdir"/build-qt - make DESTDIR=${pkgdir} install + make DESTDIR="${pkgdir}" install } diff --git a/community/kid3/kid3.changelog b/community/kid3/kid3.changelog index d71b20678..608436d29 100644 --- a/community/kid3/kid3.changelog +++ b/community/kid3/kid3.changelog @@ -1,3 +1,6 @@ +2014-04-25 Jaroslav Lichtblau <dragonlord@aur.archlinux.org> + * kid3 3.1-1 + 2013-12-02 Jaroslav Lichtblau <dragonlord@aur.archlinux.org> * kid3 3.0.2-2 FS#37642 fixed, package split diff --git a/community/mate-power-manager/00-add-dbus-interface-to-kbdbacklight.diff b/community/mate-power-manager/00-add-dbus-interface-to-kbdbacklight.diff new file mode 100644 index 000000000..79fd9938c --- /dev/null +++ b/community/mate-power-manager/00-add-dbus-interface-to-kbdbacklight.diff @@ -0,0 +1,161 @@ +diff --git a/src/Makefile.am b/src/Makefile.am +index 274a45c..ddbb6ed 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -6,6 +6,7 @@ NULL = + EXTRA_DIST = \ + org.mate.PowerManager.xml \ + org.mate.PowerManager.Backlight.xml \ ++ org.mate.PowerManager.KbdBacklight.xml \ + gpm-marshal.list \ + $(NULL) + +@@ -273,6 +274,7 @@ endif + BUILT_SOURCES = \ + org.mate.PowerManager.h \ + org.mate.PowerManager.Backlight.h \ ++ org.mate.PowerManager.KbdBacklight.h \ + gpm-marshal.c \ + gpm-marshal.h \ + $(NULL) +@@ -298,6 +300,13 @@ org.mate.PowerManager.Backlight.h: org.mate.PowerManager.Backlight.xml + --output=org.mate.PowerManager.Backlight.h \ + $(srcdir)/org.mate.PowerManager.Backlight.xml + ++org.mate.PowerManager.KbdBacklight.h: org.mate.PowerManager.KbdBacklight.xml ++ libtool --mode=execute dbus-binding-tool \ ++ --prefix=gpm_kbd_backlight \ ++ --mode=glib-server \ ++ --output=org.mate.PowerManager.KbdBacklight.h \ ++ $(srcdir)/org.mate.PowerManager.KbdBacklight.xml ++ + clean-local: + rm -f *~ + rm -f gpm-marshal.c gpm-marshal.h +diff --git a/src/gpm-common.h b/src/gpm-common.h +index 6f712cb..ef20f88 100644 +--- a/src/gpm-common.h ++++ b/src/gpm-common.h +@@ -33,6 +33,7 @@ G_BEGIN_DECLS + #define GPM_DBUS_SERVICE "org.mate.PowerManager" + #define GPM_DBUS_INTERFACE "org.mate.PowerManager" + #define GPM_DBUS_INTERFACE_BACKLIGHT "org.mate.PowerManager.Backlight" ++#define GPM_DBUS_INTERFACE_KBD_BACKLIGHT "org.mate.PowerManager.KbdBacklight" + #define GPM_DBUS_PATH "/org/mate/PowerManager" + #define GPM_DBUS_PATH_BACKLIGHT "/org/mate/PowerManager/Backlight" + #define GPM_DBUS_PATH_KBD_BACKLIGHT "/org/mate/PowerManager/KbdBacklight" +diff --git a/src/gpm-kbd-backlight.c b/src/gpm-kbd-backlight.c +index 98a64da..0ac6801 100644 +--- a/src/gpm-kbd-backlight.c ++++ b/src/gpm-kbd-backlight.c +@@ -31,21 +31,6 @@ + #include "gpm-kbd-backlight.h" + #include "gsd-media-keys-window.h" + +-static const gchar *kbd_backlight_introspection = "" +-"<?xml version=\"1.0\" encoding=\"UTF-8\"?>""<node name=\"/\">" +- "<interface name=\"org.mate.PowerManager.Backlight\">" +- "<method name=\"GetBrightness\">" +- "<arg type=\"u\" name=\"percentage_brightness\" direction=\"out\"/>" +- "</method>" +- "<method name=\"SetBrightness\">" +- "<arg type=\"u\" name=\"percentage_brightness\" direction=\"in\"/>" +- "</method>" +- "<signal name=\"BrightnessChanged\">" +- "<arg type=\"u\" name=\"percentage_brightness\" direction=\"out\"/>" +- "</signal>" +- "</interface>" +-"</node>"; +- + #define GPM_KBD_BACKLIGHT_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GPM_TYPE_KBD_BACKLIGHT, GpmKbdBacklightPrivate)) + + struct GpmKbdBacklightPrivate +@@ -430,40 +415,6 @@ gpm_kbd_backlight_dbus_property_set (GDBusConnection *connection, + return FALSE; + } + +-/** +- * gpm_kbd_backlight_register_dbus: +- * @backlight: +- * @connection: +- * @error: +- **/ +-void +-gpm_kbd_backlight_register_dbus (GpmKbdBacklight *backlight, +- GDBusConnection *connection, +- GError **error) +-{ +- GDBusNodeInfo *node_info; +- GDBusInterfaceInfo *interface_info; +- GDBusInterfaceVTable interface_vtable = { +- gpm_kbd_backlight_dbus_method_call, +- gpm_kbd_backlight_dbus_property_get, +- gpm_kbd_backlight_dbus_property_set +- }; +- +- node_info = g_dbus_node_info_new_for_xml (kbd_backlight_introspection, NULL); +- interface_info = g_dbus_node_info_lookup_interface (node_info, GPM_DBUS_INTERFACE_BACKLIGHT); +- +- backlight->priv->bus_connection = g_object_ref (connection); +- backlight->priv->bus_object_id = +- g_dbus_connection_register_object (connection, +- GPM_DBUS_PATH_KBD_BACKLIGHT, +- interface_info, +- &interface_vtable, +- backlight, +- NULL, +- error); +- g_dbus_node_info_unref (node_info); +-} +- + static gboolean + gpm_kbd_backlight_evaluate_power_source_and_set (GpmKbdBacklight *backlight) + { +diff --git a/src/gpm-manager.c b/src/gpm-manager.c +index 7561b22..6ca9dea 100644 +--- a/src/gpm-manager.c ++++ b/src/gpm-manager.c +@@ -63,6 +63,7 @@ + #include "gpm-disks.h" + + #include "org.mate.PowerManager.Backlight.h" ++#include "org.mate.PowerManager.KbdBacklight.h" + + static void gpm_manager_finalize (GObject *object); + +@@ -1988,9 +1989,11 @@ gpm_manager_init (GpmManager *manager) + + manager->priv->kbd_backlight = gpm_kbd_backlight_new (); + if (manager->priv->kbd_backlight != NULL) { +- gpm_kbd_backlight_register_dbus (manager->priv->kbd_backlight, +- g_connection, +- NULL); ++ dbus_g_object_type_install_info (GPM_TYPE_KBD_BACKLIGHT, ++ &dbus_glib_gpm_kbd_backlight_object_info); ++ dbus_g_connection_register_g_object (connection, GPM_DBUS_PATH_KBD_BACKLIGHT, ++ G_OBJECT (manager->priv->kbd_backlight)); ++ + } + + manager->priv->idle = gpm_idle_new (); +diff --git a/src/org.mate.PowerManager.KbdBacklight.xml b/src/org.mate.PowerManager.KbdBacklight.xml +new file mode 100644 +index 0000000..82b7cb2 +--- /dev/null ++++ b/src/org.mate.PowerManager.KbdBacklight.xml +@@ -0,0 +1,15 @@ ++<?xml version="1.0" encoding="UTF-8"?> ++<node name="/"> ++ <interface name="org.mate.PowerManager.KbdBacklight"> ++ <method name="GetBrightness"> ++ <arg type="u" name="percentage_brightness" direction="out"/> ++ </method> ++ <method name="SetBrightness"> ++ <arg type="u" name="percentage_brightness" direction="in"/> ++ </method> ++ <signal name="BrightnessChanged"> ++ <arg type="u" name="percentage_brightness" direction="out"/> ++ </signal> ++ </interface> ++</node> ++ diff --git a/community/mate-power-manager/10-upower-0.99.diff b/community/mate-power-manager/10-upower-0.99.diff new file mode 100644 index 000000000..3f652d9a8 --- /dev/null +++ b/community/mate-power-manager/10-upower-0.99.diff @@ -0,0 +1,647 @@ +diff --git a/data/org.mate.power-manager.gschema.xml.in b/data/org.mate.power-manager.gschema.xml.in +index adecce0..ca009b5 100644 +--- a/data/org.mate.power-manager.gschema.xml.in ++++ b/data/org.mate.power-manager.gschema.xml.in +@@ -211,11 +211,6 @@ + <_summary>Seconds of inactivity to spin down when on battery</_summary> + <_description>The number of seconds of inactivity to spin down the disks when on battery power.</_description> + </key> +- <key name="notify-perhaps-recall" type="b"> +- <default>true</default> +- <_summary>If we should show the recalled battery warning for a broken battery</_summary> +- <_description>If we should show the recalled battery warning for a broken battery. Set this to false only if you know your battery is okay.</_description> +- </key> + <key name="notify-low-capacity" type="b"> + <default>true</default> + <_summary>If we should show the low capacity warning for a broken battery</_summary> +diff --git a/src/gpm-backlight.c b/src/gpm-backlight.c +index 1f1d834..d2938a4 100644 +--- a/src/gpm-backlight.c ++++ b/src/gpm-backlight.c +@@ -410,7 +410,11 @@ gpm_settings_key_changed_cb (GSettings *settings, const gchar *key, GpmBacklight + * Does the actions when the ac power source is inserted/removed. + **/ + static void ++#if UP_CHECK_VERSION(0, 99, 0) ++gpm_backlight_client_changed_cb (UpClient *client, GParamSpec *pspec, GpmBacklight *backlight) ++#else + gpm_backlight_client_changed_cb (UpClient *client, GpmBacklight *backlight) ++#endif + { + gpm_backlight_brightness_evaluate_and_set (backlight, FALSE, TRUE); + } +@@ -727,8 +731,13 @@ gpm_backlight_init (GpmBacklight *backlight) + + /* we use up_client for the ac-adapter-changed signal */ + backlight->priv->client = up_client_new (); ++#if UP_CHECK_VERSION(0, 99, 0) ++ g_signal_connect (backlight->priv->client, "notify", ++ G_CALLBACK (gpm_backlight_client_changed_cb), backlight); ++#else + g_signal_connect (backlight->priv->client, "changed", + G_CALLBACK (gpm_backlight_client_changed_cb), backlight); ++#endif + + /* gets caps */ + backlight->priv->can_dim = gpm_brightness_has_hw (backlight->priv->brightness); +diff --git a/src/gpm-button.c b/src/gpm-button.c +index 1e38173..b331cf6 100644 +--- a/src/gpm-button.c ++++ b/src/gpm-button.c +@@ -324,7 +324,11 @@ gpm_button_reset_time (GpmButton *button) + * gpm_button_client_changed_cb + **/ + static void ++#if UP_CHECK_VERSION(0, 99, 0) ++gpm_button_client_changed_cb (UpClient *client, GParamSpec *pspec, GpmButton *button) ++#else + gpm_button_client_changed_cb (UpClient *client, GpmButton *button) ++#endif + { + gboolean lid_is_closed; + +@@ -363,9 +367,13 @@ gpm_button_init (GpmButton *button) + + button->priv->client = up_client_new (); + button->priv->lid_is_closed = up_client_get_lid_is_closed (button->priv->client); ++#if UP_CHECK_VERSION(0, 99, 0) ++ g_signal_connect (button->priv->client, "notify", ++ G_CALLBACK (gpm_button_client_changed_cb), button); ++#else + g_signal_connect (button->priv->client, "changed", + G_CALLBACK (gpm_button_client_changed_cb), button); +- ++#endif + /* register the brightness keys */ + gpm_button_xevent_key (button, XF86XK_PowerOff, GPM_BUTTON_POWER); + #ifdef HAVE_XF86XK_SUSPEND +diff --git a/src/gpm-common.h b/src/gpm-common.h +index ef20f88..303bdd1 100644 +--- a/src/gpm-common.h ++++ b/src/gpm-common.h +@@ -98,7 +98,6 @@ G_BEGIN_DECLS + #define GPM_SETTINGS_SPINDOWN_TIMEOUT_BATT "spindown-timeout-battery" + + /* notify */ +-#define GPM_SETTINGS_NOTIFY_PERHAPS_RECALL "notify-perhaps-recall" + #define GPM_SETTINGS_NOTIFY_LOW_CAPACITY "notify-low-capacity" + #define GPM_SETTINGS_NOTIFY_DISCHARGING "notify-discharging" + #define GPM_SETTINGS_NOTIFY_FULLY_CHARGED "notify-fully-charged" +diff --git a/src/gpm-control.c b/src/gpm-control.c +index ec50136..0562d38 100644 +--- a/src/gpm-control.c ++++ b/src/gpm-control.c +@@ -289,10 +289,11 @@ gpm_control_suspend (GpmControl *control, GError **error) + } + g_object_unref(proxy); + } ++#if !UP_CHECK_VERSION(0, 99, 0) + else { + ret = up_client_suspend_sync (control->priv->client, NULL, error); + } +- ++#endif + egg_debug ("emitting resume"); + g_signal_emit (control, signals [RESUME], 0, GPM_CONTROL_ACTION_SUSPEND); + +@@ -399,10 +400,11 @@ gpm_control_hibernate (GpmControl *control, GError **error) + ret = TRUE; + } + } ++#if !UP_CHECK_VERSION(0, 99, 0) + else { + ret = up_client_hibernate_sync (control->priv->client, NULL, error); + } +- ++#endif + egg_debug ("emitting resume"); + g_signal_emit (control, signals [RESUME], 0, GPM_CONTROL_ACTION_HIBERNATE); + +diff --git a/src/gpm-engine.c b/src/gpm-engine.c +index 0f9d0c1..e6c6bf2 100644 +--- a/src/gpm-engine.c ++++ b/src/gpm-engine.c +@@ -72,7 +72,6 @@ enum { + CHARGE_ACTION, + DISCHARGING, + LOW_CAPACITY, +- PERHAPS_RECALL, + LAST_SIGNAL + }; + +@@ -761,42 +760,6 @@ gpm_engine_device_add (GpmEngine *engine, UpDevice *device) + } + + /** +- * gpm_engine_check_recall: +- **/ +-static gboolean +-gpm_engine_check_recall (GpmEngine *engine, UpDevice *device) +-{ +- UpDeviceKind kind; +- gboolean recall_notice = FALSE; +- gchar *recall_vendor = NULL; +- gchar *recall_url = NULL; +- +- /* get device properties */ +- g_object_get (device, +- "kind", &kind, +- "recall-notice", &recall_notice, +- "recall-vendor", &recall_vendor, +- "recall-url", &recall_url, +- NULL); +- +- /* not battery */ +- if (kind != UP_DEVICE_KIND_BATTERY) +- goto out; +- +- /* no recall data */ +- if (!recall_notice) +- goto out; +- +- /* emit signal for manager */ +- egg_debug ("** EMIT: perhaps-recall"); +- g_signal_emit (engine, signals [PERHAPS_RECALL], 0, device, recall_vendor, recall_url); +-out: +- g_free (recall_vendor); +- g_free (recall_url); +- return recall_notice; +-} +- +-/** + * gpm_engine_coldplug_idle_cb: + **/ + static gboolean +@@ -805,12 +768,14 @@ gpm_engine_coldplug_idle_cb (GpmEngine *engine) + guint i; + GPtrArray *array = NULL; + UpDevice *device; ++#if !UP_CHECK_VERSION(0, 99, 0) + gboolean ret; + GError *error = NULL; ++#endif + + g_return_val_if_fail (engine != NULL, FALSE); + g_return_val_if_fail (GPM_IS_ENGINE (engine), FALSE); +- ++#if !UP_CHECK_VERSION(0, 99, 0) + /* get devices from UPower */ + ret = up_client_enumerate_devices_sync (engine->priv->client, NULL, &error); + if (!ret) { +@@ -818,7 +783,7 @@ gpm_engine_coldplug_idle_cb (GpmEngine *engine) + g_error_free (error); + goto out; + } +- ++#endif + /* connected mobile phones */ + gpm_phone_coldplug (engine->priv->phone); + +@@ -829,9 +794,10 @@ gpm_engine_coldplug_idle_cb (GpmEngine *engine) + for (i=0;i<array->len;i++) { + device = g_ptr_array_index (array, i); + gpm_engine_device_add (engine, device); +- gpm_engine_check_recall (engine, device); + } ++#if !UP_CHECK_VERSION(0, 99, 0) + out: ++#endif + if (array != NULL) + g_ptr_array_unref (array); + /* never repeat */ +@@ -846,7 +812,6 @@ gpm_engine_device_added_cb (UpClient *client, UpDevice *device, GpmEngine *engin + { + /* add to list */ + g_ptr_array_add (engine->priv->array, g_object_ref (device)); +- gpm_engine_check_recall (engine, device); + + gpm_engine_recalculate_state (engine); + } +@@ -855,6 +820,22 @@ gpm_engine_device_added_cb (UpClient *client, UpDevice *device, GpmEngine *engin + * gpm_engine_device_removed_cb: + **/ + static void ++#if UP_CHECK_VERSION(0, 99, 0) ++gpm_engine_device_removed_cb (UpClient *client, const char *object_path, GpmEngine *engine) ++{ ++ guint i; ++ ++ for (i = 0; i < engine->priv->array->len; i++) { ++ UpDevice *device = g_ptr_array_index (engine->priv->array, i); ++ ++ if (g_strcmp0 (object_path, up_device_get_object_path (device)) == 0) { ++ g_ptr_array_remove_index (engine->priv->array, i); ++ break; ++ } ++ } ++ gpm_engine_recalculate_state (engine); ++} ++#else + gpm_engine_device_removed_cb (UpClient *client, UpDevice *device, GpmEngine *engine) + { + gboolean ret; +@@ -863,12 +844,18 @@ gpm_engine_device_removed_cb (UpClient *client, UpDevice *device, GpmEngine *eng + return; + gpm_engine_recalculate_state (engine); + } +- ++#endif + + /** + * gpm_engine_device_changed_cb: + **/ + static void ++#if UP_CHECK_VERSION(0, 99, 0) ++gpm_engine_device_changed_cb (UpClient *client, GParamSpec *pspec, GpmEngine *engine) ++{ ++ gpm_engine_recalculate_state (engine); ++} ++#else + gpm_engine_device_changed_cb (UpClient *client, UpDevice *device, GpmEngine *engine) + { + UpDeviceKind kind; +@@ -930,6 +917,7 @@ gpm_engine_device_changed_cb (UpClient *client, UpDevice *device, GpmEngine *eng + + gpm_engine_recalculate_state (engine); + } ++#endif + + /** + * gpm_engine_get_devices: +@@ -1042,7 +1030,10 @@ phone_device_refresh_cb (GpmPhone *phone, guint idx, GpmEngine *engine) + static void + gpm_engine_init (GpmEngine *engine) + { +- ++#if UP_CHECK_VERSION(0, 99, 0) ++ GPtrArray *array = NULL; ++ guint i; ++#endif + engine->priv = GPM_ENGINE_GET_PRIVATE (engine); + + engine->priv->array = g_ptr_array_new_with_free_func (g_object_unref); +@@ -1051,8 +1042,13 @@ gpm_engine_init (GpmEngine *engine) + G_CALLBACK (gpm_engine_device_added_cb), engine); + g_signal_connect (engine->priv->client, "device-removed", + G_CALLBACK (gpm_engine_device_removed_cb), engine); ++#if UP_CHECK_VERSION(0, 99, 0) ++ g_signal_connect (engine->priv->client, "notify", ++ G_CALLBACK (gpm_engine_device_changed_cb), engine); ++#else + g_signal_connect (engine->priv->client, "device-changed", + G_CALLBACK (gpm_engine_device_changed_cb), engine); ++#endif + + engine->priv->settings = g_settings_new (GPM_SETTINGS_SCHEMA); + g_signal_connect (engine->priv->settings, "changed", +@@ -1066,6 +1062,18 @@ gpm_engine_init (GpmEngine *engine) + g_signal_connect (engine->priv->phone, "device-refresh", + G_CALLBACK (phone_device_refresh_cb), engine); + ++#if UP_CHECK_VERSION(0, 99, 0) ++ /* coldplug */ ++ array = up_client_get_devices(engine->priv->client); ++ if (array) { ++ for (i = 0; i < array->len; i++) { ++ UpDevice *device = g_ptr_array_index (array, i); ++ gpm_engine_device_added_cb(engine->priv->client, device, engine); ++ } ++ g_ptr_array_free (array, TRUE); ++ } ++#endif ++ + /* create a fake virtual composite battery */ + engine->priv->battery_composite = up_device_new (); + g_object_set (engine->priv->battery_composite, +@@ -1134,14 +1142,6 @@ gpm_engine_class_init (GpmEngineClass *klass) + G_STRUCT_OFFSET (GpmEngineClass, low_capacity), + NULL, NULL, g_cclosure_marshal_VOID__POINTER, + G_TYPE_NONE, 1, G_TYPE_POINTER); +- signals [PERHAPS_RECALL] = +- g_signal_new ("perhaps-recall", +- G_TYPE_FROM_CLASS (object_class), +- G_SIGNAL_RUN_LAST, +- G_STRUCT_OFFSET (GpmEngineClass, perhaps_recall), +- NULL, NULL, gpm_marshal_VOID__POINTER_STRING_STRING, +- G_TYPE_NONE, +- 3, G_TYPE_POINTER, G_TYPE_STRING, G_TYPE_STRING); + signals [FULLY_CHARGED] = + g_signal_new ("fully-charged", + G_TYPE_FROM_CLASS (object_class), +diff --git a/src/gpm-engine.h b/src/gpm-engine.h +index be1ccd6..43f8956 100644 +--- a/src/gpm-engine.h ++++ b/src/gpm-engine.h +@@ -49,10 +49,6 @@ typedef struct + gchar *icon); + void (* summary_changed) (GpmEngine *engine, + gchar *status); +- void (* perhaps_recall) (GpmEngine *engine, +- UpDevice *device, +- const gchar *oem_vendor, +- const gchar *website); + void (* low_capacity) (GpmEngine *engine, + UpDevice *device); + void (* charge_low) (GpmEngine *engine, +diff --git a/src/gpm-kbd-backlight.c b/src/gpm-kbd-backlight.c +index 0ac6801..3a0f6e6 100644 +--- a/src/gpm-kbd-backlight.c ++++ b/src/gpm-kbd-backlight.c +@@ -113,6 +113,9 @@ gpm_kbd_backlight_set (GpmKbdBacklight *backlight, + guint goal; + + g_return_val_if_fail (GPM_IS_KBD_BACKLIGHT (backlight), FALSE); ++ /* avoid warnings if no keyboard brightness is available */ ++ if (backlight->priv->max_brightness < 1) ++ return FALSE; + /* if we're setting the same we are, don't bother */ + //g_return_val_if_fail (backlight->priv->brightness_percent != percentage, FALSE); + +@@ -483,6 +486,9 @@ gpm_kbd_backlight_control_resume_cb (GpmControl *control, + **/ + static void + gpm_kbd_backlight_client_changed_cb (UpClient *client, ++#if UP_CHECK_VERSION(0, 99, 0) ++ GParamSpec *pspec, ++#endif + GpmKbdBacklight *backlight) + { + gpm_kbd_backlight_evaluate_power_source_and_set (backlight); +@@ -752,8 +758,13 @@ gpm_kbd_backlight_init (GpmKbdBacklight *backlight) + + /* Use upower for ac changed signal */ + backlight->priv->client = up_client_new (); ++#if UP_CHECK_VERSION(0, 99, 0) ++ g_signal_connect (backlight->priv->client, "notify", ++ G_CALLBACK (gpm_kbd_backlight_client_changed_cb), backlight); ++#else + g_signal_connect (backlight->priv->client, "changed", + G_CALLBACK (gpm_kbd_backlight_client_changed_cb), backlight); ++#endif + + backlight->priv->settings = g_settings_new (GPM_SETTINGS_SCHEMA); + //g_signal_connect (backlight->priv->settings, "changed", G_CALLBACK (gpm_settings_key_changed_cb), backlight); +diff --git a/src/gpm-manager.c b/src/gpm-manager.c +index 6ca9dea..df84cac 100644 +--- a/src/gpm-manager.c ++++ b/src/gpm-manager.c +@@ -68,7 +68,6 @@ + static void gpm_manager_finalize (GObject *object); + + #define GPM_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GPM_TYPE_MANAGER, GpmManagerPrivate)) +-#define GPM_MANAGER_RECALL_DELAY 30 /* seconds */ + #define GPM_MANAGER_NOTIFY_TIMEOUT_NEVER 0 /* ms */ + #define GPM_MANAGER_NOTIFY_TIMEOUT_SHORT 10 * 1000 /* ms */ + #define GPM_MANAGER_NOTIFY_TIMEOUT_LONG 30 * 1000 /* ms */ +@@ -972,7 +971,11 @@ gpm_manager_get_spindown_timeout (GpmManager *manager) + * gpm_manager_client_changed_cb: + **/ + static void ++#if UP_CHECK_VERSION(0, 99, 0) ++gpm_manager_client_changed_cb (UpClient *client, GParamSpec *pspec, GpmManager *manager) ++#else + gpm_manager_client_changed_cb (UpClient *client, GpmManager *manager) ++#endif + { + gboolean event_when_closed; + gint timeout; +@@ -1092,111 +1095,6 @@ gpm_manager_settings_changed_cb (GSettings *settings, const gchar *key, GpmManag + } + + /** +- * gpm_manager_perhaps_recall_response_cb: +- */ +-static void +-gpm_manager_perhaps_recall_response_cb (GtkDialog *dialog, gint response_id, GpmManager *manager) +-{ +- GdkScreen *screen; +- GtkWidget *dialog_error; +- GError *error = NULL; +- gboolean ret; +- const gchar *website; +- +- /* don't show this again */ +- if (response_id == GTK_RESPONSE_CANCEL) { +- g_settings_set_boolean (manager->priv->settings, GPM_SETTINGS_NOTIFY_PERHAPS_RECALL, FALSE); +- goto out; +- } +- +- /* visit recall website */ +- if (response_id == GTK_RESPONSE_OK) { +- screen = gdk_screen_get_default(); +- website = (const gchar *) g_object_get_data (G_OBJECT (manager), "recall-oem-website"); +- ret = gtk_show_uri (screen, website, gtk_get_current_event_time (), &error); +- if (!ret) { +- dialog_error = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_INFO, GTK_BUTTONS_OK, +- "Failed to show url %s", error->message); +- gtk_dialog_run (GTK_DIALOG (dialog_error)); +- g_error_free (error); +- } +- goto out; +- } +-out: +- gtk_widget_destroy (GTK_WIDGET (dialog)); +- return; +-} +- +-/** +- * gpm_manager_perhaps_recall_delay_cb: +- */ +-static gboolean +-gpm_manager_perhaps_recall_delay_cb (GpmManager *manager) +-{ +- const gchar *oem_vendor; +- gchar *title = NULL; +- gchar *message = NULL; +- GtkWidget *dialog; +- +- oem_vendor = (const gchar *) g_object_get_data (G_OBJECT (manager), "recall-oem-vendor"); +- +- /* TRANSLATORS: the battery may be recalled by it's vendor */ +- title = g_strdup_printf ("%s: %s", GPM_NAME, _("Battery may be recalled")); +- message = g_strdup_printf (_("A battery in your computer may have been " +- "recalled by %s and you may be at risk.\n\n" +- "For more information visit the battery recall website."), oem_vendor); +- dialog = gtk_message_dialog_new_with_markup (NULL, GTK_DIALOG_DESTROY_WITH_PARENT, +- GTK_MESSAGE_INFO, GTK_BUTTONS_CLOSE, +- "<span size='larger'><b>%s</b></span>", title); +- +- gtk_message_dialog_format_secondary_markup (GTK_MESSAGE_DIALOG (dialog), "%s", message); +- +- /* TRANSLATORS: button text, visit the manufacturers recall website */ +- gtk_dialog_add_button (GTK_DIALOG (dialog), _("Visit recall website"), GTK_RESPONSE_OK); +- +- /* TRANSLATORS: button text, do not show this bubble again */ +- gtk_dialog_add_button (GTK_DIALOG (dialog), _("Do not show me this again"), GTK_RESPONSE_CANCEL); +- +- /* wait async for response */ +- gtk_widget_show (dialog); +- g_signal_connect (dialog, "response", G_CALLBACK (gpm_manager_perhaps_recall_response_cb), manager); +- +- g_free (title); +- g_free (message); +- +- /* never repeat */ +- return FALSE; +-} +- +-/** +- * gpm_manager_engine_perhaps_recall_cb: +- */ +-static void +-gpm_manager_engine_perhaps_recall_cb (GpmEngine *engine, UpDevice *device, gchar *oem_vendor, gchar *website, GpmManager *manager) +-{ +- gboolean ret; +- +- /* don't show when running under GDM */ +- if (g_getenv ("RUNNING_UNDER_GDM") != NULL) { +- egg_debug ("running under gdm, so no notification"); +- return; +- } +- +- /* already shown, and dismissed */ +- ret = g_settings_get_boolean (manager->priv->settings, GPM_SETTINGS_NOTIFY_PERHAPS_RECALL); +- if (!ret) { +- egg_debug ("Gsettings prevents notification: %s", GPM_SETTINGS_NOTIFY_PERHAPS_RECALL); +- return; +- } +- +- g_object_set_data_full (G_OBJECT (manager), "recall-oem-vendor", (gpointer) g_strdup (oem_vendor), (GDestroyNotify) g_free); +- g_object_set_data_full (G_OBJECT (manager), "recall-oem-website", (gpointer) g_strdup (website), (GDestroyNotify) g_free); +- +- /* delay by a few seconds so the panel can load */ +- g_timeout_add_seconds (GPM_MANAGER_RECALL_DELAY, (GSourceFunc) gpm_manager_perhaps_recall_delay_cb, manager); +-} +- +-/** + * gpm_manager_engine_icon_changed_cb: + */ + static void +@@ -1959,8 +1857,13 @@ gpm_manager_init (GpmManager *manager) + g_signal_connect (manager->priv->settings, "changed", + G_CALLBACK (gpm_manager_settings_changed_cb), manager); + manager->priv->client = up_client_new (); ++#if UP_CHECK_VERSION(0, 99, 0) ++ g_signal_connect (manager->priv->client, "notify", ++ G_CALLBACK (gpm_manager_client_changed_cb), manager); ++#else + g_signal_connect (manager->priv->client, "changed", + G_CALLBACK (gpm_manager_client_changed_cb), manager); ++#endif + + /* use libmatenotify */ + notify_init (GPM_NAME); +@@ -2023,8 +1926,6 @@ gpm_manager_init (GpmManager *manager) + gpm_manager_sync_policy_sleep (manager); + + manager->priv->engine = gpm_engine_new (); +- g_signal_connect (manager->priv->engine, "perhaps-recall", +- G_CALLBACK (gpm_manager_engine_perhaps_recall_cb), manager); + g_signal_connect (manager->priv->engine, "low-capacity", + G_CALLBACK (gpm_manager_engine_low_capacity_cb), manager); + g_signal_connect (manager->priv->engine, "icon-changed", +diff --git a/src/gpm-prefs-core.c b/src/gpm-prefs-core.c +index 7a2662d..6abb792 100644 +--- a/src/gpm-prefs-core.c ++++ b/src/gpm-prefs-core.c +@@ -811,7 +811,9 @@ gpm_prefs_init (GpmPrefs *prefs) + UpDevice *device; + UpDeviceKind kind; + GpmBrightness *brightness; ++#if !UP_CHECK_VERSION(0, 99, 0) + gboolean ret; ++#endif + guint i; + + GDBusProxy *proxy; +@@ -897,9 +899,11 @@ gpm_prefs_init (GpmPrefs *prefs) + else { + /* are we allowed to shutdown? */ + egg_console_kit_can_stop (prefs->priv->console, &prefs->priv->can_shutdown, NULL); ++#if !UP_CHECK_VERSION(0, 99, 0) + /* get values from UpClient */ + prefs->priv->can_suspend = up_client_get_can_suspend (prefs->priv->client); + prefs->priv->can_hibernate = up_client_get_can_hibernate (prefs->priv->client); ++#endif + } + + if (LOGIND_RUNNING()) { +@@ -953,14 +957,14 @@ gpm_prefs_init (GpmPrefs *prefs) + brightness = gpm_brightness_new (); + prefs->priv->has_lcd = gpm_brightness_has_hw (brightness); + g_object_unref (brightness); +- ++#if !UP_CHECK_VERSION(0, 99, 0) + /* get device list */ + ret = up_client_enumerate_devices_sync (prefs->priv->client, NULL, &error); + if (!ret) { + egg_warning ("failed to get device list: %s", error->message); + g_error_free (error); + } +- ++#endif + devices = up_client_get_devices (prefs->priv->client); + for (i=0; i<devices->len; i++) { + device = g_ptr_array_index (devices, i); +diff --git a/src/gpm-statistics.c b/src/gpm-statistics.c +index 98b5632..13489dc 100644 +--- a/src/gpm-statistics.c ++++ b/src/gpm-statistics.c +@@ -1236,6 +1236,12 @@ gpm_stats_device_added_cb (UpClient *client, UpDevice *device, gpointer user_dat + * gpm_stats_device_changed_cb: + **/ + static void ++#if UP_CHECK_VERSION(0, 99, 0) ++gpm_stats_device_changed_cb (UpClient *client, GParamSpec *pspec, gpointer user_data) ++{ ++ gpm_stats_button_update_ui(); ++} ++#else + gpm_stats_device_changed_cb (UpClient *client, UpDevice *device, gpointer user_data) + { + const gchar *object_path; +@@ -1246,6 +1252,7 @@ gpm_stats_device_changed_cb (UpClient *client, UpDevice *device, gpointer user_d + if (g_strcmp0 (current_device, object_path) == 0) + gpm_stats_update_info_data (device); + } ++#endif + + /** + * gpm_stats_device_removed_cb: +@@ -1794,11 +1801,12 @@ main (int argc, char *argv[]) + + wakeups = up_wakeups_new (); + g_signal_connect (wakeups, "data-changed", G_CALLBACK (gpm_stats_data_changed_cb), NULL); +- ++#if !UP_CHECK_VERSION(0, 99, 0) + /* coldplug */ + ret = up_client_enumerate_devices_sync (client, NULL, NULL); + if (!ret) + goto out; ++#endif + devices = up_client_get_devices (client); + + /* add devices in visually pleasing order */ +@@ -1814,7 +1822,11 @@ main (int argc, char *argv[]) + /* connect now the coldplug is done */ + g_signal_connect (client, "device-added", G_CALLBACK (gpm_stats_device_added_cb), NULL); + g_signal_connect (client, "device-removed", G_CALLBACK (gpm_stats_device_removed_cb), NULL); ++#if UP_CHECK_VERSION(0, 99, 0) ++ g_signal_connect (client, "notify", G_CALLBACK (gpm_stats_device_changed_cb), NULL); ++#else + g_signal_connect (client, "device-changed", G_CALLBACK (gpm_stats_device_changed_cb), NULL); ++#endif + + /* set current device */ + if (devices->len > 0) { +@@ -1854,8 +1866,9 @@ main (int argc, char *argv[]) + gtk_widget_show (widget); + + gtk_main (); +- ++#if !UP_CHECK_VERSION(0, 99, 0) + out: ++#endif + g_object_unref (settings); + g_object_unref (client); + g_object_unref (wakeups); diff --git a/community/mate-power-manager/20-improve-upower-1.0-support.diff b/community/mate-power-manager/20-improve-upower-1.0-support.diff new file mode 100644 index 000000000..bba10cd8f --- /dev/null +++ b/community/mate-power-manager/20-improve-upower-1.0-support.diff @@ -0,0 +1,101 @@ +diff --git a/src/gpm-engine.c b/src/gpm-engine.c +index e6c6bf2..fe458e3 100644 +--- a/src/gpm-engine.c ++++ b/src/gpm-engine.c +@@ -82,6 +82,9 @@ G_DEFINE_TYPE (GpmEngine, gpm_engine, G_TYPE_OBJECT) + + static UpDevice *gpm_engine_get_composite_device (GpmEngine *engine, UpDevice *original_device); + static UpDevice *gpm_engine_update_composite_device (GpmEngine *engine, UpDevice *original_device); ++#if UP_CHECK_VERSION (0, 99, 0) ++static void gpm_engine_device_changed_cb (UpDevice *device, GParamSpec *pspec, GpmEngine *engine); ++#endif + + typedef enum { + GPM_ENGINE_WARNING_NONE = 0, +@@ -757,6 +760,13 @@ gpm_engine_device_add (GpmEngine *engine, UpDevice *device) + g_object_get (composite, "state", &state, NULL); + g_object_set_data (G_OBJECT(composite), "engine-state-old", GUINT_TO_POINTER(state)); + } ++ ++#if UP_CHECK_VERSION (0, 99, 0) ++ if (kind == UP_DEVICE_KIND_BATTERY || kind == UP_DEVICE_KIND_UPS || kind == UP_DEVICE_KIND_LINE_POWER) ++ return; ++ g_signal_connect (device, "notify", G_CALLBACK (gpm_engine_device_changed_cb), engine); ++#endif ++ + } + + /** +@@ -851,19 +861,20 @@ gpm_engine_device_removed_cb (UpClient *client, UpDevice *device, GpmEngine *eng + **/ + static void + #if UP_CHECK_VERSION(0, 99, 0) +-gpm_engine_device_changed_cb (UpClient *client, GParamSpec *pspec, GpmEngine *engine) +-{ +- gpm_engine_recalculate_state (engine); +-} ++gpm_engine_device_changed_cb (UpDevice *device, GParamSpec *pspec, GpmEngine *engine) + #else + gpm_engine_device_changed_cb (UpClient *client, UpDevice *device, GpmEngine *engine) ++#endif + { ++#if !UP_CHECK_VERSION(0, 99, 0) + UpDeviceKind kind; ++#endif + UpDeviceState state; + UpDeviceState state_old; + GpmEngineWarning warning_old; + GpmEngineWarning warning; + ++#if !UP_CHECK_VERSION(0, 99, 0) + /* get device properties */ + g_object_get (device, + "kind", &kind, +@@ -874,6 +885,7 @@ gpm_engine_device_changed_cb (UpClient *client, UpDevice *device, GpmEngine *eng + egg_debug ("updating because %s changed", up_device_get_object_path (device)); + device = gpm_engine_update_composite_device (engine, device); + } ++#endif + + /* get device properties (may be composite) */ + g_object_get (device, +@@ -917,7 +929,6 @@ gpm_engine_device_changed_cb (UpClient *client, UpDevice *device, GpmEngine *eng + + gpm_engine_recalculate_state (engine); + } +-#endif + + /** + * gpm_engine_get_devices: +@@ -1042,10 +1053,7 @@ gpm_engine_init (GpmEngine *engine) + G_CALLBACK (gpm_engine_device_added_cb), engine); + g_signal_connect (engine->priv->client, "device-removed", + G_CALLBACK (gpm_engine_device_removed_cb), engine); +-#if UP_CHECK_VERSION(0, 99, 0) +- g_signal_connect (engine->priv->client, "notify", +- G_CALLBACK (gpm_engine_device_changed_cb), engine); +-#else ++#if !UP_CHECK_VERSION(0, 99, 0) + g_signal_connect (engine->priv->client, "device-changed", + G_CALLBACK (gpm_engine_device_changed_cb), engine); + #endif +@@ -1075,6 +1083,11 @@ gpm_engine_init (GpmEngine *engine) + #endif + + /* create a fake virtual composite battery */ ++#if UP_CHECK_VERSION(0, 99, 0) ++ engine->priv->battery_composite = up_client_get_display_device (engine->priv->client); ++ g_signal_connect (engine->priv->client, "notify", ++ G_CALLBACK (gpm_engine_device_changed_cb), engine); ++#else + engine->priv->battery_composite = up_device_new (); + g_object_set (engine->priv->battery_composite, + "kind", UP_DEVICE_KIND_BATTERY, +@@ -1083,6 +1096,7 @@ gpm_engine_init (GpmEngine *engine) + "power-supply", TRUE, + "is-present", TRUE, + NULL); ++#endif + + engine->priv->previous_icon = NULL; + engine->priv->previous_summary = NULL; diff --git a/community/mate-power-manager/30-more-upower-0.99-api-changes.diff b/community/mate-power-manager/30-more-upower-0.99-api-changes.diff new file mode 100644 index 000000000..be3f5e5b2 --- /dev/null +++ b/community/mate-power-manager/30-more-upower-0.99-api-changes.diff @@ -0,0 +1,216 @@ +diff --git a/src/gpm-engine.c b/src/gpm-engine.c +index fe458e3..56d19e2 100644 +--- a/src/gpm-engine.c ++++ b/src/gpm-engine.c +@@ -84,7 +84,29 @@ static UpDevice *gpm_engine_get_composite_device (GpmEngine *engine, UpDevice *o + static UpDevice *gpm_engine_update_composite_device (GpmEngine *engine, UpDevice *original_device); + #if UP_CHECK_VERSION (0, 99, 0) + static void gpm_engine_device_changed_cb (UpDevice *device, GParamSpec *pspec, GpmEngine *engine); +-#endif ++ ++#define GPM_ENGINE_WARNING_NONE UP_DEVICE_LEVEL_NONE ++#define GPM_ENGINE_WARNING_DISCHARGING UP_DEVICE_LEVEL_DISCHARGING ++#define GPM_ENGINE_WARNING_LOW UP_DEVICE_LEVEL_LOW ++#define GPM_ENGINE_WARNING_CRITICAL UP_DEVICE_LEVEL_CRITICAL ++#define GPM_ENGINE_WARNING_ACTION UP_DEVICE_LEVEL_ACTION ++ ++/** ++ * gpm_engine_get_warning: ++ * ++ * This gets the possible engine state for the device according to the ++ * policy, which could be per-percent, or per-time. ++ * ++ * Return value: A GpmEngine state, e.g. GPM_ENGINE_WARNING_DISCHARGING ++ **/ ++static UpDeviceLevel ++gpm_engine_get_warning (GpmEngine *engine, UpDevice *device) ++{ ++ UpDeviceLevel warning; ++ g_object_get (device, "warning-level", &warning, NULL); ++ return warning; ++} ++#else + + typedef enum { + GPM_ENGINE_WARNING_NONE = 0, +@@ -226,6 +248,7 @@ gpm_engine_get_warning (GpmEngine *engine, UpDevice *device) + out: + return warning_type; + } ++#endif + + /** + * gpm_engine_get_summary: +@@ -282,12 +305,20 @@ gpm_engine_get_summary (GpmEngine *engine) + * Returns the icon + **/ + static gchar * ++#if UP_CHECK_VERSION (0, 99, 0) ++gpm_engine_get_icon_priv (GpmEngine *engine, UpDeviceKind device_kind, UpDeviceLevel warning, gboolean use_state) ++#else + gpm_engine_get_icon_priv (GpmEngine *engine, UpDeviceKind device_kind, GpmEngineWarning warning, gboolean use_state) ++#endif + { + guint i; + GPtrArray *array; + UpDevice *device; ++#if UP_CHECK_VERSION (0, 99, 0) ++ UpDeviceLevel warning_temp; ++#else + GpmEngineWarning warning_temp; ++#endif + UpDeviceKind kind; + UpDeviceState state; + gboolean is_present; +@@ -572,6 +603,9 @@ gpm_engine_device_check_capacity (GpmEngine *engine, UpDevice *device) + static UpDevice * + gpm_engine_get_composite_device (GpmEngine *engine, UpDevice *original_device) + { ++#if UP_CHECK_VERSION (0, 99, 0) ++ return engine->priv->battery_composite; ++#else + guint battery_devices = 0; + GPtrArray *array; + UpDevice *device; +@@ -601,6 +635,7 @@ gpm_engine_get_composite_device (GpmEngine *engine, UpDevice *original_device) + out: + /* return composite device or original device */ + return device; ++#endif + } + + /** +@@ -609,6 +644,18 @@ gpm_engine_get_composite_device (GpmEngine *engine, UpDevice *original_device) + static UpDevice * + gpm_engine_update_composite_device (GpmEngine *engine, UpDevice *original_device) + { ++#if UP_CHECK_VERSION (0, 99, 0) ++ gchar *text; ++ ++ text = up_device_to_text (engine->priv->battery_composite); ++ egg_debug ("composite:\n%s", text); ++ g_free (text); ++ ++ /* force update of icon */ ++ gpm_engine_recalculate_state_icon (engine); ++ ++ return engine->priv->battery_composite; ++#else + guint i; + gdouble percentage = 0.0; + gdouble energy = 0.0; +@@ -720,6 +767,7 @@ gpm_engine_update_composite_device (GpmEngine *engine, UpDevice *original_device + out: + /* return composite device or original device */ + return device; ++#endif + } + + /** +@@ -728,7 +776,11 @@ gpm_engine_update_composite_device (GpmEngine *engine, UpDevice *original_device + static void + gpm_engine_device_add (GpmEngine *engine, UpDevice *device) + { ++#if UP_CHECK_VERSION (0, 99, 0) ++ UpDeviceLevel warning; ++#else + GpmEngineWarning warning; ++#endif + UpDeviceState state; + UpDeviceKind kind; + UpDevice *composite; +@@ -762,9 +814,9 @@ gpm_engine_device_add (GpmEngine *engine, UpDevice *device) + } + + #if UP_CHECK_VERSION (0, 99, 0) +- if (kind == UP_DEVICE_KIND_BATTERY || kind == UP_DEVICE_KIND_UPS || kind == UP_DEVICE_KIND_LINE_POWER) +- return; + g_signal_connect (device, "notify", G_CALLBACK (gpm_engine_device_changed_cb), engine); ++ g_ptr_array_add (engine->priv->array, g_object_ref (device)); ++ gpm_engine_recalculate_state (engine); + #endif + + } +@@ -820,10 +872,14 @@ gpm_engine_coldplug_idle_cb (GpmEngine *engine) + static void + gpm_engine_device_added_cb (UpClient *client, UpDevice *device, GpmEngine *engine) + { ++#if UP_CHECK_VERSION (0, 99, 0) ++ gpm_engine_device_add (engine, device); ++#else + /* add to list */ + g_ptr_array_add (engine->priv->array, g_object_ref (device)); + + gpm_engine_recalculate_state (engine); ++#endif + } + + /** +@@ -866,15 +922,17 @@ gpm_engine_device_changed_cb (UpDevice *device, GParamSpec *pspec, GpmEngine *en + gpm_engine_device_changed_cb (UpClient *client, UpDevice *device, GpmEngine *engine) + #endif + { +-#if !UP_CHECK_VERSION(0, 99, 0) + UpDeviceKind kind; +-#endif + UpDeviceState state; + UpDeviceState state_old; ++#if UP_CHECK_VERSION(0, 99, 0) ++ UpDeviceLevel warning_old; ++ UpDeviceLevel warning; ++#else + GpmEngineWarning warning_old; + GpmEngineWarning warning; ++#endif + +-#if !UP_CHECK_VERSION(0, 99, 0) + /* get device properties */ + g_object_get (device, + "kind", &kind, +@@ -885,7 +943,6 @@ gpm_engine_device_changed_cb (UpClient *client, UpDevice *device, GpmEngine *eng + egg_debug ("updating because %s changed", up_device_get_object_path (device)); + device = gpm_engine_update_composite_device (engine, device); + } +-#endif + + /* get device properties (may be composite) */ + g_object_get (device, +@@ -1070,22 +1127,10 @@ gpm_engine_init (GpmEngine *engine) + g_signal_connect (engine->priv->phone, "device-refresh", + G_CALLBACK (phone_device_refresh_cb), engine); + +-#if UP_CHECK_VERSION(0, 99, 0) +- /* coldplug */ +- array = up_client_get_devices(engine->priv->client); +- if (array) { +- for (i = 0; i < array->len; i++) { +- UpDevice *device = g_ptr_array_index (array, i); +- gpm_engine_device_added_cb(engine->priv->client, device, engine); +- } +- g_ptr_array_free (array, TRUE); +- } +-#endif +- + /* create a fake virtual composite battery */ + #if UP_CHECK_VERSION(0, 99, 0) + engine->priv->battery_composite = up_client_get_display_device (engine->priv->client); +- g_signal_connect (engine->priv->client, "notify", ++ g_signal_connect (engine->priv->battery_composite, "notify", + G_CALLBACK (gpm_engine_device_changed_cb), engine); + #else + engine->priv->battery_composite = up_device_new (); +diff --git a/src/gpm-manager.c b/src/gpm-manager.c +index df84cac..09bd0c0 100644 +--- a/src/gpm-manager.c ++++ b/src/gpm-manager.c +@@ -1858,7 +1858,9 @@ gpm_manager_init (GpmManager *manager) + G_CALLBACK (gpm_manager_settings_changed_cb), manager); + manager->priv->client = up_client_new (); + #if UP_CHECK_VERSION(0, 99, 0) +- g_signal_connect (manager->priv->client, "notify", ++ g_signal_connect (manager->priv->client, "notify::lid-is-closed", ++ G_CALLBACK (gpm_manager_client_changed_cb), manager); ++ g_signal_connect (manager->priv->client, "notify::on-battery", + G_CALLBACK (gpm_manager_client_changed_cb), manager); + #else + g_signal_connect (manager->priv->client, "changed", diff --git a/community/mate-power-manager/PKGBUILD b/community/mate-power-manager/PKGBUILD index 491f698a8..35a6eff6a 100644 --- a/community/mate-power-manager/PKGBUILD +++ b/community/mate-power-manager/PKGBUILD @@ -2,40 +2,38 @@ pkgname=mate-power-manager pkgver=1.8.0 -pkgrel=3 -pkgdesc="Session daemon that makes it easy to manage your laptop or desktop system for Mate Desktop" +pkgrel=4 +pkgdesc="Power management tool for the MATE desktop." url="http://mate-desktop.org" arch=('i686' 'x86_64') license=('GPL') depends=('dbus-glib' 'dconf' 'libcanberra' 'libgnome-keyring' 'libnotify' 'libunique' 'mate-panel' 'upower') -makedepends=('docbook2x' 'docbook-xml' 'mate-common' 'perl-xml-parser' - 'xmlto' 'yelp-tools') +makedepends=('docbook2x' 'docbook-xml' 'mate-common' 'xmlto' 'yelp-tools') optdepends=('yelp: for reading MATE help documents') groups=('mate-extra') source=("http://pub.mate-desktop.org/releases/1.8/${pkgname}-${pkgver}.tar.xz" - "https://github.com/mate-desktop/mate-power-manager/commit/8cb168b752f4130e88daefa400bb9bf07cf18227.diff" - "https://github.com/seife/mate-power-manager/commit/2b3cf01f84204dd5d8204d519e2167b41cda6bc0.diff" - "https://github.com/seife/mate-power-manager/commit/220a4e0a64aca0579f50e6e57d4eca848b3ac57f.diff" - "https://github.com/seife/mate-power-manager/commit/d59f4b8bd38e1628af3a992ae8e96b8e069ab738.diff") + "00-add-dbus-interface-to-kbdbacklight.diff" + "10-upower-0.99.diff" + "20-improve-upower-1.0-support.diff" + "30-more-upower-0.99-api-changes.diff") sha1sums=('5cde22f2d6498294a76e3bf9005b4f73bbdd0db8' 'f1acff9fa6140c56cdb39531fc02e886f5a7437d' - '8c8d724ac99604aad6eabaddd5012a997dbadc90' - '884af06e9344954b4237263cd910acb2f34ff443' - 'd2950548f353b71ffa8ea6680af6d211a72a5670') + '210d0558d4d6eab23c5d55073f891610bd79225b' + '15116bb83763c0b1a82d0aae870ed204fb4f418c' + 'dd8fdd1f17ad1be4b8ae5562d6ed856c1d3fe2e6') install=${pkgname}.install prepare() { cd "${srcdir}/${pkgname}-${pkgver}" #Work around a problem where the .sgml fail to parse. sed -e 's:@HAVE_DOCBOOK2MAN_TRUE@.*::' -i man/Makefile.in - # [PATCH] RHBZ #964678 : Patch that provides DBUS interface to control - # - https://github.com/mate-desktop/mate-power-manager/pull/60 - patch -Np1 -i "${srcdir}/8cb168b752f4130e88daefa400bb9bf07cf18227.diff" - # Add upower 0.99 support - patch -Np1 -i "${srcdir}/2b3cf01f84204dd5d8204d519e2167b41cda6bc0.diff" - patch -Np1 -i "${srcdir}/220a4e0a64aca0579f50e6e57d4eca848b3ac57f.diff" - patch -Np1 -i "${srcdir}/d59f4b8bd38e1628af3a992ae8e96b8e069ab738.diff" + + # Add upower 0.99 compatibility + patch -Np1 -i "${srcdir}/00-add-dbus-interface-to-kbdbacklight.diff" + patch -Np1 -i "${srcdir}/10-upower-0.99.diff" + patch -Np1 -i "${srcdir}/20-improve-upower-1.0-support.diff" + patch -Np1 -i "${srcdir}/30-more-upower-0.99-api-changes.diff" } build() { diff --git a/community/rethinkdb/PKGBUILD b/community/rethinkdb/PKGBUILD index 8344f836a..e49bc0ccb 100644 --- a/community/rethinkdb/PKGBUILD +++ b/community/rethinkdb/PKGBUILD @@ -1,10 +1,10 @@ -# $Id: PKGBUILD 110011 2014-04-23 03:13:26Z anatolik $ +# $Id: PKGBUILD 110146 2014-04-25 00:56:57Z anatolik $ # Maintainer: Anatol Pomozov <anatol.pomozov@gmail.com> # Contributor: Massimiliano Torromeo <massimiliano.torromeo@gmail.com> # Contributor: Sigmund Lahn <sigmund@lahn.no> pkgname=rethinkdb -pkgver=1.12.3 +pkgver=1.12.4 pkgrel=1 pkgdesc='An open-source distributed database built with love.' arch=(i686 x86_64) @@ -20,7 +20,7 @@ source=( rethinkdb-tmpfile.conf rethinkdb.service ) -sha256sums=('545319fedf65fce26fa83d46bf3a7884ed6b8b085bc712314c458b387c6058d5' +sha256sums=('2e1253403c75e643feb614d80927018844546aa894b908058b26005ddfda02b7' '656d3a42e75d087e723f71aa320fdd91cbbb82071ef72eb11fd3e4a619b429a4' 'e56bffa2b9ebc3a00ef566ab2be0719a633c89d961a2461dfa2d9ffdb258c1a2') diff --git a/community/sxiv/PKGBUILD b/community/sxiv/PKGBUILD index e7ab28b45..dbe4d6937 100644 --- a/community/sxiv/PKGBUILD +++ b/community/sxiv/PKGBUILD @@ -1,30 +1,23 @@ -# $Id: PKGBUILD 106175 2014-02-24 18:03:28Z bpiotrowski $ +# $Id: PKGBUILD 110167 2014-04-25 15:45:41Z bpiotrowski $ # Maintainer: Bartłomiej Piotrowski <bpiotrowski@archlinux.org> # Contributor: Thomas Dziedzic < gostrc at gmail > # Contributor: Bert Muennich <muennich at informatik.hu-berlin.de> # Contributor: Brad Fanella <bradfanella@archlinux.us> pkgname=sxiv -pkgver=1.1.1 -pkgrel=3 +pkgver=1.2 +pkgrel=1 pkgdesc='Simple X Image Viewer' arch=('i686' 'x86_64') license=('GPL2') install=sxiv.install url='https://github.com/muennich/sxiv' -depends=('libx11' 'xproto' 'imlib2' 'giflib' 'desktop-file-utils') -source=(https://github.com/muennich/sxiv/archive/v$pkgver.tar.gz - config.h) -md5sums=('786f647326bdb24b672519924928dfca' - '53729e7dfba3c12b26fc8359d56523a2') - -prepare() { - cp config.h sxiv-$pkgver -} +depends=('imlib2' 'desktop-file-utils') +source=(https://github.com/muennich/sxiv/archive/v$pkgver.tar.gz) +md5sums=('9b79d3c70693d9abbc66295cf6f281a0') build() { - cd sxiv-$pkgver - make + make -C sxiv-$pkgver } package() { diff --git a/community/sxiv/config.h b/community/sxiv/config.h deleted file mode 100644 index cd89b5fac..000000000 --- a/community/sxiv/config.h +++ /dev/null @@ -1,154 +0,0 @@ -#ifdef _WINDOW_CONFIG - -/* default window dimensions (overwritten via -g option): */ -enum { - WIN_WIDTH = 800, - WIN_HEIGHT = 600 -}; - -/* bar font: - * (see X(7) section "FONT NAMES" for valid values) - */ -static const char * const BAR_FONT = "-*-fixed-medium-r-*-*-13-*-*-*-*-60-*-*"; - -/* colors: - * (see X(7) section "COLOR NAMES" for valid values) - */ -static const char * const WIN_BG_COLOR = "#777777"; -static const char * const WIN_FS_COLOR = "#000000"; -static const char * const SEL_COLOR = "#DDDDDD"; -static const char * const BAR_BG_COLOR = "#222222"; -static const char * const BAR_FG_COLOR = "#EEEEEE"; - -#endif -#ifdef _IMAGE_CONFIG - -/* how should images be scaled when they are loaded? - * (also controllable via -d/-s/-Z/-z options) - * SCALE_DOWN: 100%, but fit large images into window, - * SCALE_FIT: fit all images into window, - * SCALE_ZOOM: use current zoom level, 100% at startup - */ -static const scalemode_t SCALE_MODE = SCALE_DOWN; - -/* levels (in percent) to use when zooming via '-' and '+': - * (first/last value is used as min/max zoom level) - */ -static const float zoom_levels[] = { - 12.5, 25.0, 50.0, 75.0, - 100.0, 150.0, 200.0, 400.0, 800.0 -}; - -/* default settings for multi-frame gif images: */ -enum { - GIF_DELAY = 100, /* delay time (in ms) */ - GIF_AUTOPLAY = 1, /* autoplay when loaded [0/1] */ - GIF_LOOP = 0 /* endless loop [0/1] */ -}; - -#endif -#ifdef _THUMBS_CONFIG - -/* default dimension of thumbnails (width == height): */ -enum { THUMB_SIZE = 60 }; - -#endif -#ifdef _MAPPINGS_CONFIG - -/* keyboard mappings for image and thumbnail mode: */ -static const keymap_t keys[] = { - /* ctrl key function argument */ - { false, XK_q, it_quit, (arg_t) None }, - { false, XK_Return, it_switch_mode, (arg_t) None }, - { false, XK_f, it_toggle_fullscreen, (arg_t) None }, - { false, XK_b, it_toggle_bar, (arg_t) None }, - - { false, XK_r, it_reload_image, (arg_t) None }, - { false, XK_R, t_reload_all, (arg_t) None }, - { false, XK_D, it_remove_image, (arg_t) None }, - - { false, XK_n, i_navigate, (arg_t) +1 }, - { false, XK_space, i_navigate, (arg_t) +1 }, - { false, XK_p, i_navigate, (arg_t) -1 }, - { false, XK_BackSpace, i_navigate, (arg_t) -1 }, - { false, XK_bracketright, i_navigate, (arg_t) +10 }, - { false, XK_bracketleft, i_navigate, (arg_t) -10 }, - { true, XK_6, i_alternate, (arg_t) None }, - { false, XK_g, it_first, (arg_t) None }, - { false, XK_G, it_n_or_last, (arg_t) None }, - - { true, XK_n, i_navigate_frame, (arg_t) +1 }, - { true, XK_p, i_navigate_frame, (arg_t) -1 }, - { true, XK_space, i_toggle_animation, (arg_t) None }, - - { false, XK_h, it_scroll_move, (arg_t) DIR_LEFT }, - { false, XK_Left, it_scroll_move, (arg_t) DIR_LEFT }, - { false, XK_j, it_scroll_move, (arg_t) DIR_DOWN }, - { false, XK_Down, it_scroll_move, (arg_t) DIR_DOWN }, - { false, XK_k, it_scroll_move, (arg_t) DIR_UP }, - { false, XK_Up, it_scroll_move, (arg_t) DIR_UP }, - { false, XK_l, it_scroll_move, (arg_t) DIR_RIGHT }, - { false, XK_Right, it_scroll_move, (arg_t) DIR_RIGHT }, - - { true, XK_h, it_scroll_screen, (arg_t) DIR_LEFT }, - { true, XK_Left, it_scroll_screen, (arg_t) DIR_LEFT }, - { true, XK_j, it_scroll_screen, (arg_t) DIR_DOWN }, - { true, XK_Down, it_scroll_screen, (arg_t) DIR_DOWN }, - { true, XK_k, it_scroll_screen, (arg_t) DIR_UP }, - { true, XK_Up, it_scroll_screen, (arg_t) DIR_UP }, - { true, XK_l, it_scroll_screen, (arg_t) DIR_RIGHT }, - { true, XK_Right, it_scroll_screen, (arg_t) DIR_RIGHT }, - - { false, XK_H, i_scroll_to_edge, (arg_t) DIR_LEFT }, - { false, XK_J, i_scroll_to_edge, (arg_t) DIR_DOWN }, - { false, XK_K, i_scroll_to_edge, (arg_t) DIR_UP }, - { false, XK_L, i_scroll_to_edge, (arg_t) DIR_RIGHT }, - - { false, XK_plus, i_zoom, (arg_t) +1 }, - { false, XK_KP_Add, i_zoom, (arg_t) +1 }, - { false, XK_minus, i_zoom, (arg_t) -1 }, - { false, XK_KP_Subtract, i_zoom, (arg_t) -1 }, - { false, XK_equal, i_set_zoom, (arg_t) 100 }, - { false, XK_w, i_fit_to_win, (arg_t) SCALE_FIT }, - { false, XK_e, i_fit_to_win, (arg_t) SCALE_WIDTH }, - { false, XK_E, i_fit_to_win, (arg_t) SCALE_HEIGHT }, - { false, XK_W, i_fit_to_img, (arg_t) None }, - - { false, XK_less, i_rotate, (arg_t) DIR_LEFT }, - { false, XK_greater, i_rotate, (arg_t) DIR_RIGHT }, - - { false, XK_backslash, i_flip, (arg_t) FLIP_HORIZONTAL }, - { false, XK_bar, i_flip, (arg_t) FLIP_VERTICAL }, - - { false, XK_a, i_toggle_antialias, (arg_t) None }, - { false, XK_A, it_toggle_alpha, (arg_t) None }, - - /* open current image with given program: */ - { true, XK_g, it_open_with, (arg_t) "gimp" }, - - /* run shell command line on current file ("$SXIV_IMG"): */ - { true, XK_less, it_shell_cmd, (arg_t) \ - "mogrify -rotate -90 \"$SXIV_IMG\"" }, - { true, XK_greater, it_shell_cmd, (arg_t) \ - "mogrify -rotate +90 \"$SXIV_IMG\"" }, - { true, XK_comma, it_shell_cmd, (arg_t) \ - "jpegtran -rotate 270 -copy all -outfile \"$SXIV_IMG\" \"$SXIV_IMG\"" }, - { true, XK_period, it_shell_cmd, (arg_t) \ - "jpegtran -rotate 90 -copy all -outfile \"$SXIV_IMG\" \"$SXIV_IMG\"" }, -}; - -/* mouse button mappings for image mode: */ -static const button_t buttons[] = { - /* ctrl shift button function argument */ - { false, false, Button1, i_navigate, (arg_t) +1 }, - { false, false, Button3, i_navigate, (arg_t) -1 }, - { false, false, Button2, i_drag, (arg_t) None }, - { false, false, Button4, it_scroll_move, (arg_t) DIR_UP }, - { false, false, Button5, it_scroll_move, (arg_t) DIR_DOWN }, - { false, true, Button4, it_scroll_move, (arg_t) DIR_LEFT }, - { false, true, Button5, it_scroll_move, (arg_t) DIR_RIGHT }, - { true, false, Button4, i_zoom, (arg_t) +1 }, - { true, false, Button5, i_zoom, (arg_t) -1 }, -}; - -#endif diff --git a/community/sxiv/sxiv.install b/community/sxiv/sxiv.install index 1e3ec7774..916de2271 100644 --- a/community/sxiv/sxiv.install +++ b/community/sxiv/sxiv.install @@ -1,10 +1,5 @@ post_install () { update-desktop-database -q - - echo "* Edit config.h in sxiv's PKGBUILD directory (generally /var/abs/community/sxiv/)" - echo " and rebuild package if you want to change settings." - echo "* Create the directory ~/.sxiv/cache to enable thumbnail caching." - echo " See sxiv(1) for more information." } post_upgrade () { diff --git a/extra/htop/PKGBUILD b/extra/htop/PKGBUILD index 509980f30..28d4eab0a 100644 --- a/extra/htop/PKGBUILD +++ b/extra/htop/PKGBUILD @@ -1,11 +1,11 @@ -# $Id: PKGBUILD 173197 2012-12-12 17:29:21Z heftig $ +# $Id: PKGBUILD 211746 2014-04-25 13:42:30Z dreisner $ # Maintainer: Angel Velasquez <angvp@archlinux.org> # Contributor: Eric Belanger <eric@archlinux.org> # Contributor: Daniel J Griffiths <ghost1227@archlinux.us> pkgname=htop -pkgver=1.0.2 -pkgrel=2 +pkgver=1.0.3 +pkgrel=1 pkgdesc="Interactive process viewer" arch=('i686' 'x86_64') url="http://htop.sourceforge.net/" @@ -15,20 +15,18 @@ makedepends=('python2') optdepends=('lsof: show files opened by a process' 'strace: attach to a running process') options=('!emptydirs') -source=("http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz" - tree-crash.patch) -md5sums=('0d01cca8df3349c74569cefebbd9919e' - '48eba3c0303bfd19d761b859bc69d713') +source=("http://hisham.hm/$pkgname/releases/$pkgver/$pkgname-$pkgver.tar.gz") +md5sums=('e768b9b55c033d9c1dffda72db3a6ac7') -build() { +prepare() { cd "$pkgname-$pkgver" sed -i 's|ncursesw/curses.h|curses.h|' RichString.[ch] configure sed -i 's|python|python2|' scripts/MakeHeader.py +} - # Boost field buffer size - crashes when trying to draw very deep UTF-8 trees - # Test by nesting 30 shells - patch -N -i ../tree-crash.patch +build() { + cd "$pkgname-$pkgver" ./configure \ --prefix=/usr \ diff --git a/extra/htop/tree-crash.patch b/extra/htop/tree-crash.patch deleted file mode 100644 index b949e262d..000000000 --- a/extra/htop/tree-crash.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: Process.c -=================================================================== ---- Process.c (revision 302) -+++ Process.c (working copy) -@@ -371,7 +371,7 @@ - } - - static void Process_writeField(Process* this, RichString* str, ProcessField field) { -- char buffer[128]; buffer[127] = '\0'; -+ char buffer[256]; buffer[255] = '\0'; - int attr = CRT_colors[DEFAULT_COLOR]; - int baseattr = CRT_colors[PROCESS_BASENAME]; - int n = sizeof(buffer) - 1; diff --git a/extra/konversation/PKGBUILD b/extra/konversation/PKGBUILD index 0bffe4ab7..fa8616e2c 100644 --- a/extra/konversation/PKGBUILD +++ b/extra/konversation/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 204555 2014-01-22 15:33:40Z tomegun $ +# $Id: PKGBUILD 211744 2014-04-25 12:16:34Z andrea $ # Maintainer: Tom Gundersen <teg@jklm.no> # Contributor: Stéphane Gaudreault <stephane@archlinux.org> # Contributor: Andrea Scarpino <andrea@archlinux.org> @@ -7,7 +7,7 @@ pkgname=konversation pkgver=1.5 -pkgrel=1 +pkgrel=2 pkgdesc="A user friendly IRC client for KDE" arch=('i686' 'x86_64') url="http://konversation.kde.org" @@ -18,14 +18,19 @@ optdepends=('python: python scripting support' 'qca-ossl: Diffie-Hellman key exchange and Blowfish ECB/CBC support') license=('GPL2' 'FDL') install=${pkgname}.install -options=('!makeflags') -source=("http://download.kde.org/download.php?url=stable/${pkgname}/${pkgver}/src/${pkgname}-${pkgver}.tar.xz") -sha1sums=('3955a43758750b63d84299a9d9a5933b73e5492b') +source=("http://download.kde.org/download.php?url=stable/${pkgname}/${pkgver}/src/${pkgname}-${pkgver}.tar.xz" + 'use-qdbus-qt4.patch') +sha1sums=('3955a43758750b63d84299a9d9a5933b73e5492b' + 'a21aed6079de7693e67abe13798807920de01f6a') +prepare() { + mkdir build + + cd ${pkgname}-${pkgver} + patch -p1 -i "${srcdir}"/use-qdbus-qt4.patch +} build() { - cd "${srcdir}" - mkdir build cd build cmake ../${pkgname}-${pkgver} \ -DCMAKE_BUILD_TYPE=Release \ @@ -35,7 +40,7 @@ build() { } package() { - cd "${srcdir}"/build + cd build make DESTDIR="${pkgdir}" install # Remove a bunch of symlinks pointing to non-existant files diff --git a/extra/konversation/use-qdbus-qt4.patch b/extra/konversation/use-qdbus-qt4.patch new file mode 100644 index 000000000..800ab839b --- /dev/null +++ b/extra/konversation/use-qdbus-qt4.patch @@ -0,0 +1,174 @@ +--- konversation-1.5/data/scripts/sayclip~ 2014-04-24 14:41:03.332179998 +0000 ++++ konversation-1.5/data/scripts/sayclip 2014-04-24 14:41:24.752057066 +0000 +@@ -35,7 +35,7 @@ + sys.exit("This script is intended to be run from within Konversation.") + + try: +- clipboard = subprocess.check_output(('qdbus', 'org.kde.klipper', '/klipper', 'getClipboardContents')) ++ clipboard = subprocess.check_output(('qdbus-qt4', 'org.kde.klipper', '/klipper', 'getClipboardContents')) + except subprocess.CalledProcessError: + konversation.dbus.error(i18n("Unable to retrieve clipboard contents from Klipper."), exit=True) + +--- konversation-1.5/data/scripts/uptime~ 2014-04-24 14:41:33.182008693 +0000 ++++ konversation-1.5/data/scripts/uptime 2014-04-24 14:42:06.111819793 +0000 +@@ -19,7 +19,7 @@ + } else { + $UPTIME = `cat /proc/uptime`; + if (not $UPTIME) { +- exec 'qdbus', 'org.kde.konversation', '/irc', 'info', 'Could not read uptime. Check that /proc/uptime exists.'; ++ exec 'qdbus-qt4', 'org.kde.konversation', '/irc', 'info', 'Could not read uptime. Check that /proc/uptime exists.'; + } + @uparray = split(/\./, $UPTIME); + $seconds = $uparray[0]; +@@ -40,15 +40,15 @@ + $minutes = int($seconds/60); + } + if( $days && $hours ) { +- exec 'qdbus', 'org.kde.konversation', '/irc', 'say', $SERVER, $TARGET, "Uptime: $days days, $hours hours and $minutes minutes"; ++ exec 'qdbus-qt4', 'org.kde.konversation', '/irc', 'say', $SERVER, $TARGET, "Uptime: $days days, $hours hours and $minutes minutes"; + } + elsif( !$days && $hours ) { +- exec 'qdbus', 'org.kde.konversation', '/irc', 'say', $SERVER, $TARGET, "Uptime: $hours hours and $minutes minutes"; ++ exec 'qdbus-qt4', 'org.kde.konversation', '/irc', 'say', $SERVER, $TARGET, "Uptime: $hours hours and $minutes minutes"; + } + elsif( $days && !$hours ) { +- exec 'qdbus', 'org.kde.konversation', '/irc', 'say', $SERVER, $TARGET, "Uptime: $days days and $minutes minutes"; ++ exec 'qdbus-qt4', 'org.kde.konversation', '/irc', 'say', $SERVER, $TARGET, "Uptime: $days days and $minutes minutes"; + } + elsif( !$days && !$hours ) { +- exec 'qdbus', 'org.kde.konversation', '/irc', 'say', $SERVER, $TARGET, "Uptime: $minutes minutes"; ++ exec 'qdbus-qt4', 'org.kde.konversation', '/irc', 'say', $SERVER, $TARGET, "Uptime: $minutes minutes"; + } + +--- konversation-1.5/data/scripts/mail~ 2014-04-24 14:42:12.458450062 +0000 ++++ konversation-1.5/data/scripts/mail 2014-04-24 14:43:15.954752752 +0000 +@@ -18,18 +18,18 @@ + getmails() + { + +- qdbus org.kde.kmail > /dev/null || { +- qdbus org.kde.konversation /irc info "Sorry kmail is not running" ++ qdbus-qt4 org.kde.kmail > /dev/null || { ++ qdbus-qt4 org.kde.konversation /irc info "Sorry kmail is not running" + exit + } + +- for f in $(qdbus org.kde.kmail /KMail folderList) ; do +- qdbus org.kde.kmail /KMail getFolder $f > /dev/null +- MAILFOLDER=$(qdbus org.kde.kmail /Folder "displayPath" | grep -i $FOLDER) ++ for f in $(qdbus-qt4 org.kde.kmail /KMail folderList) ; do ++ qdbus-qt4 org.kde.kmail /KMail getFolder $f > /dev/null ++ MAILFOLDER=$(qdbus-qt4 org.kde.kmail /Folder "displayPath" | grep -i $FOLDER) + if [ "$MAILFOLDER" != "" ] ; then + FOUNDFOLDER=1 +- MAILCOUNT=$(qdbus org.kde.kmail /Folder unreadMessages ) +- MAILTOTALCOUNT=$(qdbus org.kde.kmail /Folder messages ) ++ MAILCOUNT=$(qdbus-qt4 org.kde.kmail /Folder unreadMessages ) ++ MAILTOTALCOUNT=$(qdbus-qt4 org.kde.kmail /Folder messages ) + MAILTOTALCOUNT=$(($MAILCOUNT + $MAILTOTALCOUNT)) + if [[ -z "$MAILCOUNT" ]] ; then MAILCOUNT = "0" ; fi + if [ "$MAILCOUNT" != 0 ] ; then +@@ -41,7 +41,7 @@ + + if [[ -z "$FOUNDEMAIL" ]] ; then + if [[ -z "$FOUNDFOLDER" ]] ; then +- qdbus org.kde.konversation /irc info "No email folders were found that had a name containing '$FOLDER'" ++ qdbus-qt4 org.kde.konversation /irc info "No email folders were found that had a name containing '$FOLDER'" + exit + else + echo "No new emails in any folders matching '$FOLDER'" +@@ -66,5 +66,5 @@ + # exit + #fi + +-getmails | head -n 3 | while read line; do qdbus org.kde.konversation /irc say $SERVER "$TARGET" "$line"; done ++getmails | head -n 3 | while read line; do qdbus-qt4 org.kde.konversation /irc say $SERVER "$TARGET" "$line"; done + +--- konversation-1.5/data/scripts/media~ 2014-04-24 14:43:22.754713792 +0000 ++++ konversation-1.5/data/scripts/media 2014-04-24 14:43:30.764667903 +0000 +@@ -76,7 +76,7 @@ + # 'qdbus' command installed by Qt. If you need to you can change this here, + # but beware that the output format of the alternate command has to match that + # of 'qdbus'. +-dbus_command = 'qdbus' ++dbus_command = 'qdbus-qt4' + + # If one of the title, album or artist metadata fields contains a character + # listed in FIXUP_CHARS, or if a string matching the regular expression given +--- konversation-1.5/data/scripts/fortune~ 2014-04-24 14:43:37.497962666 +0000 ++++ konversation-1.5/data/scripts/fortune 2014-04-24 14:43:45.934581009 +0000 +@@ -49,4 +49,4 @@ + } + } + close(FORTUNES); +-exec 'qdbus', 'org.kde.konversation', '/irc', 'say', $SERVER, $TARGET, $MESSAGE; ++exec 'qdbus-qt4', 'org.kde.konversation', '/irc', 'say', $SERVER, $TARGET, $MESSAGE; +--- konversation-1.5/data/scripts/tinyurl~ 2014-04-24 14:43:50.867886087 +0000 ++++ konversation-1.5/data/scripts/tinyurl 2014-04-24 14:44:22.844369658 +0000 +@@ -15,16 +15,16 @@ + else + TINYURL="$(wget -T10 -t2 -qO- http://tinyurl.com/api-create.php?url=$URL|tail -1)" + fi +-else qdbus org.kde.konversation /irc error "No url given: usage is \"/tinyurl URL [NickName]\"" ++else qdbus-qt4 org.kde.konversation /irc error "No url given: usage is \"/tinyurl URL [NickName]\"" + exit 1 + fi + + if test -z $TINYURL; then +- qdbus org.kde.konversation /irc error "Unable run tinyurl script, please make sure you have curl or wget installed" ++ qdbus-qt4 org.kde.konversation /irc error "Unable run tinyurl script, please make sure you have curl or wget installed" + else + if test ! -z $NICK; then +- qdbus org.kde.konversation /irc say $SERVER "$TARGET" "${NICK}: $TINYURL" ++ qdbus-qt4 org.kde.konversation /irc say $SERVER "$TARGET" "${NICK}: $TINYURL" + else +- qdbus org.kde.konversation /irc say $SERVER "$TARGET" "$TINYURL" ++ qdbus-qt4 org.kde.konversation /irc say $SERVER "$TARGET" "$TINYURL" + fi + fi +--- konversation-1.5/data/scripts/gauge~ 2014-04-24 14:44:32.460981276 +0000 ++++ konversation-1.5/data/scripts/gauge 2014-04-24 14:45:00.634153375 +0000 +@@ -10,23 +10,23 @@ + + if [ ! $TARGET ] + then +- qdbus org.kde.konversation /irc error "Can't write into status view." ++ qdbus-qt4 org.kde.konversation /irc error "Can't write into status view." + else + if [ ! $PERCENTAGE ] + then +- qdbus org.kde.konversation /irc error "USAGE: $0 <percentage>" ++ qdbus-qt4 org.kde.konversation /irc error "USAGE: $0 <percentage>" + else + PERCENTAGE=`echo $PERCENTAGE | sed 's/^0\+//'` + LEFT=$(($PERCENTAGE/5)) + RIGHT=$((20-$LEFT)) + + if [[ $PERCENTAGE -lt 0 ]]; then +- qdbus org.kde.konversation /irc error "Percentage has to be bigger than 0" ++ qdbus-qt4 org.kde.konversation /irc error "Percentage has to be bigger than 0" + exit + fi + + if [[ $PERCENTAGE -gt 100 ]]; then +- qdbus org.kde.konversation /irc error "Percentage has to be smaller than 100" ++ qdbus-qt4 org.kde.konversation /irc error "Percentage has to be smaller than 100" + exit + fi + +@@ -64,6 +64,6 @@ + OUTPUT="$OUTPUT *ding*" + fi + +- qdbus org.kde.konversation /irc say $SERVER "$TARGET" "Beer load $OUTPUT" ++ qdbus-qt4 org.kde.konversation /irc say $SERVER "$TARGET" "Beer load $OUTPUT" + fi + fi +--- konversation-1.5/data/scripting_support/python/konversation/dbus.py~ 2014-04-24 14:48:10.343069193 +0000 ++++ konversation-1.5/data/scripting_support/python/konversation/dbus.py 2014-04-24 14:45:29.863986156 +0000 +@@ -98,4 +98,4 @@ + + default_message_prefix = '' + +-_dbus_command = ('qdbus', 'org.kde.konversation', '/irc') ++_dbus_command = ('qdbus-qt4', 'org.kde.konversation', '/irc') diff --git a/extra/openmpi/PKGBUILD b/extra/openmpi/PKGBUILD index 1742d1ff6..28c3127a5 100644 --- a/extra/openmpi/PKGBUILD +++ b/extra/openmpi/PKGBUILD @@ -1,22 +1,23 @@ -# $Id: PKGBUILD 210083 2014-04-09 17:50:07Z anatolik $ -# Maintainer: Stéphane Gaudreault <stephane@archlinux.org> +# $Id: PKGBUILD 211751 2014-04-25 17:43:28Z anatolik $ +# Maintainer: Anatol Pomozov <anatol dot pomozov at gmail> +# Contributor: Stéphane Gaudreault <stephane@archlinux.org> pkgname=openmpi -pkgver=1.8 +pkgver=1.8.1 pkgrel=1 -pkgdesc="High performance message passing library (MPI)" -arch=('i686' 'x86_64') -url="http://www.open-mpi.org" -license=('custom') -depends=('libltdl' 'hwloc') -makedepends=('inetutils' 'valgrind' 'gcc-fortran') +pkgdesc='High performance message passing library (MPI)' +arch=(i686 x86_64) +url='http://www.open-mpi.org' +license=(custom) +depends=(libltdl hwloc) +makedepends=(inetutils valgrind gcc-fortran) optdepends=('gcc-fortran: fortran support') -options=('staticlibs') +options=(staticlibs) source=(http://www.open-mpi.org/software/ompi/v1.8/downloads/${pkgname}-${pkgver}.tar.bz2) -sha1sums=('d32961b83c689e086cede6c964b312e1f3d174f0') +sha1sums=('e6e85da3e54784ee3d7b0bb0ff4d365ef2899c49') build() { - cd ${pkgname}-${pkgver} + cd $pkgname-$pkgver # Make sure we use the system ltdl library rather than the ones in the tarball rm -r opal/libltdl @@ -41,23 +42,23 @@ build() { } package() { - cd ${pkgname}-${pkgver} - make DESTDIR="${pkgdir}" install + cd $pkgname-$pkgver + make DESTDIR="$pkgdir" install # FS#28583 - install -d -m 755 "${pkgdir}"/usr/lib/pkgconfig + install -d -m 755 "$pkgdir"/usr/lib/pkgconfig for i in ompi-c.pc ompi-cxx.pc ompi-f77.pc ompi-f90.pc ompi.pc; do - ln -sf /usr/lib/openmpi/pkgconfig/${i} "${pkgdir}"/usr/lib/pkgconfig/ + ln -sf /usr/lib/openmpi/pkgconfig/$i "$pkgdir"/usr/lib/pkgconfig/ done # Openmpi's otfinfo conflicts with the one from texlive - mv "${pkgdir}"/usr/bin/otfinfo{,mpi} + mv "$pkgdir"/usr/bin/otfinfo{,mpi} # Remove dangling symlink and useless file - rm "${pkgdir}"/usr/share/vampirtrace/config.log + rm "$pkgdir"/usr/share/vampirtrace/config.log - install -d -m 755 "${pkgdir}"/etc/ld.so.conf.d - echo "/usr/lib/${pkgname}" > "${pkgdir}"/etc/ld.so.conf.d/${pkgname}.conf + install -d -m 755 "$pkgdir"/etc/ld.so.conf.d + echo "/usr/lib/$pkgname" > "$pkgdir"/etc/ld.so.conf.d/$pkgname.conf - install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE + install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE } diff --git a/extra/qt4/CVE-2013-4549.patch b/extra/qt4/CVE-2013-4549.patch deleted file mode 100644 index 8084f4a41..000000000 --- a/extra/qt4/CVE-2013-4549.patch +++ /dev/null @@ -1,233 +0,0 @@ -From 512a1ce0698d370c313bb561bbf078935fa0342e Mon Sep 17 00:00:00 2001 -From: Mitch Curtis <mitch.curtis@digia.com> -Date: Thu, 7 Nov 2013 09:36:29 +0100 -Subject: [PATCH] Disallow deep or widely nested entity references. - -Nested references with a depth of 2 or greater will fail. References -that partially expand to greater than 1024 characters will also fail. - -This is a backport of 46a8885ae486e238a39efa5119c2714f328b08e4. - -Change-Id: I0c2e1fa13d6ccb5f88641dae2ed3f28bfdeaf609 -Reviewed-by: Richard J. Moore <rich@kde.org> -Reviewed-by: Lars Knoll <lars.knoll@digia.com> - -From cecceb0cdd87482124a73ecf537f3445d68be13e Mon Sep 17 00:00:00 2001 -From: Mitch Curtis <mitch.curtis@digia.com> -Date: Tue, 12 Nov 2013 13:44:56 +0100 -Subject: [PATCH] Fully expand entities to ensure deep or widely nested ones fail parsing - -With 512a1ce0698d370c313bb561bbf078935fa0342e, we failed when parsing -entities whose partially expanded size was greater than 1024 -characters. That was not enough, so now we fully expand all entities. - -This is a backport of f1053d94f59f053ce4acad9320df14f1fbe4faac. - -Change-Id: I41dd6f4525c63e82fd320a22d19248169627f7e0 -Reviewed-by: Richard J. Moore <rich@kde.org> - -diff --git a/src/xml/sax/qxml.cpp b/src/xml/sax/qxml.cpp -index a1777c5..3904632 100644 ---- a/src/xml/sax/qxml.cpp -+++ b/src/xml/sax/qxml.cpp -@@ -424,6 +424,10 @@ private: - int stringValueLen; - QString emptyStr; - -+ // The limit to the amount of times the DTD parsing functions can be called -+ // for the DTD currently being parsed. -+ int dtdRecursionLimit; -+ - const QString &string(); - void stringClear(); - void stringAddC(QChar); -@@ -492,6 +496,7 @@ private: - void unexpectedEof(ParseFunction where, int state); - void parseFailed(ParseFunction where, int state); - void pushParseState(ParseFunction function, int state); -+ bool isPartiallyExpandedEntityValueTooLarge(QString *errorMessage); - - Q_DECLARE_PUBLIC(QXmlSimpleReader) - QXmlSimpleReader *q_ptr; -@@ -2759,6 +2764,7 @@ QXmlSimpleReaderPrivate::QXmlSimpleReaderPrivate(QXmlSimpleReader *reader) - useNamespacePrefixes = false; - reportWhitespaceCharData = true; - reportEntities = false; -+ dtdRecursionLimit = 2; - } - - QXmlSimpleReaderPrivate::~QXmlSimpleReaderPrivate() -@@ -5018,6 +5024,11 @@ bool QXmlSimpleReaderPrivate::parseDoctype() - } - break; - case Mup: -+ if (dtdRecursionLimit > 0 && parameterEntities.size() > dtdRecursionLimit) { -+ reportParseError(QString::fromLatin1( -+ "DTD parsing exceeded recursion limit of %1.").arg(dtdRecursionLimit)); -+ return false; -+ } - if (!parseMarkupdecl()) { - parseFailed(&QXmlSimpleReaderPrivate::parseDoctype, state); - return false; -@@ -6627,6 +6638,37 @@ bool QXmlSimpleReaderPrivate::parseChoiceSeq() - return false; - } - -+bool QXmlSimpleReaderPrivate::isPartiallyExpandedEntityValueTooLarge(QString *errorMessage) -+{ -+ const QString value = string(); -+ QMap<QString, int> referencedEntityCounts; -+ foreach (QString entityName, entities.keys()) { -+ for (int i = 0; i < value.size() && i != -1; ) { -+ i = value.indexOf(entityName, i); -+ if (i != -1) { -+ // The entityName we're currently trying to find -+ // was matched in this string; increase our count. -+ ++referencedEntityCounts[entityName]; -+ i += entityName.size(); -+ } -+ } -+ } -+ -+ foreach (QString entityName, referencedEntityCounts.keys()) { -+ const int timesReferenced = referencedEntityCounts[entityName]; -+ const QString entityValue = entities[entityName]; -+ if (entityValue.size() * timesReferenced > 1024) { -+ if (errorMessage) { -+ *errorMessage = QString::fromLatin1("The XML entity \"%1\"" -+ "expands too a string that is too large to process when " -+ "referencing \"%2\" %3 times.").arg(entityName).arg(entityName).arg(timesReferenced); -+ } -+ return true; -+ } -+ } -+ return false; -+} -+ - /* - Parse a EntityDecl [70]. - -@@ -6721,6 +6763,15 @@ bool QXmlSimpleReaderPrivate::parseEntityDecl() - switch (state) { - case EValue: - if ( !entityExist(name())) { -+ QString errorMessage; -+ if (isPartiallyExpandedEntityValueTooLarge(&errorMessage)) { -+ // The entity at entityName is entityValue.size() characters -+ // long in its unexpanded form, and was mentioned timesReferenced times, -+ // resulting in a string that would be greater than 1024 characters. -+ reportParseError(errorMessage); -+ return false; -+ } -+ - entities.insert(name(), string()); - if (declHnd) { - if (!declHnd->internalEntityDecl(name(), string())) { -diff --git a/src/xml/sax/qxml.cpp b/src/xml/sax/qxml.cpp -index 3904632..befa801 100644 ---- a/src/xml/sax/qxml.cpp -+++ b/src/xml/sax/qxml.cpp -@@ -426,7 +426,9 @@ private: - - // The limit to the amount of times the DTD parsing functions can be called - // for the DTD currently being parsed. -- int dtdRecursionLimit; -+ static const int dtdRecursionLimit = 2; -+ // The maximum amount of characters an entity value may contain, after expansion. -+ static const int entityCharacterLimit = 1024; - - const QString &string(); - void stringClear(); -@@ -496,7 +498,7 @@ private: - void unexpectedEof(ParseFunction where, int state); - void parseFailed(ParseFunction where, int state); - void pushParseState(ParseFunction function, int state); -- bool isPartiallyExpandedEntityValueTooLarge(QString *errorMessage); -+ bool isExpandedEntityValueTooLarge(QString *errorMessage); - - Q_DECLARE_PUBLIC(QXmlSimpleReader) - QXmlSimpleReader *q_ptr; -@@ -2764,7 +2766,6 @@ QXmlSimpleReaderPrivate::QXmlSimpleReaderPrivate(QXmlSimpleReader *reader) - useNamespacePrefixes = false; - reportWhitespaceCharData = true; - reportEntities = false; -- dtdRecursionLimit = 2; - } - - QXmlSimpleReaderPrivate::~QXmlSimpleReaderPrivate() -@@ -6638,30 +6639,43 @@ bool QXmlSimpleReaderPrivate::parseChoiceSeq() - return false; - } - --bool QXmlSimpleReaderPrivate::isPartiallyExpandedEntityValueTooLarge(QString *errorMessage) -+bool QXmlSimpleReaderPrivate::isExpandedEntityValueTooLarge(QString *errorMessage) - { -- const QString value = string(); -- QMap<QString, int> referencedEntityCounts; -- foreach (QString entityName, entities.keys()) { -- for (int i = 0; i < value.size() && i != -1; ) { -- i = value.indexOf(entityName, i); -- if (i != -1) { -- // The entityName we're currently trying to find -- // was matched in this string; increase our count. -- ++referencedEntityCounts[entityName]; -- i += entityName.size(); -+ QMap<QString, int> literalEntitySizes; -+ // The entity at (QMap<QString,) referenced the entities at (QMap<QString,) (int>) times. -+ QMap<QString, QMap<QString, int> > referencesToOtherEntities; -+ QMap<QString, int> expandedSizes; -+ -+ // For every entity, check how many times all entity names were referenced in its value. -+ foreach (QString toSearch, entities.keys()) { -+ // The amount of characters that weren't entity names, but literals, like 'X'. -+ QString leftOvers = entities.value(toSearch); -+ // How many times was entityName referenced by toSearch? -+ foreach (QString entityName, entities.keys()) { -+ for (int i = 0; i < leftOvers.size() && i != -1; ) { -+ i = leftOvers.indexOf(QString::fromLatin1("&%1;").arg(entityName), i); -+ if (i != -1) { -+ leftOvers.remove(i, entityName.size() + 2); -+ // The entityName we're currently trying to find was matched in this string; increase our count. -+ ++referencesToOtherEntities[toSearch][entityName]; -+ } - } - } -+ literalEntitySizes[toSearch] = leftOvers.size(); - } - -- foreach (QString entityName, referencedEntityCounts.keys()) { -- const int timesReferenced = referencedEntityCounts[entityName]; -- const QString entityValue = entities[entityName]; -- if (entityValue.size() * timesReferenced > 1024) { -+ foreach (QString entity, referencesToOtherEntities.keys()) { -+ expandedSizes[entity] = literalEntitySizes[entity]; -+ foreach (QString referenceTo, referencesToOtherEntities.value(entity).keys()) { -+ const int references = referencesToOtherEntities.value(entity).value(referenceTo); -+ // The total size of an entity's value is the expanded size of all of its referenced entities, plus its literal size. -+ expandedSizes[entity] += expandedSizes[referenceTo] * references + literalEntitySizes[referenceTo] * references; -+ } -+ -+ if (expandedSizes[entity] > entityCharacterLimit) { - if (errorMessage) { -- *errorMessage = QString::fromLatin1("The XML entity \"%1\"" -- "expands too a string that is too large to process when " -- "referencing \"%2\" %3 times.").arg(entityName).arg(entityName).arg(timesReferenced); -+ *errorMessage = QString::fromLatin1("The XML entity \"%1\" expands too a string that is too large to process (%2 characters > %3)."); -+ *errorMessage = (*errorMessage).arg(entity).arg(expandedSizes[entity]).arg(entityCharacterLimit); - } - return true; - } -@@ -6764,10 +6778,7 @@ bool QXmlSimpleReaderPrivate::parseEntityDecl() - case EValue: - if ( !entityExist(name())) { - QString errorMessage; -- if (isPartiallyExpandedEntityValueTooLarge(&errorMessage)) { -- // The entity at entityName is entityValue.size() characters -- // long in its unexpanded form, and was mentioned timesReferenced times, -- // resulting in a string that would be greater than 1024 characters. -+ if (isExpandedEntityValueTooLarge(&errorMessage)) { - reportParseError(errorMessage); - return false; - } --- -1.7.1 diff --git a/extra/qt4/CVE-2014-0190.patch b/extra/qt4/CVE-2014-0190.patch new file mode 100644 index 000000000..e97ee7bf0 --- /dev/null +++ b/extra/qt4/CVE-2014-0190.patch @@ -0,0 +1,32 @@ +Don't crash on broken GIF images + +Broken GIF images could set invalid width and height +values inside the image, leading to Qt creating a null +QImage for it. In that case we need to abort decoding +the image and return an error. + +Initial patch by Rich Moore. + +Backport of Id82a4036f478bd6e49c402d6598f57e7e5bb5e1e from Qt 5 + +Task-number: QTBUG-38367 +Change-Id: I0680740018aaa8356d267b7af3f01fac3697312a +Security-advisory: CVE-2014-0190 + +diff -up qt-everywhere-opensource-src-4.8.6/src/gui/image/qgifhandler.cpp.QTBUG-38367 qt-everywhere-opensource-src-4.8.6/src/gui/image/qgifhandler.cpp +--- qt-everywhere-opensource-src-4.8.6/src/gui/image/qgifhandler.cpp.QTBUG-38367 2014-04-10 13:37:12.000000000 -0500 ++++ qt-everywhere-opensource-src-4.8.6/src/gui/image/qgifhandler.cpp 2014-04-24 15:58:54.515862458 -0500 +@@ -359,6 +359,13 @@ int QGIFFormat::decode(QImage *image, co + memset(bits, 0, image->byteCount()); + } + ++ // Check if the previous attempt to create the image failed. If it ++ // did then the image is broken and we should give up. ++ if (image->isNull()) { ++ state = Error; ++ return -1; ++ } ++ + disposePrevious(image); + disposed = false; + diff --git a/extra/qt4/PKGBUILD b/extra/qt4/PKGBUILD index c9c08a51c..bc1c4894f 100644 --- a/extra/qt4/PKGBUILD +++ b/extra/qt4/PKGBUILD @@ -1,10 +1,10 @@ -# $Id: PKGBUILD 211314 2014-04-18 17:28:17Z andyrtr $ +# $Id: PKGBUILD 211742 2014-04-25 11:11:02Z andrea $ # Maintainer: Andrea Scarpino <andrea@archlinux.org> # Contributor: Pierre Schmitz <pierre@archlinux.de> pkgname=qt4 -pkgver=4.8.5 -pkgrel=9 +pkgver=4.8.6 +pkgrel=1 arch=('i686' 'x86_64') url='http://qt-project.org/' license=('GPL3' 'LGPL' 'FDL' 'custom') @@ -32,20 +32,15 @@ source=("http://download.qt-project.org/official_releases/qt/4.8/${pkgver}/${_pk 'qtconfig-qt4.desktop' 'assistant-qt4.desktop' 'designer-qt4.desktop' 'linguist-qt4.desktop' 'qdbusviewer-qt4.desktop' 'improve-cups-support.patch' - 'qtbug-31579.patch' 'qtbug-32534.patch' 'qtbug-32908.patch' - 'libmng2.patch' 'CVE-2013-4549.patch') -md5sums=('1864987bdbb2f58f8ae8b350dfdbe133' + 'CVE-2014-0190.patch') +md5sums=('2edbe4d6c2eff33ef91732602f3518eb' 'a16638f4781e56e7887ff8212a322ecc' '8a28b3f52dbeb685d4b69440b520a3e1' '9727c406c240990870c905696a8c5bd1' '0e384663d3dd32abe35f5331c4147569' 'b859c5673e5098c39f72b2252947049e' 'c439c7731c25387352d8453ca7574971' - '6ed8d26a8e4a9bba1f6c08fb99cc8357' - 'bb0e0fa6ba953fa590d81ac612374e11' - 'db343dcae522bc90d802ad1e83b7f5dd' - '0ba4ffc9ff1acb9bf8a5f592ba956d48' - '8701bd7445426c1ad5da3ddbd72df6b4') + '34ed257109afb83342cfe514c8abe027') prepare() { cd ${_pkgfqn} @@ -53,17 +48,8 @@ prepare() { # (FS#28381) (KDEBUG#180051) patch -p1 -i "${srcdir}"/improve-cups-support.patch - # (FS#36028) (QTBUG#31579) - patch -p1 -i "${srcdir}"/qtbug-31579.patch - # (FS#36394) (QTBUG#32534) - patch -p1 -i "${srcdir}"/qtbug-32534.patch - # (FS#36947) (QTBUG#32908) - patch -p1 -i "${srcdir}"/qtbug-32908.patch - - # (FS#38081) - patch -p1 -i "${srcdir}"/CVE-2013-4549.patch - # (QTBUG#34894) - patch -p1 -i "${srcdir}"/libmng2.patch + # QTBUG#38367 + patch -p1 -i "${srcdir}"/CVE-2014-0190.patch sed -i "s|-O2|${CXXFLAGS}|" mkspecs/common/{g++,gcc}-base.conf sed -i "/^QMAKE_LFLAGS_RPATH/s| -Wl,-rpath,||g" mkspecs/common/gcc-base-unix.conf diff --git a/extra/qt4/libmng2.patch b/extra/qt4/libmng2.patch deleted file mode 100644 index b6000fc0b..000000000 --- a/extra/qt4/libmng2.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 515617e55be9a7bfa738a9c32ef8b19065de37d4 Mon Sep 17 00:00:00 2001 -From: aavit <eirik.aavitsland@digia.com> -Date: Fri, 22 Nov 2013 15:49:44 +0100 -Subject: [PATCH] Recognize newer libmng versions in config test - -libmng 2.0.x has been released and is compatible and usable, but since -it no longer provides a VERSION_MAJOR macro, the config test would fail. - -Task-number: QTBUG-34894 -Change-Id: I36f6ed9d69dbae88feb1b88ce099bf36c9283133 -Reviewed-by: Liang Qi <liang.qi@digia.com> -(cherry picked from qtimageformats/9ae386653c321c8ddc10fad5ea88f32ebb3d3ffe) ---- - config.tests/unix/libmng/libmng.cpp | 2 ++ - 1 files changed, 2 insertions(+), 0 deletions(-) - -diff --git a/config.tests/unix/libmng/libmng.cpp b/config.tests/unix/libmng/libmng.cpp -index 0fbe554..9db10ff 100644 ---- a/config.tests/unix/libmng/libmng.cpp -+++ b/config.tests/unix/libmng/libmng.cpp -@@ -46,9 +46,11 @@ int main(int, char **) - mng_handle hMNG; - mng_cleanup(&hMNG); - -+#if defined(MNG_VERSION_MAJOR) - #if MNG_VERSION_MAJOR < 1 || (MNG_VERSION_MAJOR == 1 && MNG_VERSION_MINOR == 0 && MNG_VERSION_RELEASE < 9) - #error System libmng version is less than 1.0.9; using built-in version instead. - #endif -+#endif - - return 0; - } --- -1.7.1 - diff --git a/extra/qt4/qtbug-31579.patch b/extra/qt4/qtbug-31579.patch deleted file mode 100644 index b4e1e7387..000000000 --- a/extra/qt4/qtbug-31579.patch +++ /dev/null @@ -1,146 +0,0 @@ -From 2a6537f0629aaff53a42d993ad94ad4de3cd3030 Mon Sep 17 00:00:00 2001 -From: Gunnar Sletta <gunnar.sletta@digia.com> -Date: Thu, 4 Jul 2013 16:20:40 +1000 -Subject: [PATCH] Fix drawing of 0-width polylines from outside the devicerect. - -This was broken by a previous fix which aimed to fix gaps in -polylines with tiny line segments. The result was that we -skipped updating the origin point when stroke() didn't produce -pixels which accidentally included the case of the line -being completely outside the deviceRect. I fixed this -by returning the value of clipLine in drawLine to the caller -so we could still update the origin for this case. - -Task-number: QTBUG-31579 -Change-Id: Iac29436f042da7658bbeaf9370351dc6f2c95065 -(cherry picked from qtbase/900cccfd459fcbdbc4aa3d313afe12cfbf68fd87) -Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com> ---- - src/gui/painting/qcosmeticstroker.cpp | 42 ++++++++++++++++++++------------ - src/gui/painting/qcosmeticstroker_p.h | 2 +- - 2 files changed, 27 insertions(+), 17 deletions(-) - -diff --git a/src/gui/painting/qcosmeticstroker.cpp b/src/gui/painting/qcosmeticstroker.cpp -index 0061ecb..4413170 100644 ---- a/src/gui/painting/qcosmeticstroker.cpp -+++ b/src/gui/painting/qcosmeticstroker.cpp -@@ -133,10 +133,15 @@ struct NoDasher { - - }; - -+/* -+ * The return value is the result of the clipLine() call performed at the start -+ * of each of the two functions, aka "false" means completely outside the devices -+ * rect. -+ */ - template<DrawPixel drawPixel, class Dasher> --static void drawLine(QCosmeticStroker *stroker, qreal x1, qreal y1, qreal x2, qreal y2, int caps); -+static bool drawLine(QCosmeticStroker *stroker, qreal x1, qreal y1, qreal x2, qreal y2, int caps); - template<DrawPixel drawPixel, class Dasher> --static void drawLineAA(QCosmeticStroker *stroker, qreal x1, qreal y1, qreal x2, qreal y2, int caps); -+static bool drawLineAA(QCosmeticStroker *stroker, qreal x1, qreal y1, qreal x2, qreal y2, int caps); - - inline void drawPixel(QCosmeticStroker *stroker, int x, int y, int coverage) - { -@@ -602,17 +607,20 @@ void QCosmeticStroker::drawPath(const QVectorPath &path) - caps |= CapEnd; - - QCosmeticStroker::Point last = this->lastPixel; -- stroke(this, p.x(), p.y(), p2.x(), p2.y(), caps); -+ bool unclipped = stroke(this, p.x(), p.y(), p2.x(), p2.y(), caps); - - /* fix for gaps in polylines with fastpen and aliased in a sequence - of points with small distances: if current point p2 has been dropped -- out, keep last non dropped point p. */ -- if (fastPenAliased) { -- if (last.x != lastPixel.x || last.y != lastPixel.y || -- points == begin + 2 || points == end - 2 ) { -- { -- p = p2; -- } -+ out, keep last non dropped point p. -+ -+ However, if the line was completely outside the devicerect, we -+ still need to update p to avoid drawing the line after this one from -+ a bad starting position. -+ */ -+ if (fastPenAliased && unclipped) { -+ if (last.x != lastPixel.x || last.y != lastPixel.y -+ || points == begin + 2 || points == end - 2) { -+ p = p2; - } - } else { - p = p2; -@@ -720,10 +728,10 @@ static inline void capAdjust(int caps, int &x1, int &x2, int &y, int yinc) - the drawing shifts from horizontal to vertical or back. - */ - template<DrawPixel drawPixel, class Dasher> --static void drawLine(QCosmeticStroker *stroker, qreal rx1, qreal ry1, qreal rx2, qreal ry2, int caps) -+static bool drawLine(QCosmeticStroker *stroker, qreal rx1, qreal ry1, qreal rx2, qreal ry2, int caps) - { - if (stroker->clipLine(rx1, ry1, rx2, ry2)) -- return; -+ return false; - - static const int half = 31; - int x1 = toF26Dot6(rx1) + half; -@@ -813,7 +821,7 @@ static void drawLine(QCosmeticStroker *stroker, qreal rx1, qreal ry1, qreal rx2, - } else { - // horizontal - if (!dx) -- return; -+ return true; - - QCosmeticStroker::Direction dir = QCosmeticStroker::LeftToRight; - -@@ -886,14 +894,15 @@ static void drawLine(QCosmeticStroker *stroker, qreal rx1, qreal ry1, qreal rx2, - } - } - stroker->lastPixel = last; -+ return true; - } - - - template<DrawPixel drawPixel, class Dasher> --static void drawLineAA(QCosmeticStroker *stroker, qreal rx1, qreal ry1, qreal rx2, qreal ry2, int caps) -+static bool drawLineAA(QCosmeticStroker *stroker, qreal rx1, qreal ry1, qreal rx2, qreal ry2, int caps) - { - if (stroker->clipLine(rx1, ry1, rx2, ry2)) -- return; -+ return false; - - int x1 = toF26Dot6(rx1); - int y1 = toF26Dot6(ry1); -@@ -967,7 +976,7 @@ static void drawLineAA(QCosmeticStroker *stroker, qreal rx1, qreal ry1, qreal rx - } else { - // horizontal - if (!dx) -- return; -+ return true; - - int yinc = F16Dot16FixedDiv(dy, dx); - -@@ -1029,6 +1038,7 @@ static void drawLineAA(QCosmeticStroker *stroker, qreal rx1, qreal ry1, qreal rx - drawPixel(stroker, x, (y>>16) + 1, alpha * alphaEnd >> 6); - } - } -+ return true; - } - - QT_END_NAMESPACE -diff --git a/src/gui/painting/qcosmeticstroker_p.h b/src/gui/painting/qcosmeticstroker_p.h -index 870738b..3216856 100644 ---- a/src/gui/painting/qcosmeticstroker_p.h -+++ b/src/gui/painting/qcosmeticstroker_p.h -@@ -56,7 +56,7 @@ QT_MODULE(Gui) - class QCosmeticStroker; - - --typedef void (*StrokeLine)(QCosmeticStroker *stroker, qreal x1, qreal y1, qreal x2, qreal y2, int caps); -+typedef bool (*StrokeLine)(QCosmeticStroker *stroker, qreal x1, qreal y1, qreal x2, qreal y2, int caps); - - class QCosmeticStroker - { --- -1.7.1 - diff --git a/extra/qt4/qtbug-32534.patch b/extra/qt4/qtbug-32534.patch deleted file mode 100644 index c49f18842..000000000 --- a/extra/qt4/qtbug-32534.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 1f40ed553e618c3b0511c7db4b4fd26c2d2b65bf Mon Sep 17 00:00:00 2001 -From: Peter Hartmann <phartmann@blackberry.com> -Date: Thu, 25 Jul 2013 12:05:29 -0400 -Subject: [PATCH] QHttpMultiPart: fix data corruption in readData method - -When readData() is called repeatedly, we need to keep track which -part of the multipart message we are currently reading from. -Hereby we also need to take the boundary size into account, and not -only the size of the multipart; otherwise we would skip a not -completely read part. This would then later lead to advancing the -read pointer by negative indexes and data loss. - -Task-number: QTBUG-32534 -Change-Id: Ibb6dff16adaf4ea67181d23d1d0c8459e33a0ed0 -Reviewed-by: Jonathan Liu <net147@gmail.com> -Reviewed-by: Shane Kearns <shane.kearns@accenture.com> -(cherry picked from qtbase/af96c6fed931564c95037539f07e9c8e33c69529) -Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> ---- - src/network/access/qhttpmultipart.cpp | 3 +- - tests/auto/qnetworkreply/tst_qnetworkreply.cpp | 44 ++++++++++++++++++++++++ - 2 files changed, 46 insertions(+), 1 deletions(-) - -diff --git a/src/network/access/qhttpmultipart.cpp b/src/network/access/qhttpmultipart.cpp -index 635129a..b25e917 100644 ---- a/src/network/access/qhttpmultipart.cpp -+++ b/src/network/access/qhttpmultipart.cpp -@@ -488,7 +488,8 @@ qint64 QHttpMultiPartIODevice::readData(char *data, qint64 maxSize) - - // skip the parts we have already read - while (index < multiPart->parts.count() && -- readPointer >= partOffsets.at(index) + multiPart->parts.at(index).d->size()) -+ readPointer >= partOffsets.at(index) + multiPart->parts.at(index).d->size() -+ + multiPart->boundary.count() + 6) // 6 == 2 boundary dashes, \r\n after boundary, \r\n after multipart - index++; - - // read the data --- -1.7.1 - diff --git a/extra/qt4/qtbug-32908.patch b/extra/qt4/qtbug-32908.patch deleted file mode 100644 index f11fa4075..000000000 --- a/extra/qt4/qtbug-32908.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 0c03af0d4d928bdbb32b09eedb1dba3ce59e5278 Mon Sep 17 00:00:00 2001 -From: Gatis Paeglis <gatis.paeglis@digia.com> -Date: Sat, 31 Aug 2013 21:22:47 +0200 -Subject: [PATCH] Revert "QTBUG-15319: fix shortcuts with secondary Xkb layout." - -The change which attempted to fix QTBUG-15319 broke keyboard -shortcuts for non latin keyboard layouts. - -This patch reverts QTBUG-15319 (f45cdeda8) since it caused a -regression. - -Task-number: QTBUG-32908 - -Change-Id: I47d7984fa7986d5218d1f3ff1fc36d2ec67c9ba7 -Reviewed-by: David Faure <david.faure@kdab.com> ---- - src/gui/kernel/qkeymapper_x11.cpp | 5 +---- - 1 files changed, 1 insertions(+), 4 deletions(-) - -diff --git a/src/gui/kernel/qkeymapper_x11.cpp b/src/gui/kernel/qkeymapper_x11.cpp -index 005ff3f..7daa41d 100644 ---- a/src/gui/kernel/qkeymapper_x11.cpp -+++ b/src/gui/kernel/qkeymapper_x11.cpp -@@ -282,12 +282,9 @@ QList<int> QKeyMapperPrivate::possibleKeysXKB(QKeyEvent *event) - - // first, translate key only using lock modifiers (there are no Qt equivalents for these, so we must - // always use them when determining the baseKeySym) -- // Note: the Xkb group to be used for the conversion keycode->keysym has to be given to -- // XkbLookupKeySym(). This information is contained in the bits 8 to 15 of xmodifiers. -- // See https://bugreports.qt-project.org/browse/QTBUG-15319 . - KeySym baseKeySym; - uint consumedModifiers; -- if (!XkbLookupKeySym(X11->display, xkeycode, (xmodifiers & (0xff00 | LockMask | qt_num_lock_mask)), -+ if (!XkbLookupKeySym(X11->display, xkeycode, (xmodifiers & (LockMask | qt_num_lock_mask)), - &consumedModifiers, &baseKeySym)) - return QList<int>(); - --- -1.7.1 - |