diff options
-rw-r--r-- | media-video/thoggen/ChangeLog | 10 | ||||
-rw-r--r-- | media-video/thoggen/files/digest-thoggen-0.3 | 1 | ||||
-rw-r--r-- | media-video/thoggen/files/thoggen-0.3-new-dbus-hal.patch | 349 | ||||
-rw-r--r-- | media-video/thoggen/metadata.xml | 6 | ||||
-rw-r--r-- | media-video/thoggen/thoggen-0.3.ebuild | 47 |
5 files changed, 413 insertions, 0 deletions
diff --git a/media-video/thoggen/ChangeLog b/media-video/thoggen/ChangeLog new file mode 100644 index 000000000000..439f73e896b1 --- /dev/null +++ b/media-video/thoggen/ChangeLog @@ -0,0 +1,10 @@ +# ChangeLog for media-video/thoggen +# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/media-video/thoggen/ChangeLog,v 1.1 2005/07/25 20:57:45 hanno Exp $ + +*thoggen-0.3 (25 Jul 2005) + + 25 Jul 2005; Hanno Boeck <hanno@gentoo.org> + +files/thoggen-0.3-new-dbus-hal.patch, +metadata.xml, +thoggen-0.3.ebuild: + Initial commit. + diff --git a/media-video/thoggen/files/digest-thoggen-0.3 b/media-video/thoggen/files/digest-thoggen-0.3 new file mode 100644 index 000000000000..58ab9f07b765 --- /dev/null +++ b/media-video/thoggen/files/digest-thoggen-0.3 @@ -0,0 +1 @@ +MD5 bdd950c0df20890e4319623d9a93a805 thoggen-0.3.tar.gz 734877 diff --git a/media-video/thoggen/files/thoggen-0.3-new-dbus-hal.patch b/media-video/thoggen/files/thoggen-0.3-new-dbus-hal.patch new file mode 100644 index 000000000000..07f2d2453a08 --- /dev/null +++ b/media-video/thoggen/files/thoggen-0.3-new-dbus-hal.patch @@ -0,0 +1,349 @@ +Index: src/th-device-pool.c +=================================================================== +RCS file: /cvsroot/thoggen/thoggen/src/th-device-pool.c,v +retrieving revision 1.4 +retrieving revision 1.5 +diff -u -p -r1.4 -r1.5 +--- src/th-device-pool.c 6 Jan 2005 20:23:47 -0000 1.4 ++++ src/th-device-pool.c 4 Apr 2005 13:06:20 -0000 1.5 +@@ -88,23 +88,33 @@ static void dp_hal_device_prop + dbus_bool_t is_removed, + dbus_bool_t is_added); + ++#ifndef USE_NEW_DBUS_HAL_API ++ + static void dp_hal_device_condition_cb (LibHalContext *ctx, + const char *udi, + const char *cond_name, + DBusMessage *msg); ++#else ++ ++static void dp_hal_device_condition_cb (LibHalContext *ctx, ++ const char *udi, ++ const char *cond_name, ++ const char *cond_detail); ++ ++#endif + + /* variables */ + + static GObjectClass *dp_parent_class; /* NULL */ + + +- + /*************************************************************************** + * + * disc_drive_hal_cb_funcs + * + ***************************************************************************/ + ++#ifndef USE_NEW_DBUS_HAL_API + static const LibHalFunctions disc_drive_hal_cb_funcs = + { + dp_hal_main_loop_hook_cb, /* main loop integration */ +@@ -115,6 +125,7 @@ static const LibHalFunctions disc_drive_ + dp_hal_device_prop_mod_cb, /* device property modified */ + dp_hal_device_condition_cb /* device condiiton */ + }; ++#endif /* USE_NEW_DBUS_HAL_API */ + + /*************************************************************************** + * +@@ -194,8 +205,38 @@ device_pool_instance_init (ThDevicePool + + pool->priv = g_new0 (ThDevicePoolPrivate, 1); + ++#ifdef USE_NEW_DBUS_HAL_API ++ new_hal_ctx = libhal_ctx_new(); ++ libhal_ctx_set_cache (new_hal_ctx, TRUE); ++ libhal_ctx_set_device_added (new_hal_ctx, dp_hal_device_added_cb); ++ libhal_ctx_set_device_removed (new_hal_ctx, dp_hal_device_removed_cb); ++ libhal_ctx_set_device_new_capability (new_hal_ctx, dp_hal_device_new_cap_cb); ++ libhal_ctx_set_device_lost_capability (new_hal_ctx, dp_hal_device_lost_cap_cb); ++ libhal_ctx_set_device_property_modified (new_hal_ctx, dp_hal_device_prop_mod_cb); ++ libhal_ctx_set_device_condition (new_hal_ctx, dp_hal_device_condition_cb); ++ ++ { ++ DBusConnection *conn = dbus_bus_get (DBUS_BUS_SYSTEM, NULL); ++ if (conn == NULL) ++ { ++ g_warning ("dbus_bus_get(DBUS_BUS_SYSTEM) failed at %s!\n", G_STRLOC); ++ } ++ else ++ { ++ libhal_ctx_set_dbus_connection (new_hal_ctx, conn); ++ dp_hal_main_loop_hook_cb (new_hal_ctx, conn); ++ } ++ } ++ ++ if (!libhal_ctx_init (new_hal_ctx, NULL)) ++ g_warning ("libhal_ctx_init() failed at %s!\n", G_STRLOC); ++ ++#else ++ + new_hal_ctx = hal_initialize (&disc_drive_hal_cb_funcs, TRUE); + ++#endif /* USE_NEW_DBUS_HAL_API */ ++ + + /* we will get a NULL context if libhal cannot connect + * to the dbus message bus. we will get a valid context +@@ -236,8 +277,14 @@ device_pool_finalize (GObject *object) + + if (pool->priv->hal_ctx) + { ++#ifndef USE_NEW_DBUS_HAL_API + if (hal_shutdown (pool->priv->hal_ctx) != 0) +- g_printerr ("ThDevicePool: hal_shutdown() problem!?\n"); ++ g_printerr ("ThDevicePool: hal_shutdown() problem!\n"); ++#else ++ if (!libhal_ctx_shutdown (pool->priv->hal_ctx, NULL)) ++ g_printerr ("ThDevicePool: libhal_ctx_shutdown() problem!\n"); ++ libhal_ctx_free (pool->priv->hal_ctx); ++#endif + } + + for (l = pool->priv->trackers; l; l = l->next) +@@ -312,7 +359,34 @@ dp_reconnect_to_hal_cb (ThDevicePool *po + + g_message ("Trying to reconnect to HAL..."); + ++#ifdef USE_NEW_DBUS_HAL_API ++ new_hal_ctx = libhal_ctx_new(); ++ libhal_ctx_set_cache (new_hal_ctx, TRUE); ++ libhal_ctx_set_device_added (new_hal_ctx, dp_hal_device_added_cb); ++ libhal_ctx_set_device_removed (new_hal_ctx, dp_hal_device_removed_cb); ++ libhal_ctx_set_device_new_capability (new_hal_ctx, dp_hal_device_new_cap_cb); ++ libhal_ctx_set_device_lost_capability (new_hal_ctx, dp_hal_device_lost_cap_cb); ++ libhal_ctx_set_device_property_modified (new_hal_ctx, dp_hal_device_prop_mod_cb); ++ libhal_ctx_set_device_condition (new_hal_ctx, dp_hal_device_condition_cb); ++ ++ { ++ DBusConnection *conn = dbus_bus_get (DBUS_BUS_SYSTEM, NULL); ++ if (conn == NULL) ++ { ++ g_warning ("dbus_bus_get(DBUS_BUS_SYSTEM) failed at %s!\n", G_STRLOC); ++ } ++ else ++ { ++ libhal_ctx_set_dbus_connection (new_hal_ctx, conn); ++ dp_hal_main_loop_hook_cb (new_hal_ctx, conn); ++ } ++ } ++ ++ if (!libhal_ctx_init (new_hal_ctx, NULL)) ++ g_warning ("libhal_ctx_init() failed at %s!\n", G_STRLOC); ++#else + new_hal_ctx = hal_initialize (&disc_drive_hal_cb_funcs, TRUE); ++#endif + + if (new_hal_ctx) + { +@@ -517,6 +591,8 @@ dp_hal_device_prop_mod_cb (LibHalContext + * + ***************************************************************************/ + ++#ifndef USE_NEW_DBUS_HAL_API ++ + static void + dp_hal_device_condition_cb (LibHalContext *ctx, const char *udi, const char *cond_name, DBusMessage *msg) + { +@@ -534,6 +610,27 @@ dp_hal_device_condition_cb (LibHalContex + } + } + ++#else /* USE_NEW_DBUS_HAL_API */ ++ ++static void ++dp_hal_device_condition_cb (LibHalContext *ctx, const char *udi, const char *cond_name, const char *msg_detail) ++{ ++ ThDevicePool *pool; ++ GList *l; ++ ++ pool = hal_ctx_get_device_pool (ctx); ++ g_return_if_fail (TH_IS_DEVICE_POOL (pool)); ++ ++ for (l = pool->priv->trackers; l; l = l->next) ++ { ++ ThDeviceTracker *tracker = TH_DEVICE_TRACKER (l->data); ++ ++ th_device_tracker_dev_condition (tracker, udi, cond_name, msg_detail); ++ } ++} ++ ++#endif /* USE_NEW_DBUS_HAL_API */ ++ + /*************************************************************************** + * + * device_pool_device_is_volume +Index: src/th-device-tracker.c +=================================================================== +RCS file: /cvsroot/thoggen/thoggen/src/th-device-tracker.c,v +retrieving revision 1.1.1.1 +retrieving revision 1.2 +diff -u -p -r1.1.1.1 -r1.2 +--- src/th-device-tracker.c 25 Nov 2004 18:06:32 -0000 1.1.1.1 ++++ src/th-device-tracker.c 4 Apr 2005 13:06:21 -0000 1.2 +@@ -196,6 +196,8 @@ th_device_tracker_prop_mod (ThDeviceTrac + * + ***************************************************************************/ + ++#ifndef USE_NEW_DBUS_HAL_API ++ + void + th_device_tracker_dev_condition (ThDeviceTracker *tracker, + const gchar *udi, +@@ -211,4 +213,21 @@ th_device_tracker_dev_condition (ThDevic + TH_DEVICE_TRACKER_GET_IFACE (tracker)->dev_condition (tracker, udi, cond_name, msg); + } + ++#else ++ ++void ++th_device_tracker_dev_condition (ThDeviceTracker *tracker, ++ const gchar *udi, ++ const gchar *cond_name, ++ const gchar *cond_detail) ++{ ++ g_return_if_fail (TH_IS_DEVICE_TRACKER (tracker)); ++ g_return_if_fail (udi != NULL); ++ g_return_if_fail (cond_name != NULL); ++ ++ if (TH_DEVICE_TRACKER_GET_IFACE (tracker)->dev_condition != NULL) ++ TH_DEVICE_TRACKER_GET_IFACE (tracker)->dev_condition (tracker, udi, cond_name, cond_detail); ++} ++ ++#endif /* USE_NEW_DBUS_HAL_API */ + +Index: src/th-device-tracker.h +=================================================================== +RCS file: /cvsroot/thoggen/thoggen/src/th-device-tracker.h,v +retrieving revision 1.1.1.1 +retrieving revision 1.2 +diff -u -p -r1.1.1.1 -r1.2 +--- src/th-device-tracker.h 25 Nov 2004 18:06:32 -0000 1.1.1.1 ++++ src/th-device-tracker.h 4 Apr 2005 13:06:21 -0000 1.2 +@@ -21,6 +21,39 @@ + #include <libhal.h> + #include <glib-object.h> + ++#include <dbus/dbus-glib-lowlevel.h> ++/* dbus-glib >= 0.30 */ ++#ifdef DBUS_TYPE_PENDING_CALL ++# define USE_NEW_DBUS_HAL_API ++# warning **************************************************************** ++# warning * ++# warning * It seems like you are using dbus >= 0.30 and hal >= 0.5.0 ++# warning * ++# warning * Please be advised that this code has not been tested with ++# warning * this configuration yet, it has just been fixed to compile. ++# warning * ++# warning * Please let me know whether DVD drive detection works on ++# warning * your system, and please do send the log as well (so I ++# warning * can see whether the drives were actually detected via ++# warning * HAL or using the backup methods). Thanks! ++# warning * ++# warning **************************************************************** ++#endif ++ ++#ifdef USE_NEW_DBUS_HAL_API ++# define hal_ctx_get_user_data(ctx) libhal_ctx_get_user_data(ctx) ++# define hal_ctx_set_user_data(ctx,user_data) libhal_ctx_set_user_data(ctx,user_data) ++# define hal_device_exists(ctx,udi) libhal_device_exists(ctx,udi,NULL) ++# define hal_device_property_exists(ctx,udi,key) libhal_device_property_exists(ctx,udi,key,NULL) ++# define hal_device_get_property_string(ctx,udi,key) libhal_device_get_property_string(ctx,udi,key,NULL) ++# define hal_device_get_property_uint64(ctx,udi,key) libhal_device_get_property_uint64(ctx,udi,key,NULL) ++# define hal_device_get_property_bool(ctx,udi,key) libhal_device_get_property_bool(ctx,udi,key,NULL) ++# define hal_free_string(s) libhal_free_string(s) ++# define hal_free_string_array(str_arr) libhal_free_string_array(str_arr) ++# define hal_get_all_devices(ctx,p_num_devices) libhal_get_all_devices(ctx,p_num_devices,NULL) ++# define DBUS_INTERFACE_ORG_FREEDESKTOP_LOCAL DBUS_INTERFACE_LOCAL ++#endif ++ + #define TH_TYPE_DEVICE_TRACKER (th_device_tracker_get_type ()) + #define TH_DEVICE_TRACKER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TH_TYPE_DEVICE_TRACKER, ThDeviceTracker)) + #define TH_IS_DEVICE_TRACKER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TH_TYPE_DEVICE_TRACKER)) +@@ -50,10 +83,20 @@ struct _ThDeviceTrackerIface + gboolean is_removed, + gboolean is_added); + ++#ifndef USE_NEW_DBUS_HAL_API ++ + void (*dev_condition) (ThDeviceTracker *tracker, + const gchar *udi, + const gchar *cond_name, + DBusMessage *msg); ++#else ++ ++ void (*dev_condition) (ThDeviceTracker *tracker, ++ const gchar *udi, ++ const gchar *cond_name, ++ const gchar *cond_detail); ++ ++#endif /* USE_NEW_DBUS_HAL_API */ + }; + + GType th_device_tracker_get_type (void) G_GNUC_CONST; +@@ -81,10 +124,20 @@ void th_device_tracker_prop_mod ( + gboolean is_removed, + gboolean is_added); + ++#ifndef USE_NEW_DBUS_HAL_API ++ + void th_device_tracker_dev_condition (ThDeviceTracker *tracker, + const gchar *udi, + const gchar *cond_name, + DBusMessage *msg); ++#else ++ ++void th_device_tracker_dev_condition (ThDeviceTracker *tracker, ++ const gchar *udi, ++ const gchar *cond_name, ++ const gchar *cond_detail); ++ ++#endif /* USE_NEW_DBUS_HAL_API */ + + #endif /* _th_device_tracker_h_included_ */ + +Index: src/th-disc-drive-pool.c +=================================================================== +RCS file: /cvsroot/thoggen/thoggen/src/th-disc-drive-pool.c,v +retrieving revision 1.11 +retrieving revision 1.12 +diff -u -p -r1.11 -r1.12 +--- src/th-disc-drive-pool.c 16 Mar 2005 16:00:23 -0000 1.11 ++++ src/th-disc-drive-pool.c 4 Apr 2005 13:06:21 -0000 1.12 +@@ -119,11 +119,21 @@ static void disc_pool_device_p + gboolean is_removed, + gboolean is_added); + ++#ifndef USE_NEW_DBUS_HAL_API ++ + static void disc_pool_device_condition (ThDeviceTracker *tracker, + const char *udi, + const char *cond_name, + DBusMessage *msg); + ++#else ++ ++static void disc_pool_device_condition (ThDeviceTracker *tracker, ++ const char *udi, ++ const char *cond_name, ++ const gchar *cond_detail); ++#endif ++ + /* variables */ + + static guint ddp_signals[NUM_SIGNALS]; /* all 0 */ +@@ -892,7 +902,11 @@ static void + disc_pool_device_condition (ThDeviceTracker *tracker, + const gchar *udi, + const gchar *cond_name, ++#ifndef USE_NEW_DBUS_HAL_API + DBusMessage *msg) ++#else ++ const gchar *cond_detail) ++#endif + { + ThDiscDrivePool *disc_pool; + diff --git a/media-video/thoggen/metadata.xml b/media-video/thoggen/metadata.xml new file mode 100644 index 000000000000..37678311fd47 --- /dev/null +++ b/media-video/thoggen/metadata.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>gstreamer</herd> +<maintainer><email>hanno@gentoo.org</email></maintainer> +</pkgmetadata> diff --git a/media-video/thoggen/thoggen-0.3.ebuild b/media-video/thoggen/thoggen-0.3.ebuild new file mode 100644 index 000000000000..72f3a369bb56 --- /dev/null +++ b/media-video/thoggen/thoggen-0.3.ebuild @@ -0,0 +1,47 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/media-video/thoggen/thoggen-0.3.ebuild,v 1.1 2005/07/25 20:57:45 hanno Exp $ + +inherit gnome2 eutils + +DESCRIPTION="DVD ripper, based on GStreamer and Gtk+" +HOMEPAGE="http://thoggen.net/" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~x86" +IUSE="dts" + +DEPEND=">=dev-libs/glib-2.6.0 + >=x11-libs/gtk+-2.6.0 + >=gnome-base/libglade-2.4.0 + >=media-libs/gstreamer-0.8.9 + >=media-libs/gst-plugins-0.8.8 + >=media-plugins/gst-plugins-mpeg2dec-0.8.8 + >=media-plugins/gst-plugins-a52dec-0.8.8 + >=media-plugins/gst-plugins-dvdread-0.8.8 + >=media-plugins/gst-plugins-theora-0.8.8 + >=media-plugins/gst-plugins-vorbis-0.8.8 + >=media-plugins/gst-plugins-ogg-0.8.8 + dts? ( >=media-plugins/gst-plugins-dts-0.8.8 ) + >=sys-apps/dbus-0.22 + >=sys-apps/hal-0.4.0 + >=media-libs/libdvdread-0.9.4" + +pkg_setup() { + if ! built_with_use sys-apps/dbus gtk; then + eerror "Please merge sys-apps/dbus with 'gtk' in USE flags." + die "Need glib support in dbus!" + fi +} + +src_unpack() { + unpack ${A} + cd ${S}; epatch ${FILESDIR}/${PN}-0.3-new-dbus-hal.patch +} + +DOCS="AUTHORS ChangeLog NEWS README TODO" + +# needed to get around some sandboxing checks +export GST_INSPECT=/bin/true |