diff options
author | jstebbins <[email protected]> | 2012-06-08 21:45:19 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2012-06-08 21:45:19 +0000 |
commit | a65c7ea4dbc4e60ef55c46d1653a4ae2c6dd92b7 (patch) | |
tree | 67dc0bece351462e399de0c4bd9416568ff18359 | |
parent | 5ccde87148977e42c890e7cc8892ed516a96e80e (diff) |
merge portability patches to bugfix branch.
Portability enhancements for non-linux gnu systems and freebsd.
Thanks to Rogério Theodoro de Brito and Pino Toscano for contributing
these. And sorry for neglecting to acknowledge you in the original
mainline commit.
git-svn-id: svn://svn.handbrake.fr/HandBrake/branches/0.9.x@4728 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r-- | gtk/configure.ac | 9 | ||||
-rw-r--r-- | gtk/src/callbacks.c | 11 | ||||
-rw-r--r-- | libhb/ports.h | 2 | ||||
-rw-r--r-- | make/include/main.defs | 5 |
4 files changed, 21 insertions, 6 deletions
diff --git a/gtk/configure.ac b/gtk/configure.ac index d2db300c4..94219c32d 100644 --- a/gtk/configure.ac +++ b/gtk/configure.ac @@ -94,10 +94,15 @@ case $host in mingw_flag=yes ;; *) + case "$host_os" in + linux*) + pkg_gudev="gudev-1.0" + ;; + esac if test "x$gst_disable" = "xyes" ; then - GHB_PACKAGES="gtk+-2.0 >= 2.10 gthread-2.0 gio-2.0 libnotify dbus-glib-1 gudev-1.0" + GHB_PACKAGES="gtk+-2.0 >= 2.10 gthread-2.0 gio-2.0 libnotify dbus-glib-1 $pkg_gudev" else - GHB_PACKAGES="gtk+-2.0 >= 2.10 gthread-2.0 gstreamer-0.10 gstreamer-interfaces-0.10 gstreamer-video-0.10 gstreamer-pbutils-0.10 gio-2.0 libnotify dbus-glib-1 gudev-1.0" + GHB_PACKAGES="gtk+-2.0 >= 2.10 gthread-2.0 gstreamer-0.10 gstreamer-interfaces-0.10 gstreamer-video-0.10 gstreamer-pbutils-0.10 gio-2.0 libnotify dbus-glib-1 $pkg_gudev" fi mingw_flag=no ;; diff --git a/gtk/src/callbacks.c b/gtk/src/callbacks.c index 917e27713..d1b11484d 100644 --- a/gtk/src/callbacks.c +++ b/gtk/src/callbacks.c @@ -28,7 +28,9 @@ #if !defined(_WIN32) #include <poll.h> #define G_UDEV_API_IS_SUBJECT_TO_CHANGE 1 +#if defined(__linux__) #include <gudev/gudev.h> +#endif #include <dbus/dbus-glib.h> #include <dbus/dbus-glib-lowlevel.h> @@ -49,6 +51,9 @@ #endif #include <gdk/gdkx.h> +#ifndef NOTIFY_CHECK_VERSION +#define NOTIFY_CHECK_VERSION(x,y,z) 0 +#endif #else #define WINVER 0x0500 #include <winsock2.h> @@ -3937,14 +3942,14 @@ dvd_device_list() return dvd_devices; } -#if !defined(_WIN32) +#if defined(__linux__) static GUdevClient *udev_ctx = NULL; #endif gboolean ghb_is_cd(GDrive *gd) { -#if !defined(_WIN32) +#if defined(__linux__) gchar *device; GUdevDevice *udd; @@ -3978,7 +3983,7 @@ ghb_is_cd(GDrive *gd) void ghb_udev_init() { -#if !defined(_WIN32) +#if defined(__linux__) udev_ctx = g_udev_client_new(NULL); #endif } diff --git a/libhb/ports.h b/libhb/ports.h index 7b743c437..5e177991c 100644 --- a/libhb/ports.h +++ b/libhb/ports.h @@ -51,7 +51,7 @@ typedef struct hb_thread_s hb_thread_t; #elif defined( SYS_DARWIN ) # define HB_LOW_PRIORITY 0 # define HB_NORMAL_PRIORITY 31 -#elif defined( SYS_LINUX ) || defined( SYS_FREEBSD ) || defined ( SYS_SunOS ) +#elif defined( SYS_LINUX ) || defined( SYS_FREEBSD ) || defined ( SYS_SunOS ) || defined ( __FreeBSD_kernel__ ) # define HB_LOW_PRIORITY 0 # define HB_NORMAL_PRIORITY 0 #elif defined( SYS_CYGWIN ) diff --git a/make/include/main.defs b/make/include/main.defs index e68f679f7..a210ececf 100644 --- a/make/include/main.defs +++ b/make/include/main.defs @@ -83,6 +83,11 @@ ifeq (1-linux,$(FEATURE.gtk)-$(BUILD.system)) MODULES += gtk endif +ifeq (1-gnu,$(FEATURE.gtk)-$(BUILD.system)) + ## build gtk when gtk+gnu + MODULES += gtk +endif + ifeq (1,$(FEATURE.local_yasm)) MODULES += contrib/yasm endif |