[GROSS HACK] building libcolor-glib and tools on F13
- From: Andy Lutomirski <luto MIT EDU>
- To: gnome-color-manager-list gnome org
- Cc: Andy Lutomirski <luto mit edu>
- Subject: [GROSS HACK] building libcolor-glib and tools on F13
- Date: Mon, 26 Jul 2010 10:45:02 -0400
This patch, if configured with
./configure --enable-compile-warnings=yes --disable-sane --disable-strict
is enough to build libcolor-glib and most of tools. (You'll have to cd
explicitly -- 'make libcolor-glib' doesn't do anything.)
---
configure.ac | 16 ++++----
libcolor-glib/gcm-brightness.c | 80 +-------------------------------------
libcolor-glib/gcm-sensor-huey.c | 4 +-
libcolor-glib/gcm-usb.c | 11 ++---
4 files changed, 18 insertions(+), 93 deletions(-)
diff --git a/configure.ac b/configure.ac
index 7572ee1..8a5c64b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -134,20 +134,20 @@ GLIB_GSETTINGS
dnl ---------------------------------------------------------------------------
dnl - Check library dependencies
dnl ---------------------------------------------------------------------------
-PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.14.0 gobject-2.0 gthread-2.0 gio-2.0 >= 2.25.9)
+PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.14.0 gobject-2.0 gthread-2.0 gio-2.0 >= 2.24)
PKG_CHECK_MODULES(XORG, xxf86vm xrandr)
-PKG_CHECK_MODULES(GTK, gtk+-3.0 >= 2.90.3)
-PKG_CHECK_MODULES(GNOMEDESKTOP, gnome-desktop-3.0 >= 2.90.0)
+PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.20)
+#PKG_CHECK_MODULES(GNOMEDESKTOP, gnome-desktop-3.0 >= 2.90.0)
PKG_CHECK_MODULES(GUDEV, gudev-1.0)
PKG_CHECK_MODULES(LCMS, lcms2)
PKG_CHECK_MODULES(X11, x11)
PKG_CHECK_MODULES(USB, [libusb-1.0 >= 1.0.0])
dnl Required for the properties window
-PKG_CHECK_MODULES(CONTROL_CENTER, [
- libgnome-control-center >= 2.31.4])
-PANELS_DIR="${libdir}/control-center-1/panels"
-AC_SUBST(PANELS_DIR)
+#PKG_CHECK_MODULES(CONTROL_CENTER, [
+ #libgnome-control-center >= 2.31.4])
+#PANELS_DIR="${libdir}/control-center-1/panels"
+#AC_SUBST(PANELS_DIR)
dnl **** Check for VTE ****
PKG_CHECK_MODULES(VTE, vte3 >= 0.25.1, has_vte=yes, has_vte=no)
@@ -195,7 +195,7 @@ if test x$enable_exiv = xyes; then
AC_DEFINE(HAVE_EXIV,1,[Use EXIV support for detecting scanners])
fi
-PKG_CHECK_MODULES(CANBERRA, libcanberra-gtk3 >= 0.10)
+#PKG_CHECK_MODULES(CANBERRA, libcanberra-gtk3 >= 0.10)
PKG_CHECK_MODULES(EXIF, libexif)
AC_CHECK_LIB(tiff, TIFFReadRGBAImageOriented,
diff --git a/libcolor-glib/gcm-brightness.c b/libcolor-glib/gcm-brightness.c
index 3785e50..251810a 100644
--- a/libcolor-glib/gcm-brightness.c
+++ b/libcolor-glib/gcm-brightness.c
@@ -47,7 +47,7 @@ static void gcm_brightness_finalize (GObject *object);
struct _GcmBrightnessPrivate
{
guint percentage;
- GDBusConnection *connection;
+ void *connection;
};
enum {
@@ -68,43 +68,7 @@ G_DEFINE_TYPE (GcmBrightness, gcm_brightness, G_TYPE_OBJECT)
gboolean
gcm_brightness_set_percentage (GcmBrightness *brightness, guint percentage, GError **error)
{
- GcmBrightnessPrivate *priv = brightness->priv;
- gboolean ret = FALSE;
- GVariant *args = NULL;
- GVariant *response = NULL;
-
- g_return_val_if_fail (GCM_IS_BRIGHTNESS (brightness), FALSE);
- g_return_val_if_fail (percentage <= 100, FALSE);
-
- /* get a session bus connection */
- if (priv->connection == NULL) {
- priv->connection = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, error);
- if (priv->connection == NULL)
- goto out;
- }
-
- /* execute sync method */
- args = g_variant_new ("(u)", percentage),
- response = g_dbus_connection_call_sync (priv->connection,
- GPM_DBUS_SERVICE,
- GPM_DBUS_PATH_BACKLIGHT,
- GPM_DBUS_INTERFACE_BACKLIGHT,
- "SetBrightness",
- args,
- NULL,
- G_DBUS_CALL_FLAGS_NONE,
- -1, NULL, error);
- if (response == NULL)
- goto out;
-
- /* success */
- ret = TRUE;
-out:
- if (args != NULL)
- g_variant_unref (args);
- if (response != NULL)
- g_variant_unref (response);
- return ret;
+ return FALSE;
}
/**
@@ -113,45 +77,7 @@ out:
gboolean
gcm_brightness_get_percentage (GcmBrightness *brightness, guint *percentage, GError **error)
{
- GcmBrightnessPrivate *priv = brightness->priv;
- gboolean ret = FALSE;
- GVariant *response = NULL;
-
- g_return_val_if_fail (GCM_IS_BRIGHTNESS (brightness), FALSE);
-
- /* get a session bus connection */
- if (priv->connection == NULL) {
- priv->connection = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, error);
- if (priv->connection == NULL)
- goto out;
- }
-
- /* execute sync method */
- response = g_dbus_connection_call_sync (priv->connection,
- GPM_DBUS_SERVICE,
- GPM_DBUS_PATH_BACKLIGHT,
- GPM_DBUS_INTERFACE_BACKLIGHT,
- "GetBrightness",
- NULL,
- G_VARIANT_TYPE ("(u)"),
- G_DBUS_CALL_FLAGS_NONE,
- -1, NULL, error);
- if (response == NULL)
- goto out;
-
- /* get the brightness */
- g_variant_get (response, "(u)", &priv->percentage);
-
- /* copy if set */
- if (percentage != NULL)
- *percentage = priv->percentage;
-
- /* success */
- ret = TRUE;
-out:
- if (response != NULL)
- g_variant_unref (response);
- return ret;
+ return FALSE;
}
/**
diff --git a/libcolor-glib/gcm-sensor-huey.c b/libcolor-glib/gcm-sensor-huey.c
index 63ede01..3778266 100644
--- a/libcolor-glib/gcm-sensor-huey.c
+++ b/libcolor-glib/gcm-sensor-huey.c
@@ -363,7 +363,7 @@ gcm_sensor_huey_send_data (GcmSensorHuey *sensor_huey,
if (retval < 0) {
g_set_error (error, GCM_SENSOR_ERROR,
GCM_SENSOR_ERROR_INTERNAL,
- "failed to send request: %s", libusb_strerror (retval));
+ "failed to send request");
goto out;
}
@@ -377,7 +377,7 @@ gcm_sensor_huey_send_data (GcmSensorHuey *sensor_huey,
if (retval < 0) {
g_set_error (error, GCM_SENSOR_ERROR,
GCM_SENSOR_ERROR_INTERNAL,
- "failed to get reply: %s", libusb_strerror (retval));
+ "failed to get reply");
goto out;
}
diff --git a/libcolor-glib/gcm-usb.c b/libcolor-glib/gcm-usb.c
index 891ff0f..85a5c87 100644
--- a/libcolor-glib/gcm-usb.c
+++ b/libcolor-glib/gcm-usb.c
@@ -301,8 +301,7 @@ gcm_usb_load (GcmUsb *usb, GError **error)
if (retval < 0) {
g_set_error (error, GCM_USB_ERROR,
GCM_USB_ERROR_INTERNAL,
- "failed to init libusb: %s",
- libusb_strerror (retval));
+ "failed to init libusb");
goto out;
}
@@ -375,8 +374,8 @@ gcm_usb_connect (GcmUsb *usb, guint vendor_id, guint product_id, guint configura
if (retval < 0) {
g_set_error (error, GCM_USB_ERROR,
GCM_USB_ERROR_INTERNAL,
- "failed to set configuration 0x%02x: %s",
- configuration, libusb_strerror (retval));
+ "failed to set configuration 0x%02x",
+ configuration);
ret = FALSE;
goto out;
}
@@ -384,8 +383,8 @@ gcm_usb_connect (GcmUsb *usb, guint vendor_id, guint product_id, guint configura
if (retval < 0) {
g_set_error (error, GCM_USB_ERROR,
GCM_USB_ERROR_INTERNAL,
- "failed to claim interface 0x%02x: %s",
- interface, libusb_strerror (retval));
+ "failed to claim interface 0x%02x",
+ interface);
ret = FALSE;
goto out;
}
--
1.7.1.1
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]