diff options
author | François Andriot <albator78@libertysurf.fr> | 2013-07-24 11:25:02 +0200 |
---|---|---|
committer | François Andriot <albator78@libertysurf.fr> | 2013-07-24 11:25:02 +0200 |
commit | 0c4b32438a57f52601dfe66d133bd263a5d304ee (patch) | |
tree | 9389a6db04f282ab54a2cc4ca8f55124285a5fa4 /redhat/tdelibs | |
parent | 700ec263535470631ef4f6fb816000500eb4227e (diff) | |
download | tde-packaging-0c4b32438a57f52601dfe66d133bd263a5d304ee.tar.gz tde-packaging-0c4b32438a57f52601dfe66d133bd263a5d304ee.zip |
RPM Packaging: updates for R14
Diffstat (limited to 'redhat/tdelibs')
-rw-r--r-- | redhat/tdelibs/tdelibs-14.0.0-devkitpower_support.patch | 153 | ||||
-rw-r--r-- | redhat/tdelibs/tdelibs-14.0.0.spec | 29 |
2 files changed, 177 insertions, 5 deletions
diff --git a/redhat/tdelibs/tdelibs-14.0.0-devkitpower_support.patch b/redhat/tdelibs/tdelibs-14.0.0-devkitpower_support.patch new file mode 100644 index 000000000..055cac6a8 --- /dev/null +++ b/redhat/tdelibs/tdelibs-14.0.0-devkitpower_support.patch @@ -0,0 +1,153 @@ +--- tdelibs/CMakeLists.txt.OR 2013-07-24 10:36:44.409135030 +0200 ++++ tdelibs/CMakeLists.txt 2013-07-24 10:37:09.619389250 +0200 +@@ -83,6 +83,7 @@ + OPTION( WITH_GCC_VISIBILITY "Enable fvisibility and fvisibility-inlines-hidden" ${WITH_ALL_OPTIONS} ) + OPTION( WITH_INOTIFY "Enable inotify support for tdeio" ON ) + OPTION( WITH_GAMIN "Enable FAM/GAMIN support" ${WITH_ALL_OPTIONS} ) ++option( WITH_DEVKITPOWER "Enable DevKit Power support" OFF ) + option( WITH_UPOWER "Enable uPower support" ${WITH_ALL_OPTIONS} ) + option( WITH_UDISKS "Enable uDisks support" ${WITH_ALL_OPTIONS} ) + option( WITH_UDISKS2 "Enable uDisks2 support" ${WITH_ALL_OPTIONS} ) +--- tdelibs/tdecore/CMakeLists.txt.ORI 2013-07-24 10:40:06.480153460 +0200 ++++ tdelibs/tdecore/CMakeLists.txt 2013-07-24 10:40:38.037254501 +0200 +@@ -21,6 +21,13 @@ + + if( WITH_UPOWER ) + add_definitions( -DWITH_UPOWER ) ++endif ( ) ++ ++if( WITH_DEVKITPOWER ) ++ add_definitions( -DWITH_DEVKITPOWER ) ++endif ( ) ++ ++if( WITH_UPOWER OR WITH_DEVKITPOWER ) + set ( TDEUPOWER_INCLUDE_DIRECTORIES + ${DBUS_TQT_INCLUDE_DIRS} + ) +--- tdelibs/tdecore/tdehardwaredevices.cpp.ORI 2013-07-24 10:42:27.499248218 +0200 ++++ tdelibs/tdecore/tdehardwaredevices.cpp 2013-07-24 10:55:02.895355871 +0200 +@@ -70,13 +70,13 @@ + #endif // WITH_NETWORK_MANAGER_BACKEND + + // uPower and uDisks2 integration +-#if defined(WITH_UPOWER) || defined(WITH_UDISKS) || defined(WITH_UDISKS2) ++#if defined(WITH_UPOWER) || defined(WITH_UDISKS) || defined(WITH_UDISKS2) || defined(WITH_DEVKITPOWER) + #include <tqdbusdata.h> + #include <tqdbusmessage.h> + #include <tqdbusproxy.h> + #include <tqdbusvariant.h> + #include <tqdbusconnection.h> +-#endif // defined(WITH_UPOWER) || defined(WITH_UDISKS) || defined(WITH_UDISKS2) ++#endif // defined(WITH_UPOWER) || defined(WITH_UDISKS) || defined(WITH_UDISKS2) || defined(WITH_DEVKITPOWER) + #if defined(WITH_UDISKS) || defined(WITH_UDISKS2) + #include <tqdbuserror.h> + #include <tqdbusdatamap.h> +@@ -85,6 +85,14 @@ + #if defined(WITH_UDISKS) + #include "tqdbusdatalist.h" + #endif // ddefined(WITH_UDISKS) ++#ifdef WITH_DEVKITPOWER ++#define DBUS_POWER_CONNECTION_NAME "org.freedesktop.DeviceKit.Power" ++#define DBUS_POWER_OBJECT_PATH "/org/freedesktop/DeviceKit/Power" ++#endif // WITH_DEVKITPOWER ++#ifdef WITH_UPOWER ++#define DBUS_POWER_CONNECTION_NAME "org.freedesktop.UPower" ++#define DBUS_POWER_OBJECT_PATH "/org/freedesktop/UPower" ++#endif // WITH_UPOWER + + // BEGIN BLOCK + // Copied from include/linux/genhd.h +@@ -1364,10 +1372,10 @@ + } + } + else { +-#ifdef WITH_UPOWER ++#if defined(WITH_UPOWER) || defined(WITH_DEVKITPOWER) + TQT_DBusConnection dbusConn = TQT_DBusConnection::addConnection(TQT_DBusConnection::SystemBus); + if (dbusConn.isConnected()) { +- TQT_DBusProxy upowerProperties("org.freedesktop.UPower", "/org/freedesktop/UPower", "org.freedesktop.DBus.Properties", dbusConn); ++ TQT_DBusProxy upowerProperties(DBUS_POWER_CONNECTION_NAME, DBUS_POWER_OBJECT_PATH, "org.freedesktop.DBus.Properties", dbusConn); + if (upowerProperties.canSend()) { + // can suspend? + TQValueList<TQT_DBusData> params; +@@ -1387,9 +1395,9 @@ + else { + return FALSE; + } +-#else // WITH_UPOWER ++#else // defined(WITH_UPOWER) || defined(WITH_DEVKITPOWER) + return FALSE; +-#endif// WITH_UPOWER ++#endif// defined(WITH_UPOWER) || defined(WITH_DEVKITPOWER) + } + } + +@@ -1405,10 +1413,10 @@ + } + } + else { +-#ifdef WITH_UPOWER ++#if defined(WITH_UPOWER) || defined(WITH_DEVKITPOWER) + TQT_DBusConnection dbusConn = TQT_DBusConnection::addConnection(TQT_DBusConnection::SystemBus); + if (dbusConn.isConnected()) { +- TQT_DBusProxy upowerProperties("org.freedesktop.UPower", "/org/freedesktop/UPower", "org.freedesktop.DBus.Properties", dbusConn); ++ TQT_DBusProxy upowerProperties(DBUS_POWER_CONNECTION_NAME, DBUS_POWER_OBJECT_PATH, "org.freedesktop.DBus.Properties", dbusConn); + if (upowerProperties.canSend()) { + // can hibernate? + TQValueList<TQT_DBusData> params; +@@ -1428,9 +1436,9 @@ + else { + return FALSE; + } +-#else // WITH_UPOWER ++#else // defined(WITH_UPOWER) || defined(WITH_DEVKITPOWER) + return FALSE; +-#endif// WITH_UPOWER ++#endif// defined(WITH_UPOWER) || defined(WITH_DEVKITPOWER) + } + } + +@@ -1565,24 +1573,24 @@ + return true; + } + else { +-#ifdef WITH_UPOWER ++#if defined(WITH_UPOWER) || defined(WITH_DEVKITPOWER) + TQT_DBusConnection dbusConn; + dbusConn = TQT_DBusConnection::addConnection(TQT_DBusConnection::SystemBus); + if ( dbusConn.isConnected() ) { + if (ps == TDESystemPowerState::Suspend) { + TQT_DBusMessage msg = TQT_DBusMessage::methodCall( +- "org.freedesktop.UPower", +- "/org/freedesktop/UPower", +- "org.freedesktop.UPower", ++ DBUS_POWER_CONNECTION_NAME, ++ DBUS_POWER_OBJECT_PATH, ++ DBUS_POWER_CONNECTION_NAME, + "Suspend"); + dbusConn.sendWithReply(msg); + return true; + } + else if (ps == TDESystemPowerState::Hibernate) { + TQT_DBusMessage msg = TQT_DBusMessage::methodCall( +- "org.freedesktop.UPower", +- "/org/freedesktop/UPower", +- "org.freedesktop.UPower", ++ DBUS_POWER_CONNECTION_NAME, ++ DBUS_POWER_OBJECT_PATH, ++ DBUS_POWER_CONNECTION_NAME, + "Hibernate"); + dbusConn.sendWithReply(msg); + return true; +@@ -1594,9 +1602,9 @@ + else { + return false; + } +-#else // WITH_UPOWER ++#else // defined(WITH_UPOWER) || defined(WITH_DEVKITPOWER) + return false; +-#endif // WITH_UPOWER ++#endif // defined(WITH_UPOWER) || defined(WITH_DEVKITPOWER) + } + } + else if (ps == TDESystemPowerState::PowerOff) { diff --git a/redhat/tdelibs/tdelibs-14.0.0.spec b/redhat/tdelibs/tdelibs-14.0.0.spec index 8c6339f7c..adbb33814 100644 --- a/redhat/tdelibs/tdelibs-14.0.0.spec +++ b/redhat/tdelibs/tdelibs-14.0.0.spec @@ -41,6 +41,8 @@ Patch0: tdelibs-14.0.0-ftbfs.patch Patch1: tdelibs-14.0.0-fix_xdg_menu.patch # Fix battery charge detection Patch2: tdelibs-14.0.0-fix_battery_charge.patch +# Enable Devkit Power support (older than upower) +Patch3: tdelibs-14.0.0-devkitpower_support.patch # Patches from Mandriva Patch101: tdelibs-14.0.0-xdg_dirs_set_path.patch @@ -117,15 +119,30 @@ BuildRequires: bzip2-devel BuildRequires: libudev-devel # UDISKS support +%if 0%{?fedora} || 0%{?mdkversion} || 0%{?mgaversion} || 0%{?suse_version} || 0%{?rhel} >= 6 +%define with_udisks 1 +BuildRequires: udisks-devel Requires: udisks +%endif + +# PMOUNT support Requires: pmount -BuildRequires: udisks-devel # UDISKS2 support %if 0%{?fedora} || 0%{?mdkversion} || 0%{?mgaversion} || 0%{?suse_version} %define with_udisks2 1 -Requires: udisks2 BuildRequires: udisks2-devel +Requires: udisks2 +%endif + +# UPOWER support +%if 0%{?rhel} >= 6 +%define with_devkitpower 1 +Requires: DeviceKit-power +%endif +%if 0%{?fedora} || 0%{?suse_version} || 0%{?mdkversion} || 0%{?mgaversion} +%define with_upower 1 +Requires: upower %endif # UTEMPTER support @@ -233,7 +250,7 @@ BuildRequires: xz-devel %if 0%{?mgaversion} || 0%{?mdkversion} BuildRequires: %{_lib}nm-util-devel %endif -%if 0%{?rhel} || 0%{?fedora} || 0%{?suse_version} +%if 0%{?rhel} >= 6 || 0%{?fedora} || 0%{?suse_version} BuildRequires: NetworkManager-glib-devel %endif %endif @@ -408,6 +425,7 @@ applications for TDE. %patch0 -p1 -b .ftbfs %patch1 -p1 -b .xdg %patch2 -p1 -b .batterycharge +%patch3 -p1 -b .devkitpower %patch101 -p1 -b .xdg_path %patch102 -p1 -b .cups_by_default @@ -459,8 +477,9 @@ cd build -DWITH_GCC_VISIBILITY=ON \ %{?!with_inotify:-DWITH_INOTIFY=OFF} \ %{?!with_gamin:-DWITH_GAMIN=OFF} \ - -DWITH_UPOWER=ON \ - -DWITH_UDISKS=ON \ + %{?with_devkitpower:-DWITH_DEVKITPOWER=ON} \ + %{?!with_upower:-DWITH_UPOWER=OFF} \ + %{?!with_udisks:-DWITH_UDISKS=OFF} \ %{?!with_udisks2:-DWITH_UDISKS2=OFF} \ -DWITH_CONSOLEKIT=ON \ %{?with_nm:-DWITH_NETWORK_MANAGER_BACKEND=ON} \ |