mirror of
https://github.com/steev/efikamx.git
synced 2026-02-03 23:54:31 +00:00
gnome-shell: Add gnomeshell with GLES patches
This commit is contained in:
16
gnome-base/gnome-shell/Manifest
Normal file
16
gnome-base/gnome-shell/Manifest
Normal file
@@ -0,0 +1,16 @@
|
||||
AUX 30_use-glx-if-cogl-supports.patch 3757 RMD160 912fa7b44096db6d3f9b43a7c9b6be7fda1eedd4 SHA1 8c9af24497c6169d889c268cd09f0ac422d4acfa SHA256 0b9104f490dee34240e8e5ed6bf9a4e86f188d8ef706e73e85151029a2802649
|
||||
AUX 31_don-t-link-directly-to-libGL.patch 1480 RMD160 579799c904e89dcc103c01bf840e344c556e5c2e SHA1 70d0eb466244d7349eaa3e27c456df6d5a2b5968 SHA256 cda73b16a81878343220240d47bd32e790a91d726cf19e472572d0b9334cb528
|
||||
AUX 32_remove-shell-screen-grabber-1.patch 14397 RMD160 c0ec7ae5f2d56edf2fac8cc0620e3961b3a49af7 SHA1 e92198f0e4945040a06f70abaa0b820ee3c95bf8 SHA256 c352064bb9c8a1fff6d23aec843738fb4ffb39ace963f990ddea5b0bfec4d599
|
||||
AUX 32_remove-shell-screen-grabber.patch 15858 RMD160 05123ac6e718b681a8e5bc133e1dd1908b53fe5b SHA1 c5693aa8d9857d0e21203dbf34e585ce5c1155e4 SHA256 2e4faaaed460dd2eaddd7a12251c66458eb6b7f20b88165c72147157b77f0887
|
||||
AUX 33_remove_glx_headers.patch 896 RMD160 7cc8b24f83259630731b7f88c20f1f7b1e26397c SHA1 30f2694f34e25c81ccc49b4567e0e7bc5c7444d2 SHA256 50be46e3cf0170785e3076ee8a7716e7b59818650639360263f726c28dd25e73
|
||||
AUX gnome-shell-3.2.1-automagic-gnome-bluetooth.patch 1841 RMD160 4b57dfeb42f299ef74799409132778b60ddc7a09 SHA1 4acf93b0bda58660b6c7ed5c8fdb6b06df86c035 SHA256 df5f86858b8abc08225ffb7679e829250e05a419b439b2ecad0f02bd93b670b2
|
||||
AUX gnome-shell-3.2.1-optional-networkmanager.patch 7873 RMD160 d0dd3e5ae9b6d0ac12b23e0fe8e2845e79ea13a5 SHA1 00350c0484d25e0f62b3e1fadef43f46333f9b63 SHA256 c7b67f665b42d8a21e2a4f51bca121aba48af676d30e35eb6d6ac7939775b70b
|
||||
AUX gnome-shell-3.2.2.1-GLES.patch 1511 RMD160 d8654d205d0afe13bde66609c8568dd69dd6ffdd SHA1 85e656b504a3e64c142981382f30764cf2cb44ed SHA256 c304370f561c1a4387d8b3cc3206ec5972c3733071ed73d0dea5702dff18bcae
|
||||
AUX gnome-shell-3.4.0-libgnome-shell-js.so-link-1.patch 1137 RMD160 70ddaa8b6c08e78404b2325699ac309595a73bf5 SHA1 f21e78ba4fd2703c4e096ce2f63b2e9dba61b14a SHA256 ae1b5f47e29de890a9bec2bb425a29f66e965b5479a0dfe82a336149ef79bea7
|
||||
AUX gnome-shell-3.4.0-libgnome-shell-js.so-link-2.patch 1238 RMD160 0679b2b0aadbc00383890c1d739b7dc0c8549412 SHA1 1a89e077d956597e058c441f3df5646c5f950c97 SHA256 f5fd78df90bc3616765e5b9f04ab9aecc2436bdf124d23ea9d4498c483c0f3b3
|
||||
AUX gnome-shell-3.4.0-optional-networkmanager.patch 8532 RMD160 6519f66a7b189f8e837e23a79d0904bb45a38f7e SHA1 897771c4038c19c4be62576f104d9a1fc7c6dacb SHA256 487bfd9772799cdd1969b252056af4934870de4704a0bea581876b966e9c754c
|
||||
DIST gnome-shell-3.2.2.1-patches-1.tar.xz 9244 RMD160 4753b8e010d73aba1ac70385d2bbd1cd25648cf6 SHA1 880f5b03c05a263352857922fbf81a22389747eb SHA256 89c250adc8304a9d6f77e0a3af4136de8438f43b1e4874f2fc7966c7558c274a
|
||||
DIST gnome-shell-3.2.2.1.tar.xz 1119984 RMD160 2a3d3360ce630e2644ccd82a7b58801a97ee01ff SHA1 46bbfa5f575fcdd8ff7c653123ce249e7ce93537 SHA256 209363084ef2d58777d70d8430e4659b058cf854c4b9766f3019d69ffea34d6f
|
||||
DIST gnome-shell-3.4.1.tar.xz 1254596 RMD160 098d5c2ce6efa318d47a561f6befae9d52dd3715 SHA1 cdadb4616a8e4b52d120905aed89223c295760fe SHA256 6abfd2fca104aae64ce9d027dd233fc218a58b861176a64831b68e3f90ab56a9
|
||||
EBUILD gnome-shell-3.2.2.1.ebuild 6950 RMD160 c63022fcb9431d32241bb882e5928198aa4b18b5 SHA1 2afaadab98b306cfa2e239553c80622411c6fa02 SHA256 54276409176a279b87806c469b0aa425ec0687bc62e8303ffb96ac597f8c2df6
|
||||
EBUILD gnome-shell-3.4.1.ebuild 7032 RMD160 cd2e784c25688aa509db2973690f9e9fef8a86aa SHA1 1ce860a3ac7918e0f065281094bb7795df12305c SHA256 dba5f0fbb6718ca15d2d6a70c0b047af7694ccdb38f7962a71d0528ab9187ef2
|
||||
106
gnome-base/gnome-shell/files/30_use-glx-if-cogl-supports.patch
Normal file
106
gnome-base/gnome-shell/files/30_use-glx-if-cogl-supports.patch
Normal file
@@ -0,0 +1,106 @@
|
||||
From: Neil Roberts <neil@linux.intel.com>
|
||||
Subject: Don't try to use GLX if Cogl isn't using that Winsys
|
||||
|
||||
Instead of directly using symbols from GLX to check for the swap event
|
||||
notification, the plugin now first verifies that the Cogl renderer is
|
||||
actually using the GLX winsys and then indirectly fetches the pointers
|
||||
for the GLX functions using cogl_get_proc_address. That way it will
|
||||
continue to work if Cogl is using an EGL winsys.
|
||||
|
||||
Origin: http://git.gnome.org/browse/gnome-shell/commit/?h=wip/wayland&id=3bc9405d575c852c30d3a1df0586259f76a3fc74
|
||||
Bug-Ubuntu: https://bugs.launchpad.net/bugs/935124
|
||||
Forwarded: not-needed
|
||||
|
||||
diff --git a/src/gnome-shell-plugin.c b/src/gnome-shell-plugin.c
|
||||
index da46bbd..9b4be1c 100644
|
||||
--- a/src/gnome-shell-plugin.c
|
||||
+++ b/src/gnome-shell-plugin.c
|
||||
@@ -28,6 +28,8 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
+#define CLUTTER_ENABLE_EXPERIMENTAL_API
|
||||
+#define COGL_ENABLE_EXPERIMENTAL_API
|
||||
#include <clutter/clutter.h>
|
||||
#include <clutter/x11/clutter-x11.h>
|
||||
#include <GL/glx.h>
|
||||
@@ -99,6 +101,7 @@ struct _GnomeShellPlugin
|
||||
int glx_error_base;
|
||||
int glx_event_base;
|
||||
guint have_swap_event : 1;
|
||||
+ CoglContext *cogl_context;
|
||||
|
||||
ShellGlobal *global;
|
||||
};
|
||||
@@ -142,30 +145,59 @@ gnome_shell_plugin_init (GnomeShellPlugin *shell_plugin)
|
||||
{
|
||||
}
|
||||
|
||||
-static void
|
||||
-gnome_shell_plugin_start (MetaPlugin *plugin)
|
||||
+static gboolean
|
||||
+gnome_shell_plugin_has_swap_event (GnomeShellPlugin *shell_plugin)
|
||||
{
|
||||
- GnomeShellPlugin *shell_plugin = GNOME_SHELL_PLUGIN (plugin);
|
||||
+ MetaPlugin *plugin = META_PLUGIN (shell_plugin);
|
||||
+ CoglDisplay *cogl_display =
|
||||
+ cogl_context_get_display (shell_plugin->cogl_context);
|
||||
+ CoglRenderer *renderer = cogl_display_get_renderer (cogl_display);
|
||||
+ const char * (* query_extensions_string) (Display *dpy, int screen);
|
||||
+ Bool (* query_extension) (Display *dpy, int *error, int *event);
|
||||
MetaScreen *screen;
|
||||
MetaDisplay *display;
|
||||
Display *xdisplay;
|
||||
- GError *error = NULL;
|
||||
- int status;
|
||||
const char *glx_extensions;
|
||||
- GjsContext *gjs_context;
|
||||
+
|
||||
+ /* We will only get swap events if Cogl is using GLX */
|
||||
+ if (cogl_renderer_get_winsys_id (renderer) != COGL_WINSYS_ID_GLX)
|
||||
+ return FALSE;
|
||||
|
||||
screen = meta_plugin_get_screen (plugin);
|
||||
display = meta_screen_get_display (screen);
|
||||
|
||||
xdisplay = meta_display_get_xdisplay (display);
|
||||
|
||||
- glXQueryExtension (xdisplay,
|
||||
- &shell_plugin->glx_error_base,
|
||||
- &shell_plugin->glx_event_base);
|
||||
+ query_extensions_string =
|
||||
+ (void *) cogl_get_proc_address ("glXQueryExtensionsString");
|
||||
+ query_extension =
|
||||
+ (void *) cogl_get_proc_address ("glXQueryExtension");
|
||||
+
|
||||
+ query_extension (xdisplay,
|
||||
+ &shell_plugin->glx_error_base,
|
||||
+ &shell_plugin->glx_event_base);
|
||||
+
|
||||
+ glx_extensions =
|
||||
+ query_extensions_string (xdisplay,
|
||||
+ meta_screen_get_screen_number (screen));
|
||||
+
|
||||
+ return strstr (glx_extensions, "GLX_INTEL_swap_event") != NULL;
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+gnome_shell_plugin_start (MetaPlugin *plugin)
|
||||
+{
|
||||
+ GnomeShellPlugin *shell_plugin = GNOME_SHELL_PLUGIN (plugin);
|
||||
+ GError *error = NULL;
|
||||
+ int status;
|
||||
+ GjsContext *gjs_context;
|
||||
+ ClutterBackend *backend;
|
||||
+
|
||||
+ backend = clutter_get_default_backend ();
|
||||
+ shell_plugin->cogl_context = clutter_backend_get_cogl_context (backend);
|
||||
|
||||
- glx_extensions = glXQueryExtensionsString (xdisplay,
|
||||
- meta_screen_get_screen_number (screen));
|
||||
- shell_plugin->have_swap_event = strstr (glx_extensions, "GLX_INTEL_swap_event") != NULL;
|
||||
+ shell_plugin->have_swap_event =
|
||||
+ gnome_shell_plugin_has_swap_event (shell_plugin);
|
||||
|
||||
shell_perf_log_define_event (shell_perf_log_get_default (),
|
||||
"glx.swapComplete",
|
||||
@@ -0,0 +1,32 @@
|
||||
From: Neil Roberts <neil@linux.intel.com>
|
||||
Subject: Don't link directly to libGL
|
||||
|
||||
Nothing in the Gnome Shell plugin now directly uses symbols from libGL
|
||||
so we don't need to link to it. This helps to make the plugin support
|
||||
other Cogl drivers and winsys's than GL+GLX (such as GLES+EGL).
|
||||
|
||||
Origin: http://git.gnome.org/browse/gnome-shell/commit/?h=wip/wayland&id=7992acaebc67f3eec62920a3549a1459fe383faf
|
||||
Bug-Ubuntu: https://bugs.launchpad.net/bugs/935124
|
||||
Forwarded: not-needed
|
||||
|
||||
Index: gnome-shell-3.3.92/configure.ac
|
||||
===================================================================
|
||||
--- gnome-shell-3.3.92.orig/configure.ac 2012-03-23 19:16:57.906433028 -0300
|
||||
+++ gnome-shell-3.3.92/configure.ac 2012-03-23 19:17:24.762566200 -0300
|
||||
@@ -50,7 +50,7 @@
|
||||
AC_MSG_RESULT(yes)
|
||||
build_recorder=true
|
||||
recorder_modules="gstreamer-0.10 gstreamer-base-0.10 x11"
|
||||
- PKG_CHECK_MODULES(TEST_SHELL_RECORDER, $recorder_modules clutter-1.0 xfixes gl)
|
||||
+ PKG_CHECK_MODULES(TEST_SHELL_RECORDER, $recorder_modules clutter-1.0 xfixes)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
@@ -81,7 +81,6 @@
|
||||
gjs-internals-1.0 >= $GJS_MIN_VERSION
|
||||
libgnome-menu-3.0 $recorder_modules
|
||||
gdk-x11-3.0 libsoup-2.4
|
||||
- gl
|
||||
clutter-x11-1.0 >= $CLUTTER_MIN_VERSION
|
||||
clutter-glx-1.0 >= $CLUTTER_MIN_VERSION
|
||||
libstartup-notification-1.0 >= $STARTUP_NOTIFICATION_MIN_VERSION
|
||||
@@ -0,0 +1,407 @@
|
||||
diff -ruN gnome-shell-3.4.1.orig/src/Makefile.am gnome-shell-3.4.1/src/Makefile.am
|
||||
--- gnome-shell-3.4.1.orig/src/Makefile.am 2012-05-15 08:55:03.610133691 -0500
|
||||
+++ gnome-shell-3.4.1/src/Makefile.am 2012-05-15 08:56:00.200133061 -0500
|
||||
@@ -113,7 +113,6 @@
|
||||
shell-mount-operation.h \
|
||||
shell-perf-log.h \
|
||||
shell-screenshot.h \
|
||||
- shell-screen-grabber.h \
|
||||
shell-slicer.h \
|
||||
shell-stack.h \
|
||||
shell-tp-client.h \
|
||||
@@ -166,7 +165,6 @@
|
||||
shell-polkit-authentication-agent.h \
|
||||
shell-polkit-authentication-agent.c \
|
||||
shell-screenshot.c \
|
||||
- shell-screen-grabber.c \
|
||||
shell-secure-text-buffer.c \
|
||||
shell-secure-text-buffer.h \
|
||||
shell-slicer.c \
|
||||
@@ -238,8 +236,6 @@
|
||||
|
||||
test_recorder_SOURCES = \
|
||||
$(shell_recorder_sources) $(shell_recorder_private_sources) \
|
||||
- shell-screen-grabber.c \
|
||||
- shell-screen-grabber.h \
|
||||
test-recorder.c
|
||||
endif BUILD_RECORDER
|
||||
|
||||
diff -ruN gnome-shell-3.4.1.orig/src/shell-recorder.c gnome-shell-3.4.1/src/shell-recorder.c
|
||||
--- gnome-shell-3.4.1.orig/src/shell-recorder.c 2012-03-01 10:19:56.000000000 -0600
|
||||
+++ gnome-shell-3.4.1/src/shell-recorder.c 2012-05-15 09:10:55.680131064 -0500
|
||||
@@ -12,7 +12,6 @@
|
||||
|
||||
#include "shell-recorder-src.h"
|
||||
#include "shell-recorder.h"
|
||||
-#include "shell-screen-grabber.h"
|
||||
|
||||
#include <clutter/x11/clutter-x11.h>
|
||||
#include <X11/extensions/Xfixes.h>
|
||||
@@ -48,8 +47,6 @@
|
||||
int stage_width;
|
||||
int stage_height;
|
||||
|
||||
- ShellScreenGrabber *grabber;
|
||||
-
|
||||
gboolean have_pointer;
|
||||
int pointer_x;
|
||||
int pointer_y;
|
||||
@@ -267,8 +264,6 @@
|
||||
recorder->recording_icon = create_recording_icon ();
|
||||
recorder->memory_target = get_memory_target();
|
||||
|
||||
- recorder->grabber = shell_screen_grabber_new ();
|
||||
-
|
||||
recorder->state = RECORDER_STATE_CLOSED;
|
||||
recorder->framerate = DEFAULT_FRAMES_PER_SECOND;
|
||||
}
|
||||
@@ -300,8 +295,6 @@
|
||||
recorder_set_pipeline (recorder, NULL);
|
||||
recorder_set_filename (recorder, NULL);
|
||||
|
||||
- g_object_unref (recorder->grabber);
|
||||
-
|
||||
cogl_handle_unref (recorder->recording_icon);
|
||||
|
||||
G_OBJECT_CLASS (shell_recorder_parent_class)->finalize (object);
|
||||
@@ -545,8 +538,13 @@
|
||||
|
||||
size = recorder->stage_width * recorder->stage_height * 4;
|
||||
|
||||
- data = shell_screen_grabber_grab (recorder->grabber,
|
||||
- 0, 0, recorder->stage_width, recorder->stage_height);
|
||||
+ data = g_malloc (recorder->stage_width * 4 *recorder->stage_height);
|
||||
+ cogl_read_pixels (0, 0, /* x/y */
|
||||
+ recorder->stage_width,
|
||||
+ recorder->stage_height,
|
||||
+ COGL_READ_PIXELS_COLOR_BUFFER,
|
||||
+ CLUTTER_CAIRO_FORMAT_ARGB32,
|
||||
+ data);
|
||||
|
||||
buffer = gst_buffer_new();
|
||||
GST_BUFFER_SIZE(buffer) = size;
|
||||
diff -ruN gnome-shell-3.4.1.orig/src/shell-screen-grabber.c gnome-shell-3.4.1/src/shell-screen-grabber.c
|
||||
--- gnome-shell-3.4.1.orig/src/shell-screen-grabber.c 2012-03-02 06:28:41.000000000 -0600
|
||||
+++ gnome-shell-3.4.1/src/shell-screen-grabber.c 1969-12-31 18:00:00.000000000 -0600
|
||||
@@ -1,210 +0,0 @@
|
||||
-/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
-
|
||||
-#include <string.h>
|
||||
-
|
||||
-#include <clutter/clutter.h>
|
||||
-#include <cogl/cogl.h>
|
||||
-#include <GL/gl.h>
|
||||
-#include <GL/glx.h>
|
||||
-#include <GL/glext.h>
|
||||
-
|
||||
-#include "shell-screen-grabber.h"
|
||||
-
|
||||
-PFNGLBINDBUFFERARBPROC pf_glBindBufferARB;
|
||||
-PFNGLBUFFERDATAARBPROC pf_glBufferDataARB;
|
||||
-PFNGLDELETEBUFFERSARBPROC pf_glDeleteBuffersARB;
|
||||
-PFNGLGENBUFFERSARBPROC pf_glGenBuffersARB;
|
||||
-PFNGLMAPBUFFERARBPROC pf_glMapBufferARB;
|
||||
-PFNGLUNMAPBUFFERARBPROC pf_glUnmapBufferARB;
|
||||
-
|
||||
-struct _ShellScreenGrabberClass
|
||||
-{
|
||||
- GObjectClass parent_class;
|
||||
-};
|
||||
-
|
||||
-struct _ShellScreenGrabber
|
||||
-{
|
||||
- GObject parent_instance;
|
||||
-
|
||||
- int have_pixel_buffers;
|
||||
- int have_pack_invert;
|
||||
- int width, height;
|
||||
- GLuint pixel_buffer;
|
||||
-};
|
||||
-
|
||||
-G_DEFINE_TYPE(ShellScreenGrabber, shell_screen_grabber, G_TYPE_OBJECT);
|
||||
-
|
||||
-static void
|
||||
-shell_screen_grabber_finalize (GObject *gobject)
|
||||
-{
|
||||
- ShellScreenGrabber *grabber = SHELL_SCREEN_GRABBER (gobject);
|
||||
-
|
||||
- if (grabber->pixel_buffer != 0)
|
||||
- pf_glDeleteBuffersARB (1, &grabber->pixel_buffer);
|
||||
-}
|
||||
-
|
||||
-static void
|
||||
-shell_screen_grabber_class_init (ShellScreenGrabberClass *grabber_class)
|
||||
-{
|
||||
- GObjectClass *gobject_class = G_OBJECT_CLASS (grabber_class);
|
||||
-
|
||||
- gobject_class->finalize = shell_screen_grabber_finalize;
|
||||
-}
|
||||
-
|
||||
-static void
|
||||
-shell_screen_grabber_init (ShellScreenGrabber *grabber)
|
||||
-{
|
||||
- grabber->have_pixel_buffers = -1;
|
||||
- grabber->width = -1;
|
||||
- grabber->height= -1;
|
||||
- grabber->pixel_buffer = 0;
|
||||
-}
|
||||
-
|
||||
-ShellScreenGrabber *
|
||||
-shell_screen_grabber_new (void)
|
||||
-{
|
||||
- return g_object_new (SHELL_TYPE_SCREEN_GRABBER, NULL);
|
||||
-}
|
||||
-
|
||||
-/**
|
||||
- * shell_screen_grabber_grab:
|
||||
- * x: X coordinate of the rectangle to grab
|
||||
- * y: Y coordinate of the rectangle to grab
|
||||
- * width: width of the rectangle to grab
|
||||
- * height: heigth of the rectangle to grab
|
||||
- *
|
||||
- * Grabs pixel data from a portion of the screen.
|
||||
- *
|
||||
- * Return value: buffer holding the grabbed data. The data is stored as 32-bit
|
||||
- * words with native-endian xRGB pixels (i.e., the same as CAIRO_FORMAT_RGB24)
|
||||
- * with no padding on the rows. So, the size of the buffer is width * height * 4
|
||||
- * bytes. Free with g_free().
|
||||
- **/
|
||||
-guchar *
|
||||
-shell_screen_grabber_grab (ShellScreenGrabber *grabber,
|
||||
- int x,
|
||||
- int y,
|
||||
- int width,
|
||||
- int height)
|
||||
-{
|
||||
- guchar *data;
|
||||
- gsize row_bytes;
|
||||
- gsize data_size;
|
||||
-
|
||||
- row_bytes = width * 4;
|
||||
- data_size = row_bytes * height;
|
||||
- data = g_malloc (data_size);
|
||||
-
|
||||
- if (grabber->have_pixel_buffers == -1)
|
||||
- {
|
||||
- const GLubyte* extensions = glGetString (GL_EXTENSIONS);
|
||||
- grabber->have_pixel_buffers = strstr ((const char *)extensions, "GL_EXT_pixel_buffer_object") != NULL;
|
||||
- grabber->have_pack_invert = strstr ((const char *)extensions, "GL_MESA_pack_invert") != NULL;
|
||||
- }
|
||||
-
|
||||
- if (grabber->have_pixel_buffers)
|
||||
- {
|
||||
- GLubyte *mapped_data;
|
||||
- GLint old_swap_bytes, old_lsb_first, old_row_length, old_skip_pixels, old_skip_rows, old_alignment;
|
||||
- GLint old_pack_invert = GL_FALSE;
|
||||
- GLint vp_size[4];
|
||||
- guchar *src_row, *dest_row;
|
||||
- int i;
|
||||
-
|
||||
- cogl_flush ();
|
||||
-
|
||||
- if (pf_glBindBufferARB == NULL)
|
||||
- {
|
||||
- pf_glBindBufferARB = (PFNGLBINDBUFFERARBPROC) cogl_get_proc_address ("glBindBufferARB");
|
||||
- pf_glBufferDataARB = (PFNGLBUFFERDATAARBPROC) cogl_get_proc_address ("glBufferDataARB");
|
||||
- pf_glDeleteBuffersARB = (PFNGLDELETEBUFFERSARBPROC) cogl_get_proc_address ("glDeleteBuffersARB");
|
||||
- pf_glGenBuffersARB = (PFNGLGENBUFFERSARBPROC) cogl_get_proc_address ("glGenBuffersARB");
|
||||
- pf_glMapBufferARB = (PFNGLMAPBUFFERARBPROC) cogl_get_proc_address ("glMapBufferARB");
|
||||
- pf_glUnmapBufferARB = (PFNGLUNMAPBUFFERARBPROC) cogl_get_proc_address ("glUnmapBufferARB");
|
||||
- }
|
||||
-
|
||||
- glGetIntegerv (GL_PACK_SWAP_BYTES, &old_swap_bytes);
|
||||
- glGetIntegerv (GL_PACK_LSB_FIRST, &old_lsb_first);
|
||||
- glGetIntegerv (GL_PACK_ROW_LENGTH, &old_row_length);
|
||||
- glGetIntegerv (GL_PACK_SKIP_PIXELS, &old_skip_pixels);
|
||||
- glGetIntegerv (GL_PACK_SKIP_ROWS, &old_skip_rows);
|
||||
- glGetIntegerv (GL_PACK_ALIGNMENT, &old_alignment);
|
||||
-
|
||||
- glPixelStorei (GL_PACK_SWAP_BYTES, GL_FALSE);
|
||||
- glPixelStorei (GL_PACK_LSB_FIRST, GL_FALSE);
|
||||
- glPixelStorei (GL_PACK_ROW_LENGTH, 0);
|
||||
- glPixelStorei (GL_PACK_SKIP_PIXELS, 0);
|
||||
- glPixelStorei (GL_PACK_SKIP_ROWS, 0);
|
||||
- glPixelStorei (GL_PACK_ALIGNMENT, 1);
|
||||
-
|
||||
- if (grabber->have_pack_invert)
|
||||
- {
|
||||
- glGetIntegerv (GL_PACK_INVERT_MESA, &old_pack_invert);
|
||||
- glPixelStorei (GL_PACK_INVERT_MESA, GL_FALSE);
|
||||
- }
|
||||
-
|
||||
- if (grabber->pixel_buffer != 0 &&
|
||||
- (grabber->width != width ||
|
||||
- grabber->height != height))
|
||||
- {
|
||||
- pf_glDeleteBuffersARB (1, &grabber->pixel_buffer);
|
||||
- grabber->pixel_buffer = 0;
|
||||
- }
|
||||
-
|
||||
- if (grabber->pixel_buffer == 0)
|
||||
- {
|
||||
- pf_glGenBuffersARB (1, &grabber->pixel_buffer);
|
||||
-
|
||||
- pf_glBindBufferARB (GL_PIXEL_PACK_BUFFER_ARB, grabber->pixel_buffer);
|
||||
- pf_glBufferDataARB (GL_PIXEL_PACK_BUFFER_ARB, data_size, 0, GL_STREAM_READ_ARB);
|
||||
-
|
||||
- grabber->width = width;
|
||||
- grabber->height = height;
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- pf_glBindBufferARB (GL_PIXEL_PACK_BUFFER_ARB, grabber->pixel_buffer);
|
||||
- }
|
||||
-
|
||||
- /* In OpenGL, (x,y) specifies the bottom-left corner rather than the
|
||||
- * top-left */
|
||||
- glGetIntegerv (GL_VIEWPORT, vp_size);
|
||||
- y = vp_size[3] - (y + height);
|
||||
- glReadPixels (x, y, width, height, GL_BGRA, GL_UNSIGNED_BYTE, 0);
|
||||
-
|
||||
- mapped_data = pf_glMapBufferARB (GL_PIXEL_PACK_BUFFER_ARB, GL_READ_ONLY_ARB);
|
||||
-
|
||||
- src_row = mapped_data + (height - 1) * row_bytes;
|
||||
- dest_row = data;
|
||||
-
|
||||
- for (i = 0; i < height; i++)
|
||||
- {
|
||||
- memcpy (dest_row, src_row, row_bytes);
|
||||
- src_row -= row_bytes;
|
||||
- dest_row += row_bytes;
|
||||
- }
|
||||
-
|
||||
- pf_glUnmapBufferARB (GL_PIXEL_PACK_BUFFER_ARB);
|
||||
- pf_glBindBufferARB (GL_PIXEL_PACK_BUFFER_ARB, 0);
|
||||
-
|
||||
- glPixelStorei (GL_PACK_SWAP_BYTES, old_swap_bytes);
|
||||
- glPixelStorei (GL_PACK_LSB_FIRST, old_lsb_first);
|
||||
- glPixelStorei (GL_PACK_ROW_LENGTH, old_row_length);
|
||||
- glPixelStorei (GL_PACK_SKIP_PIXELS, old_skip_pixels);
|
||||
- glPixelStorei (GL_PACK_SKIP_ROWS, old_skip_rows);
|
||||
- glPixelStorei (GL_PACK_ALIGNMENT, old_alignment);
|
||||
-
|
||||
- if (grabber->have_pack_invert)
|
||||
- glPixelStorei (GL_PACK_INVERT_MESA, old_pack_invert);
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- cogl_read_pixels (x, y,
|
||||
- width, height,
|
||||
- COGL_READ_PIXELS_COLOR_BUFFER,
|
||||
- CLUTTER_CAIRO_FORMAT_ARGB32,
|
||||
- data);
|
||||
- }
|
||||
-
|
||||
- return data;
|
||||
-}
|
||||
diff -ruN gnome-shell-3.4.1.orig/src/shell-screen-grabber.h gnome-shell-3.4.1/src/shell-screen-grabber.h
|
||||
--- gnome-shell-3.4.1.orig/src/shell-screen-grabber.h 2012-01-31 09:47:19.000000000 -0600
|
||||
+++ gnome-shell-3.4.1/src/shell-screen-grabber.h 1969-12-31 18:00:00.000000000 -0600
|
||||
@@ -1,44 +0,0 @@
|
||||
-/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
-#ifndef __SHELL_SCREEN_GRABBER_H__
|
||||
-#define __SHELL_SCREEN_GRABBER_H__
|
||||
-
|
||||
-#include <glib-object.h>
|
||||
-
|
||||
-G_BEGIN_DECLS
|
||||
-
|
||||
-/**
|
||||
- * SECTION:shell-screen-grabber
|
||||
- * @short_description: Grab pixel data from the screen
|
||||
- *
|
||||
- * The #ShellScreenGrabber object is used to download previous drawn
|
||||
- * content to the screen. It internally uses pixel-buffer objects if
|
||||
- * available, otherwise falls back to cogl_read_pixels().
|
||||
- *
|
||||
- * If you are repeatedly grabbing images of the same size from the
|
||||
- * screen, it makes sense to create one #ShellScreenGrabber and keep
|
||||
- * it around. Otherwise, it's fine to simply create one as needed and
|
||||
- * then get rid of it.
|
||||
- */
|
||||
-
|
||||
-typedef struct _ShellScreenGrabber ShellScreenGrabber;
|
||||
-typedef struct _ShellScreenGrabberClass ShellScreenGrabberClass;
|
||||
-
|
||||
-#define SHELL_TYPE_SCREEN_GRABBER (shell_screen_grabber_get_type ())
|
||||
-#define SHELL_SCREEN_GRABBER(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), SHELL_TYPE_SCREEN_GRABBER, ShellScreenGrabber))
|
||||
-#define SHELL_SCREEN_GRABBER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SHELL_TYPE_SCREEN_GRABBER, ShellScreenGrabberClass))
|
||||
-#define SHELL_IS_SCREEN_GRABBER(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), SHELL_TYPE_SCREEN_GRABBER))
|
||||
-#define SHELL_IS_SCREEN_GRABBER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SHELL_TYPE_SCREEN_GRABBER))
|
||||
-#define SHELL_SCREEN_GRABBER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SHELL_TYPE_SCREEN_GRABBER, ShellScreenGrabberClass))
|
||||
-
|
||||
-GType shell_screen_grabber_get_type (void) G_GNUC_CONST;
|
||||
-
|
||||
-ShellScreenGrabber *shell_screen_grabber_new (void);
|
||||
-guchar * shell_screen_grabber_grab (ShellScreenGrabber *grabber,
|
||||
- int x,
|
||||
- int y,
|
||||
- int width,
|
||||
- int height);
|
||||
-
|
||||
-G_END_DECLS
|
||||
-
|
||||
-#endif /* __SHELL_SCREEN_GRABBER_H__ */
|
||||
diff -ruN gnome-shell-3.4.1.orig/src/shell-screenshot.c gnome-shell-3.4.1/src/shell-screenshot.c
|
||||
--- gnome-shell-3.4.1.orig/src/shell-screenshot.c 2012-04-10 13:14:57.000000000 -0500
|
||||
+++ gnome-shell-3.4.1/src/shell-screenshot.c 2012-05-15 09:18:57.030124057 -0500
|
||||
@@ -1,5 +1,8 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
+#define COGL_ENABLE_EXPERIMENTAL_API
|
||||
+#define CLUTTER_ENABLE_EXPERIMENTAL_API
|
||||
+
|
||||
#include <X11/extensions/Xfixes.h>
|
||||
#include <clutter/x11/clutter-x11.h>
|
||||
#include <clutter/clutter.h>
|
||||
@@ -10,7 +13,6 @@
|
||||
#include <meta/meta-shaped-texture.h>
|
||||
|
||||
#include "shell-global.h"
|
||||
-#include "shell-screen-grabber.h"
|
||||
#include "shell-screenshot.h"
|
||||
|
||||
struct _ShellScreenshotClass
|
||||
@@ -90,18 +92,32 @@
|
||||
int width,
|
||||
int height)
|
||||
{
|
||||
- ShellScreenGrabber *grabber;
|
||||
- static const cairo_user_data_key_t key;
|
||||
+ CoglBitmap *bitmap;
|
||||
+ ClutterBackend *backend;
|
||||
+ CoglContext *context;
|
||||
+ int stride;
|
||||
guchar *data;
|
||||
|
||||
- grabber = shell_screen_grabber_new ();
|
||||
- data = shell_screen_grabber_grab (grabber, x, y, width, height);
|
||||
- g_object_unref (grabber);
|
||||
-
|
||||
- screenshot_data->image = cairo_image_surface_create_for_data (data, CAIRO_FORMAT_RGB24,
|
||||
- width, height, width * 4);
|
||||
- cairo_surface_set_user_data (screenshot_data->image, &key,
|
||||
- data, (cairo_destroy_func_t)g_free);
|
||||
+ backend = clutter_get_default_backend ();
|
||||
+ context = clutter_backend_get_cogl_context (backend);
|
||||
+
|
||||
+ screenshot_data->image = cairo_image_surface_create (CAIRO_FORMAT_RGB24,
|
||||
+ width, height);
|
||||
+
|
||||
+ data = cairo_image_surface_get_data (screenshot_data->image);
|
||||
+ stride = cairo_image_surface_get_stride (screenshot_data->image);
|
||||
+
|
||||
+ bitmap = cogl_bitmap_new_for_data (context,
|
||||
+ width,
|
||||
+ height,
|
||||
+ CLUTTER_CAIRO_FORMAT_ARGB32,
|
||||
+ stride,
|
||||
+ data);
|
||||
+ cogl_framebuffer_read_pixels_into_bitmap (cogl_get_draw_framebuffer (),
|
||||
+ x, y,
|
||||
+ COGL_READ_PIXELS_COLOR_BUFFER,
|
||||
+ bitmap);
|
||||
+ cogl_object_unref (bitmap);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -0,0 +1,435 @@
|
||||
From: Neil Roberts <neil@linux.intel.com>
|
||||
Subject: Remove shell-screen-grabber
|
||||
|
||||
The screen grabber was a workaround for an extremely slow path in Mesa
|
||||
when reading back pixel data from the frame buffer. It was using pixel
|
||||
buffer objects by directly calling into GL to hit a fast blit path in
|
||||
Intel's driver. This should no longer be necessary with the latest
|
||||
Mesa because the normal read pixels path now has a fast path to just
|
||||
memcpy the data. Using PBOs in that case just adds an extra
|
||||
indirection because the data is read into an intermediate buffer and
|
||||
then copied back out again.
|
||||
|
||||
We want to be able to remove the dependency on linking against libGL
|
||||
directly from Gnome Shell because that will not work if Cogl is
|
||||
actually using GLES. Also libGL includes GLX which means gnome-shell
|
||||
ends up with a hard dependency on Xlib which hinders the goal of
|
||||
getting Gnome Shell to be a Wayland compositor.
|
||||
|
||||
Origin: http://git.gnome.org/browse/gnome-shell/commit/?h=wip/wayland&id=beada1ca12a68cebca8cf627b93e04922f134ebb
|
||||
Bug-Ubuntu: https://bugs.launchpad.net/bugs/935124
|
||||
Forwarded: not-needed
|
||||
|
||||
Index: gnome-shell-3.3.92/src/shell-recorder.c
|
||||
===================================================================
|
||||
--- gnome-shell-3.3.92.orig/src/shell-recorder.c 2012-03-01 13:19:56.000000000 -0300
|
||||
+++ gnome-shell-3.3.92/src/shell-recorder.c 2012-03-23 18:02:06.568161680 -0300
|
||||
@@ -12,7 +12,6 @@
|
||||
|
||||
#include "shell-recorder-src.h"
|
||||
#include "shell-recorder.h"
|
||||
-#include "shell-screen-grabber.h"
|
||||
|
||||
#include <clutter/x11/clutter-x11.h>
|
||||
#include <X11/extensions/Xfixes.h>
|
||||
@@ -48,8 +47,6 @@
|
||||
int stage_width;
|
||||
int stage_height;
|
||||
|
||||
- ShellScreenGrabber *grabber;
|
||||
-
|
||||
gboolean have_pointer;
|
||||
int pointer_x;
|
||||
int pointer_y;
|
||||
@@ -267,8 +264,6 @@
|
||||
recorder->recording_icon = create_recording_icon ();
|
||||
recorder->memory_target = get_memory_target();
|
||||
|
||||
- recorder->grabber = shell_screen_grabber_new ();
|
||||
-
|
||||
recorder->state = RECORDER_STATE_CLOSED;
|
||||
recorder->framerate = DEFAULT_FRAMES_PER_SECOND;
|
||||
}
|
||||
@@ -300,8 +295,6 @@
|
||||
recorder_set_pipeline (recorder, NULL);
|
||||
recorder_set_filename (recorder, NULL);
|
||||
|
||||
- g_object_unref (recorder->grabber);
|
||||
-
|
||||
cogl_handle_unref (recorder->recording_icon);
|
||||
|
||||
G_OBJECT_CLASS (shell_recorder_parent_class)->finalize (object);
|
||||
@@ -545,8 +538,13 @@
|
||||
|
||||
size = recorder->stage_width * recorder->stage_height * 4;
|
||||
|
||||
- data = shell_screen_grabber_grab (recorder->grabber,
|
||||
- 0, 0, recorder->stage_width, recorder->stage_height);
|
||||
+ data = g_malloc (recorder->stage_width * 4 * recorder->stage_height);
|
||||
+ cogl_read_pixels (0, 0, /* x/y */
|
||||
+ recorder->stage_width,
|
||||
+ recorder->stage_height,
|
||||
+ COGL_READ_PIXELS_COLOR_BUFFER,
|
||||
+ CLUTTER_CAIRO_FORMAT_ARGB32,
|
||||
+ data);
|
||||
|
||||
buffer = gst_buffer_new();
|
||||
GST_BUFFER_SIZE(buffer) = size;
|
||||
Index: gnome-shell-3.3.92/src/shell-screen-grabber.c
|
||||
===================================================================
|
||||
--- gnome-shell-3.3.92.orig/src/shell-screen-grabber.c 2012-03-02 09:28:41.000000000 -0300
|
||||
+++ /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
@@ -1,210 +0,0 @@
|
||||
-/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
-
|
||||
-#include <string.h>
|
||||
-
|
||||
-#include <clutter/clutter.h>
|
||||
-#include <cogl/cogl.h>
|
||||
-#include <GL/gl.h>
|
||||
-#include <GL/glx.h>
|
||||
-#include <GL/glext.h>
|
||||
-
|
||||
-#include "shell-screen-grabber.h"
|
||||
-
|
||||
-PFNGLBINDBUFFERARBPROC pf_glBindBufferARB;
|
||||
-PFNGLBUFFERDATAARBPROC pf_glBufferDataARB;
|
||||
-PFNGLDELETEBUFFERSARBPROC pf_glDeleteBuffersARB;
|
||||
-PFNGLGENBUFFERSARBPROC pf_glGenBuffersARB;
|
||||
-PFNGLMAPBUFFERARBPROC pf_glMapBufferARB;
|
||||
-PFNGLUNMAPBUFFERARBPROC pf_glUnmapBufferARB;
|
||||
-
|
||||
-struct _ShellScreenGrabberClass
|
||||
-{
|
||||
- GObjectClass parent_class;
|
||||
-};
|
||||
-
|
||||
-struct _ShellScreenGrabber
|
||||
-{
|
||||
- GObject parent_instance;
|
||||
-
|
||||
- int have_pixel_buffers;
|
||||
- int have_pack_invert;
|
||||
- int width, height;
|
||||
- GLuint pixel_buffer;
|
||||
-};
|
||||
-
|
||||
-G_DEFINE_TYPE(ShellScreenGrabber, shell_screen_grabber, G_TYPE_OBJECT);
|
||||
-
|
||||
-static void
|
||||
-shell_screen_grabber_finalize (GObject *gobject)
|
||||
-{
|
||||
- ShellScreenGrabber *grabber = SHELL_SCREEN_GRABBER (gobject);
|
||||
-
|
||||
- if (grabber->pixel_buffer != 0)
|
||||
- pf_glDeleteBuffersARB (1, &grabber->pixel_buffer);
|
||||
-}
|
||||
-
|
||||
-static void
|
||||
-shell_screen_grabber_class_init (ShellScreenGrabberClass *grabber_class)
|
||||
-{
|
||||
- GObjectClass *gobject_class = G_OBJECT_CLASS (grabber_class);
|
||||
-
|
||||
- gobject_class->finalize = shell_screen_grabber_finalize;
|
||||
-}
|
||||
-
|
||||
-static void
|
||||
-shell_screen_grabber_init (ShellScreenGrabber *grabber)
|
||||
-{
|
||||
- grabber->have_pixel_buffers = -1;
|
||||
- grabber->width = -1;
|
||||
- grabber->height= -1;
|
||||
- grabber->pixel_buffer = 0;
|
||||
-}
|
||||
-
|
||||
-ShellScreenGrabber *
|
||||
-shell_screen_grabber_new (void)
|
||||
-{
|
||||
- return g_object_new (SHELL_TYPE_SCREEN_GRABBER, NULL);
|
||||
-}
|
||||
-
|
||||
-/**
|
||||
- * shell_screen_grabber_grab:
|
||||
- * x: X coordinate of the rectangle to grab
|
||||
- * y: Y coordinate of the rectangle to grab
|
||||
- * width: width of the rectangle to grab
|
||||
- * height: heigth of the rectangle to grab
|
||||
- *
|
||||
- * Grabs pixel data from a portion of the screen.
|
||||
- *
|
||||
- * Return value: buffer holding the grabbed data. The data is stored as 32-bit
|
||||
- * words with native-endian xRGB pixels (i.e., the same as CAIRO_FORMAT_RGB24)
|
||||
- * with no padding on the rows. So, the size of the buffer is width * height * 4
|
||||
- * bytes. Free with g_free().
|
||||
- **/
|
||||
-guchar *
|
||||
-shell_screen_grabber_grab (ShellScreenGrabber *grabber,
|
||||
- int x,
|
||||
- int y,
|
||||
- int width,
|
||||
- int height)
|
||||
-{
|
||||
- guchar *data;
|
||||
- gsize row_bytes;
|
||||
- gsize data_size;
|
||||
-
|
||||
- row_bytes = width * 4;
|
||||
- data_size = row_bytes * height;
|
||||
- data = g_malloc (data_size);
|
||||
-
|
||||
- if (grabber->have_pixel_buffers == -1)
|
||||
- {
|
||||
- const GLubyte* extensions = glGetString (GL_EXTENSIONS);
|
||||
- grabber->have_pixel_buffers = strstr ((const char *)extensions, "GL_EXT_pixel_buffer_object") != NULL;
|
||||
- grabber->have_pack_invert = strstr ((const char *)extensions, "GL_MESA_pack_invert") != NULL;
|
||||
- }
|
||||
-
|
||||
- if (grabber->have_pixel_buffers)
|
||||
- {
|
||||
- GLubyte *mapped_data;
|
||||
- GLint old_swap_bytes, old_lsb_first, old_row_length, old_skip_pixels, old_skip_rows, old_alignment;
|
||||
- GLint old_pack_invert = GL_FALSE;
|
||||
- GLint vp_size[4];
|
||||
- guchar *src_row, *dest_row;
|
||||
- int i;
|
||||
-
|
||||
- cogl_flush ();
|
||||
-
|
||||
- if (pf_glBindBufferARB == NULL)
|
||||
- {
|
||||
- pf_glBindBufferARB = (PFNGLBINDBUFFERARBPROC) cogl_get_proc_address ("glBindBufferARB");
|
||||
- pf_glBufferDataARB = (PFNGLBUFFERDATAARBPROC) cogl_get_proc_address ("glBufferDataARB");
|
||||
- pf_glDeleteBuffersARB = (PFNGLDELETEBUFFERSARBPROC) cogl_get_proc_address ("glDeleteBuffersARB");
|
||||
- pf_glGenBuffersARB = (PFNGLGENBUFFERSARBPROC) cogl_get_proc_address ("glGenBuffersARB");
|
||||
- pf_glMapBufferARB = (PFNGLMAPBUFFERARBPROC) cogl_get_proc_address ("glMapBufferARB");
|
||||
- pf_glUnmapBufferARB = (PFNGLUNMAPBUFFERARBPROC) cogl_get_proc_address ("glUnmapBufferARB");
|
||||
- }
|
||||
-
|
||||
- glGetIntegerv (GL_PACK_SWAP_BYTES, &old_swap_bytes);
|
||||
- glGetIntegerv (GL_PACK_LSB_FIRST, &old_lsb_first);
|
||||
- glGetIntegerv (GL_PACK_ROW_LENGTH, &old_row_length);
|
||||
- glGetIntegerv (GL_PACK_SKIP_PIXELS, &old_skip_pixels);
|
||||
- glGetIntegerv (GL_PACK_SKIP_ROWS, &old_skip_rows);
|
||||
- glGetIntegerv (GL_PACK_ALIGNMENT, &old_alignment);
|
||||
-
|
||||
- glPixelStorei (GL_PACK_SWAP_BYTES, GL_FALSE);
|
||||
- glPixelStorei (GL_PACK_LSB_FIRST, GL_FALSE);
|
||||
- glPixelStorei (GL_PACK_ROW_LENGTH, 0);
|
||||
- glPixelStorei (GL_PACK_SKIP_PIXELS, 0);
|
||||
- glPixelStorei (GL_PACK_SKIP_ROWS, 0);
|
||||
- glPixelStorei (GL_PACK_ALIGNMENT, 1);
|
||||
-
|
||||
- if (grabber->have_pack_invert)
|
||||
- {
|
||||
- glGetIntegerv (GL_PACK_INVERT_MESA, &old_pack_invert);
|
||||
- glPixelStorei (GL_PACK_INVERT_MESA, GL_FALSE);
|
||||
- }
|
||||
-
|
||||
- if (grabber->pixel_buffer != 0 &&
|
||||
- (grabber->width != width ||
|
||||
- grabber->height != height))
|
||||
- {
|
||||
- pf_glDeleteBuffersARB (1, &grabber->pixel_buffer);
|
||||
- grabber->pixel_buffer = 0;
|
||||
- }
|
||||
-
|
||||
- if (grabber->pixel_buffer == 0)
|
||||
- {
|
||||
- pf_glGenBuffersARB (1, &grabber->pixel_buffer);
|
||||
-
|
||||
- pf_glBindBufferARB (GL_PIXEL_PACK_BUFFER_ARB, grabber->pixel_buffer);
|
||||
- pf_glBufferDataARB (GL_PIXEL_PACK_BUFFER_ARB, data_size, 0, GL_STREAM_READ_ARB);
|
||||
-
|
||||
- grabber->width = width;
|
||||
- grabber->height = height;
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- pf_glBindBufferARB (GL_PIXEL_PACK_BUFFER_ARB, grabber->pixel_buffer);
|
||||
- }
|
||||
-
|
||||
- /* In OpenGL, (x,y) specifies the bottom-left corner rather than the
|
||||
- * top-left */
|
||||
- glGetIntegerv (GL_VIEWPORT, vp_size);
|
||||
- y = vp_size[3] - (y + height);
|
||||
- glReadPixels (x, y, width, height, GL_BGRA, GL_UNSIGNED_BYTE, 0);
|
||||
-
|
||||
- mapped_data = pf_glMapBufferARB (GL_PIXEL_PACK_BUFFER_ARB, GL_READ_ONLY_ARB);
|
||||
-
|
||||
- src_row = mapped_data + (height - 1) * row_bytes;
|
||||
- dest_row = data;
|
||||
-
|
||||
- for (i = 0; i < height; i++)
|
||||
- {
|
||||
- memcpy (dest_row, src_row, row_bytes);
|
||||
- src_row -= row_bytes;
|
||||
- dest_row += row_bytes;
|
||||
- }
|
||||
-
|
||||
- pf_glUnmapBufferARB (GL_PIXEL_PACK_BUFFER_ARB);
|
||||
- pf_glBindBufferARB (GL_PIXEL_PACK_BUFFER_ARB, 0);
|
||||
-
|
||||
- glPixelStorei (GL_PACK_SWAP_BYTES, old_swap_bytes);
|
||||
- glPixelStorei (GL_PACK_LSB_FIRST, old_lsb_first);
|
||||
- glPixelStorei (GL_PACK_ROW_LENGTH, old_row_length);
|
||||
- glPixelStorei (GL_PACK_SKIP_PIXELS, old_skip_pixels);
|
||||
- glPixelStorei (GL_PACK_SKIP_ROWS, old_skip_rows);
|
||||
- glPixelStorei (GL_PACK_ALIGNMENT, old_alignment);
|
||||
-
|
||||
- if (grabber->have_pack_invert)
|
||||
- glPixelStorei (GL_PACK_INVERT_MESA, old_pack_invert);
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- cogl_read_pixels (x, y,
|
||||
- width, height,
|
||||
- COGL_READ_PIXELS_COLOR_BUFFER,
|
||||
- CLUTTER_CAIRO_FORMAT_ARGB32,
|
||||
- data);
|
||||
- }
|
||||
-
|
||||
- return data;
|
||||
-}
|
||||
Index: gnome-shell-3.3.92/src/shell-screen-grabber.h
|
||||
===================================================================
|
||||
--- gnome-shell-3.3.92.orig/src/shell-screen-grabber.h 2012-01-31 12:47:19.000000000 -0300
|
||||
+++ /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
@@ -1,44 +0,0 @@
|
||||
-/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
-#ifndef __SHELL_SCREEN_GRABBER_H__
|
||||
-#define __SHELL_SCREEN_GRABBER_H__
|
||||
-
|
||||
-#include <glib-object.h>
|
||||
-
|
||||
-G_BEGIN_DECLS
|
||||
-
|
||||
-/**
|
||||
- * SECTION:shell-screen-grabber
|
||||
- * @short_description: Grab pixel data from the screen
|
||||
- *
|
||||
- * The #ShellScreenGrabber object is used to download previous drawn
|
||||
- * content to the screen. It internally uses pixel-buffer objects if
|
||||
- * available, otherwise falls back to cogl_read_pixels().
|
||||
- *
|
||||
- * If you are repeatedly grabbing images of the same size from the
|
||||
- * screen, it makes sense to create one #ShellScreenGrabber and keep
|
||||
- * it around. Otherwise, it's fine to simply create one as needed and
|
||||
- * then get rid of it.
|
||||
- */
|
||||
-
|
||||
-typedef struct _ShellScreenGrabber ShellScreenGrabber;
|
||||
-typedef struct _ShellScreenGrabberClass ShellScreenGrabberClass;
|
||||
-
|
||||
-#define SHELL_TYPE_SCREEN_GRABBER (shell_screen_grabber_get_type ())
|
||||
-#define SHELL_SCREEN_GRABBER(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), SHELL_TYPE_SCREEN_GRABBER, ShellScreenGrabber))
|
||||
-#define SHELL_SCREEN_GRABBER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SHELL_TYPE_SCREEN_GRABBER, ShellScreenGrabberClass))
|
||||
-#define SHELL_IS_SCREEN_GRABBER(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), SHELL_TYPE_SCREEN_GRABBER))
|
||||
-#define SHELL_IS_SCREEN_GRABBER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SHELL_TYPE_SCREEN_GRABBER))
|
||||
-#define SHELL_SCREEN_GRABBER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SHELL_TYPE_SCREEN_GRABBER, ShellScreenGrabberClass))
|
||||
-
|
||||
-GType shell_screen_grabber_get_type (void) G_GNUC_CONST;
|
||||
-
|
||||
-ShellScreenGrabber *shell_screen_grabber_new (void);
|
||||
-guchar * shell_screen_grabber_grab (ShellScreenGrabber *grabber,
|
||||
- int x,
|
||||
- int y,
|
||||
- int width,
|
||||
- int height);
|
||||
-
|
||||
-G_END_DECLS
|
||||
-
|
||||
-#endif /* __SHELL_SCREEN_GRABBER_H__ */
|
||||
Index: gnome-shell-3.3.92/src/shell-screenshot.c
|
||||
===================================================================
|
||||
--- gnome-shell-3.3.92.orig/src/shell-screenshot.c 2012-02-16 14:17:56.000000000 -0300
|
||||
+++ gnome-shell-3.3.92/src/shell-screenshot.c 2012-03-23 18:02:06.568161680 -0300
|
||||
@@ -1,5 +1,8 @@
|
||||
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
|
||||
|
||||
+#define COGL_ENABLE_EXPERIMENTAL_API
|
||||
+#define CLUTTER_ENABLE_EXPERIMENTAL_API
|
||||
+
|
||||
#include <X11/extensions/Xfixes.h>
|
||||
#include <clutter/x11/clutter-x11.h>
|
||||
#include <clutter/clutter.h>
|
||||
@@ -10,7 +13,6 @@
|
||||
#include <meta/meta-shaped-texture.h>
|
||||
|
||||
#include "shell-global.h"
|
||||
-#include "shell-screen-grabber.h"
|
||||
#include "shell-screenshot.h"
|
||||
|
||||
struct _ShellScreenshotClass
|
||||
@@ -97,18 +99,33 @@
|
||||
int width,
|
||||
int height)
|
||||
{
|
||||
- ShellScreenGrabber *grabber;
|
||||
- static const cairo_user_data_key_t key;
|
||||
+ CoglBitmap *bitmap;
|
||||
+ ClutterBackend *backend;
|
||||
+ CoglContext *context;
|
||||
+ int stride;
|
||||
guchar *data;
|
||||
|
||||
- grabber = shell_screen_grabber_new ();
|
||||
- data = shell_screen_grabber_grab (grabber, x, y, width, height);
|
||||
- g_object_unref (grabber);
|
||||
-
|
||||
- screenshot_data->image = cairo_image_surface_create_for_data (data, CAIRO_FORMAT_RGB24,
|
||||
- width, height, width * 4);
|
||||
- cairo_surface_set_user_data (screenshot_data->image, &key,
|
||||
- data, (cairo_destroy_func_t)g_free);
|
||||
+ backend = clutter_get_default_backend ();
|
||||
+ context = clutter_backend_get_cogl_context (backend);
|
||||
+
|
||||
+ screenshot_data->image = cairo_image_surface_create (CAIRO_FORMAT_RGB24,
|
||||
+ width, height);
|
||||
+
|
||||
+
|
||||
+ data = cairo_image_surface_get_data (screenshot_data->image);
|
||||
+ stride = cairo_image_surface_get_stride (screenshot_data->image);
|
||||
+
|
||||
+ bitmap = cogl_bitmap_new_for_data (context,
|
||||
+ width,
|
||||
+ height,
|
||||
+ CLUTTER_CAIRO_FORMAT_ARGB32,
|
||||
+ stride,
|
||||
+ data);
|
||||
+ cogl_framebuffer_read_pixels_into_bitmap (cogl_get_draw_framebuffer (),
|
||||
+ x, y,
|
||||
+ COGL_READ_PIXELS_COLOR_BUFFER,
|
||||
+ bitmap);
|
||||
+ cogl_object_unref (bitmap);
|
||||
}
|
||||
|
||||
static void
|
||||
Index: gnome-shell-3.3.92/src/Makefile.am
|
||||
===================================================================
|
||||
--- gnome-shell-3.3.92.orig/src/Makefile.am 2012-03-23 18:02:06.100159361 -0300
|
||||
+++ gnome-shell-3.3.92/src/Makefile.am 2012-03-23 18:03:21.352532519 -0300
|
||||
@@ -115,7 +115,6 @@
|
||||
shell-network-agent.h \
|
||||
shell-perf-log.h \
|
||||
shell-screenshot.h \
|
||||
- shell-screen-grabber.h \
|
||||
shell-slicer.h \
|
||||
shell-stack.h \
|
||||
shell-tp-client.h \
|
||||
@@ -164,7 +163,6 @@
|
||||
shell-polkit-authentication-agent.h \
|
||||
shell-polkit-authentication-agent.c \
|
||||
shell-screenshot.c \
|
||||
- shell-screen-grabber.c \
|
||||
shell-slicer.c \
|
||||
shell-stack.c \
|
||||
shell-tp-client.c \
|
||||
@@ -230,8 +228,6 @@
|
||||
|
||||
test_recorder_SOURCES = \
|
||||
$(shell_recorder_sources) $(shell_recorder_private_sources) \
|
||||
- shell-screen-grabber.c \
|
||||
- shell-screen-grabber.h \
|
||||
test-recorder.c
|
||||
endif BUILD_RECORDER
|
||||
|
||||
25
gnome-base/gnome-shell/files/33_remove_glx_headers.patch
Normal file
25
gnome-base/gnome-shell/files/33_remove_glx_headers.patch
Normal file
@@ -0,0 +1,25 @@
|
||||
From: Ricardo Salveti de Araujo <ricardo.salveti@linaro.org>
|
||||
Subject: Don't generically include the GL headers.
|
||||
|
||||
The patch "Don't try to use GLX if Cogl isn't using that Winsys" removes
|
||||
the direct symbol usage of GLX elements, but the header is still being
|
||||
included by default. At an environment with both GL and GLES headers
|
||||
available, the build option for GLES will fail because of headers
|
||||
conflict between them.
|
||||
|
||||
Bug-Ubuntu: https://bugs.launchpad.net/bugs/935124
|
||||
Forwarded: not-needed
|
||||
|
||||
diff --git a/src/gnome-shell-plugin.c b/src/gnome-shell-plugin.c
|
||||
index d6680ed..69c0df5 100644
|
||||
--- a/src/gnome-shell-plugin.c
|
||||
+++ b/src/gnome-shell-plugin.c
|
||||
@@ -32,8 +32,6 @@
|
||||
#define COGL_ENABLE_EXPERIMENTAL_API
|
||||
#include <clutter/clutter.h>
|
||||
#include <clutter/x11/clutter-x11.h>
|
||||
-#include <GL/glx.h>
|
||||
-#include <GL/glxext.h>
|
||||
#include <gjs/gjs.h>
|
||||
#include <meta/display.h>
|
||||
#include <meta/meta-plugin.h>
|
||||
@@ -0,0 +1,44 @@
|
||||
From 84568fa9454f279ff519a2a11174e112786e46db Mon Sep 17 00:00:00 2001
|
||||
From: root <admin@catmur.co.uk>
|
||||
Date: Sun, 8 Jan 2012 13:55:05 +0000
|
||||
Subject: [PATCH] Fix automagic gnome-bluetooth dependency
|
||||
|
||||
https://bugs.gentoo.org/show_bug.cgi?id=398145
|
||||
|
||||
Ed Catmur 2012-01-08 13:46:22 UTC
|
||||
libgnome-bluetooth-applet is a private library so they shouldn't be linking
|
||||
against it anyway. I tried to work out how to tell libtool to add it to rpath
|
||||
but got totally lost.
|
||||
|
||||
I'll see if I can work out how to fix the automagic gnome-bluetooth dependency
|
||||
so I can at least merge USE=-bluetooth.
|
||||
---
|
||||
configure.ac | 5 +++++
|
||||
1 files changed, 5 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 1c64122..a699838 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -127,6 +127,8 @@ PKG_CHECK_MODULES(GVC, libpulse libpulse-mainloop-glib gobject-2.0)
|
||||
PKG_CHECK_MODULES(DESKTOP_SCHEMAS, gsettings-desktop-schemas >= 0.1.7)
|
||||
|
||||
AC_MSG_CHECKING([for bluetooth support])
|
||||
+AC_ARG_WITH([bluetooth], AS_HELP_STRING([--without-bluetooth], [Build without gnome-bluetooth library (default: auto)]))
|
||||
+AS_IF([test "x$with_bluetooth" != "xno"], [
|
||||
PKG_CHECK_EXISTS([gnome-bluetooth-1.0 >= 3.1.0],
|
||||
[BLUETOOTH_DIR=`$PKG_CONFIG --variable=applet_libdir gnome-bluetooth-1.0`
|
||||
BLUETOOTH_LIBS=`$PKG_CONFIG --variable=applet_libs gnome-bluetooth-1.0`
|
||||
@@ -138,6 +140,9 @@ PKG_CHECK_EXISTS([gnome-bluetooth-1.0 >= 3.1.0],
|
||||
[AC_DEFINE([HAVE_BLUETOOTH],[0])
|
||||
AC_SUBST([HAVE_BLUETOOTH],[0])
|
||||
AC_MSG_RESULT([no])])
|
||||
+], [AC_DEFINE([HAVE_BLUETOOTH],[0])
|
||||
+ AC_SUBST([HAVE_BLUETOOTH],[0])
|
||||
+ AC_MSG_RESULT([no])])
|
||||
|
||||
PKG_CHECK_MODULES(CALENDAR_SERVER, libecal-1.2 >= $LIBECAL_MIN_VERSION libedataserver-1.2 >= $LIBEDATASERVER_MIN_VERSION libedataserverui-3.0 >= $LIBEDATASERVERUI_MIN_VERSION gio-2.0)
|
||||
AC_SUBST(CALENDAR_SERVER_CFLAGS)
|
||||
--
|
||||
1.7.8.2
|
||||
|
||||
@@ -0,0 +1,207 @@
|
||||
From df21e761fc02cf1269a7bbee073b8a129cba1dcd Mon Sep 17 00:00:00 2001
|
||||
From: Michael Biebl <biebl@debian.org>
|
||||
Date: Thu, 22 Dec 2011 22:04:12 +0100
|
||||
Subject: [PATCH] Make NM optional
|
||||
|
||||
[ Alexandre Rostovtsev <tetromino@gentoo.org> :
|
||||
* use config.js (and AC_SUBST HAVE_NETWORKMANAGER appropriately);
|
||||
* take care to not import ui.status.network if nm is disabled;
|
||||
* do not try to reassign to const variables;
|
||||
* no point really in fiddling with the list of installed js files;
|
||||
* don't build shell-mobile-providers if nm is disabled;
|
||||
* use "networkmanager" instead of "network_manager" because THE
|
||||
BIKESHED SHOULD BE BLUE, also because the upstream package name is
|
||||
NetworkManager, not Network_Manager. ]
|
||||
---
|
||||
configure.ac | 49 +++++++++++++++++++++++++++++++++++++++++++++++--
|
||||
js/misc/config.js.in | 2 ++
|
||||
js/ui/main.js | 8 ++++++--
|
||||
js/ui/panel.js | 3 ++-
|
||||
src/Makefile.am | 18 +++++++++++++-----
|
||||
5 files changed, 70 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index d1bea62..b972127 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -95,8 +95,41 @@ PKG_CHECK_MODULES(GNOME_SHELL, gio-2.0 >= $GIO_MIN_VERSION
|
||||
libcanberra
|
||||
telepathy-glib >= $TELEPATHY_GLIB_MIN_VERSION
|
||||
telepathy-logger-0.2 >= $TELEPATHY_LOGGER_MIN_VERSION
|
||||
- polkit-agent-1 >= $POLKIT_MIN_VERSION xfixes
|
||||
- libnm-glib libnm-util gnome-keyring-1)
|
||||
+ polkit-agent-1 >= $POLKIT_MIN_VERSION xfixes)
|
||||
+
|
||||
+##########################
|
||||
+# Check for NetworkManager
|
||||
+##########################
|
||||
+NM_MIN_VERSION=0.9
|
||||
+AC_ARG_ENABLE(networkmanager,
|
||||
+ AS_HELP_STRING([--disable-networkmanager],
|
||||
+ [disable NetworkManager support @<:@default=auto@:>@]),,
|
||||
+ [enable_networkmanager=auto])
|
||||
+
|
||||
+if test "x$enable_networkmanager" != "xno"; then
|
||||
+ PKG_CHECK_MODULES(NETWORKMANAGER,
|
||||
+ [libnm-glib libnm-util gnome-keyring-1],
|
||||
+ [have_networkmanager=yes],
|
||||
+ [have_networkmanager=no])
|
||||
+
|
||||
+ GNOME_SHELL_CFLAGS="$GNOME_SHELL_CFLAGS $NETWORKMANAGER_CFLAGS"
|
||||
+ GNOME_SHELL_LIBS="$GNOME_SHELL_LIBS $NETWORKMANAGER_LIBS"
|
||||
+else
|
||||
+ have_networkmanager="no (disabled)"
|
||||
+fi
|
||||
+
|
||||
+if test "x$have_networkmanager" = "xyes"; then
|
||||
+ AC_DEFINE(HAVE_NETWORKMANAGER, [1], [Define if we have NetworkManager])
|
||||
+ AC_SUBST([HAVE_NETWORKMANAGER], [1])
|
||||
+else
|
||||
+ if test "x$enable_networkmanager" = "xyes"; then
|
||||
+ AC_MSG_ERROR([Couldn't find NetworkManager.])
|
||||
+ fi
|
||||
+ AC_SUBST([HAVE_NETWORKMANAGER], [0])
|
||||
+fi
|
||||
+
|
||||
+AM_CONDITIONAL(HAVE_NETWORKMANAGER, test "$have_networkmanager" = "yes")
|
||||
+
|
||||
|
||||
PKG_CHECK_MODULES(SHELL_PERF_HELPER, gtk+-3.0 gio-2.0)
|
||||
|
||||
@@ -256,3 +289,15 @@ AC_CONFIG_FILES([
|
||||
man/Makefile
|
||||
])
|
||||
AC_OUTPUT
|
||||
+
|
||||
+echo "
|
||||
+Build configuration:
|
||||
+
|
||||
+ Prefix: ${prefix}
|
||||
+ Source code location: ${srcdir}
|
||||
+ Compiler: ${CC}
|
||||
+ Compiler Warnings: $enable_compile_warnings
|
||||
+
|
||||
+ Support for NetworkManager: $have_networkmanager
|
||||
+ Support for GStreamer recording: $build_recorder
|
||||
+"
|
||||
diff --git a/js/misc/config.js.in b/js/misc/config.js.in
|
||||
index a35fe28..4a09df6 100644
|
||||
--- a/js/misc/config.js.in
|
||||
+++ b/js/misc/config.js.in
|
||||
@@ -8,5 +8,7 @@ const PACKAGE_VERSION = '@PACKAGE_VERSION@';
|
||||
const GJS_VERSION = '@GJS_VERSION@';
|
||||
/* 1 if gnome-bluetooth is available, 0 otherwise */
|
||||
const HAVE_BLUETOOTH = @HAVE_BLUETOOTH@;
|
||||
+/* 1 if networkmanager is available, 0 otherwise */
|
||||
+const HAVE_NETWORKMANAGER = @HAVE_NETWORKMANAGER@;
|
||||
/* The system TLS CA list */
|
||||
const SHELL_SYSTEM_CA_FILE = '@SHELL_SYSTEM_CA_FILE@';
|
||||
diff --git a/js/ui/main.js b/js/ui/main.js
|
||||
index 4c97440..828911b 100644
|
||||
--- a/js/ui/main.js
|
||||
+++ b/js/ui/main.js
|
||||
@@ -14,6 +14,7 @@ const St = imports.gi.St;
|
||||
|
||||
const AutomountManager = imports.ui.automountManager;
|
||||
const AutorunManager = imports.ui.autorunManager;
|
||||
+const Config = imports.misc.config;
|
||||
const CtrlAltTab = imports.ui.ctrlAltTab;
|
||||
const EndSessionDialog = imports.ui.endSessionDialog;
|
||||
const PolkitAuthenticationAgent = imports.ui.polkitAuthenticationAgent;
|
||||
@@ -27,7 +28,7 @@ const PlaceDisplay = imports.ui.placeDisplay;
|
||||
const RunDialog = imports.ui.runDialog;
|
||||
const Layout = imports.ui.layout;
|
||||
const LookingGlass = imports.ui.lookingGlass;
|
||||
-const NetworkAgent = imports.ui.networkAgent;
|
||||
+const NetworkAgent = Config.HAVE_NETWORKMANAGER ? imports.ui.networkAgent : null;
|
||||
const NotificationDaemon = imports.ui.notificationDaemon;
|
||||
const WindowAttentionHandler = imports.ui.windowAttentionHandler;
|
||||
const Scripting = imports.ui.scripting;
|
||||
@@ -84,7 +85,10 @@ function _createUserSession() {
|
||||
telepathyClient = new TelepathyClient.Client();
|
||||
automountManager = new AutomountManager.AutomountManager();
|
||||
autorunManager = new AutorunManager.AutorunManager();
|
||||
- networkAgent = new NetworkAgent.NetworkAgent();
|
||||
+ if (Config.HAVE_NETWORKMANAGER) {
|
||||
+ networkAgent = new NetworkAgent.NetworkAgent();
|
||||
+ }
|
||||
+
|
||||
}
|
||||
|
||||
function _createGDMSession() {
|
||||
diff --git a/js/ui/panel.js b/js/ui/panel.js
|
||||
index 2f78db9..63e472c 100644
|
||||
--- a/js/ui/panel.js
|
||||
+++ b/js/ui/panel.js
|
||||
@@ -40,7 +40,8 @@ if (Config.HAVE_BLUETOOTH)
|
||||
STANDARD_STATUS_AREA_SHELL_IMPLEMENTATION['bluetooth'] = imports.ui.status.bluetooth.Indicator;
|
||||
|
||||
try {
|
||||
- STANDARD_STATUS_AREA_SHELL_IMPLEMENTATION['network'] = imports.ui.status.network.NMApplet;
|
||||
+ if (Config.HAVE_NETWORKMANAGER)
|
||||
+ STANDARD_STATUS_AREA_SHELL_IMPLEMENTATION['network'] = imports.ui.status.network.NMApplet;
|
||||
} catch(e) {
|
||||
log('NMApplet is not supported. It is possible that your NetworkManager version is too old');
|
||||
}
|
||||
diff --git a/src/Makefile.am b/src/Makefile.am
|
||||
index 4f8a1da..ecf4d13 100644
|
||||
--- a/src/Makefile.am
|
||||
+++ b/src/Makefile.am
|
||||
@@ -108,9 +108,7 @@ shell_public_headers_h = \
|
||||
shell-generic-container.h \
|
||||
shell-gtk-embed.h \
|
||||
shell-global.h \
|
||||
- shell-mobile-providers.h \
|
||||
shell-mount-operation.h \
|
||||
- shell-network-agent.h \
|
||||
shell-perf-log.h \
|
||||
shell-slicer.h \
|
||||
shell-stack.h \
|
||||
@@ -122,6 +120,11 @@ shell_public_headers_h = \
|
||||
shell-wm.h \
|
||||
shell-xfixes-cursor.h
|
||||
|
||||
+if HAVE_NETWORKMANAGER
|
||||
+shell_public_headers_h += shell-mobile-providers.h shell-network-agent.h
|
||||
+endif
|
||||
+
|
||||
+
|
||||
libgnome_shell_la_SOURCES = \
|
||||
$(shell_built_sources) \
|
||||
$(shell_public_headers_h) \
|
||||
@@ -145,9 +148,7 @@ libgnome_shell_la_SOURCES = \
|
||||
shell-generic-container.c \
|
||||
shell-gtk-embed.c \
|
||||
shell-global.c \
|
||||
- shell-mobile-providers.c \
|
||||
shell-mount-operation.c \
|
||||
- shell-network-agent.c \
|
||||
shell-perf-log.c \
|
||||
shell-polkit-authentication-agent.h \
|
||||
shell-polkit-authentication-agent.c \
|
||||
@@ -161,6 +162,10 @@ libgnome_shell_la_SOURCES = \
|
||||
shell-wm.c \
|
||||
shell-xfixes-cursor.c
|
||||
|
||||
+if HAVE_NETWORKMANAGER
|
||||
+libgnome_shell_la_SOURCES += shell-mobile-providers.c shell-network-agent.c
|
||||
+endif
|
||||
+
|
||||
libgnome_shell_la_gir_sources = \
|
||||
$(filter-out %-private.h $(shell_recorder_non_gir_sources), $(shell_public_headers_h) $(libgnome_shell_la_SOURCES))
|
||||
|
||||
@@ -272,7 +277,10 @@ libgnome_shell_la_LIBADD = \
|
||||
libgnome_shell_la_CPPFLAGS = $(gnome_shell_cflags)
|
||||
|
||||
Shell-0.1.gir: libgnome-shell.la St-1.0.gir
|
||||
-Shell_0_1_gir_INCLUDES = Clutter-1.0 ClutterX11-1.0 Meta-3.0 TelepathyGLib-0.12 TelepathyLogger-0.2 Soup-2.4 GMenu-3.0 NetworkManager-1.0 NMClient-1.0 Folks-0.6
|
||||
+Shell_0_1_gir_INCLUDES = Clutter-1.0 ClutterX11-1.0 Meta-3.0 TelepathyGLib-0.12 TelepathyLogger-0.2 Soup-2.4 GMenu-3.0 Folks-0.6
|
||||
+if HAVE_NETWORKMANAGER
|
||||
+Shell_0_1_gir_INCLUDES += NetworkManager-1.0 NMClient-1.0
|
||||
+endif
|
||||
Shell_0_1_gir_CFLAGS = $(libgnome_shell_la_CPPFLAGS) -I $(srcdir)
|
||||
Shell_0_1_gir_LIBS = libgnome-shell.la
|
||||
Shell_0_1_gir_FILES = $(libgnome_shell_la_gir_sources)
|
||||
--
|
||||
1.7.8.3
|
||||
|
||||
42
gnome-base/gnome-shell/files/gnome-shell-3.2.2.1-GLES.patch
Normal file
42
gnome-base/gnome-shell/files/gnome-shell-3.2.2.1-GLES.patch
Normal file
@@ -0,0 +1,42 @@
|
||||
diff -ruNp gnome-shell-3.2.2.1.orig/src/gnome-shell-plugin.c gnome-shell-3.2.2.1/src/gnome-shell-plugin.c
|
||||
--- gnome-shell-3.2.2.1.orig/src/gnome-shell-plugin.c 2012-01-19 23:16:22.000000000 -0600
|
||||
+++ gnome-shell-3.2.2.1/src/gnome-shell-plugin.c 2012-05-10 09:15:04.752169698 -0500
|
||||
@@ -30,8 +30,6 @@
|
||||
|
||||
#include <clutter/clutter.h>
|
||||
#include <clutter/x11/clutter-x11.h>
|
||||
-#include <GL/glx.h>
|
||||
-#include <GL/glxext.h>
|
||||
#include <gjs/gjs.h>
|
||||
#include <meta/display.h>
|
||||
#include <meta/meta-plugin.h>
|
||||
@@ -146,14 +144,18 @@ static void
|
||||
gnome_shell_plugin_start (MetaPlugin *plugin)
|
||||
{
|
||||
GnomeShellPlugin *shell_plugin = GNOME_SHELL_PLUGIN (plugin);
|
||||
+#if 0
|
||||
MetaScreen *screen;
|
||||
MetaDisplay *display;
|
||||
Display *xdisplay;
|
||||
+#endif
|
||||
GError *error = NULL;
|
||||
int status;
|
||||
+#if 0
|
||||
const char *glx_extensions;
|
||||
+#endif
|
||||
GjsContext *gjs_context;
|
||||
-
|
||||
+#if 0
|
||||
screen = meta_plugin_get_screen (plugin);
|
||||
display = meta_screen_get_display (screen);
|
||||
|
||||
@@ -166,7 +168,8 @@ gnome_shell_plugin_start (MetaPlugin *pl
|
||||
glx_extensions = glXQueryExtensionsString (xdisplay,
|
||||
meta_screen_get_screen_number (screen));
|
||||
shell_plugin->have_swap_event = strstr (glx_extensions, "GLX_INTEL_swap_event") != NULL;
|
||||
-
|
||||
+#endif
|
||||
+ shell_plugin->have_swap_event = 0;
|
||||
shell_perf_log_define_event (shell_perf_log_get_default (),
|
||||
"glx.swapComplete",
|
||||
"GL buffer swap complete event received (with timestamp of completion)",
|
||||
@@ -0,0 +1,30 @@
|
||||
From 73f565d27166420bbf4a7bb49a30ea5bf5d98566 Mon Sep 17 00:00:00 2001
|
||||
From: "Owen W. Taylor" <otaylor@fishsoup.net>
|
||||
Date: Wed, 4 Apr 2012 17:48:47 -0400
|
||||
Subject: [PATCH] Link the gnome-shell binary to libgnome-shell-js.so
|
||||
|
||||
Depending on the exact linker options and versions, rpath's written
|
||||
into the binary may, or may not, be honored by dlopen(). Work around
|
||||
this by simply linking the gnome-shell binary to gnome-shell-js, since
|
||||
then dlopen() doesn't need to search paths.
|
||||
|
||||
https://bugzilla.gnome.org/show_bug.cgi?id=670477
|
||||
---
|
||||
src/Makefile.am | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/Makefile.am b/src/Makefile.am
|
||||
index 95f1a41..7bafb6a 100644
|
||||
--- a/src/Makefile.am
|
||||
+++ b/src/Makefile.am
|
||||
@@ -187,7 +187,7 @@ libgnome_shell_la_gir_sources = \
|
||||
gnome_shell_real_SOURCES = \
|
||||
main.c
|
||||
gnome_shell_real_CPPFLAGS = $(gnome_shell_cflags)
|
||||
-gnome_shell_real_LDADD = libgnome-shell.la $(libgnome_shell_la_LIBADD)
|
||||
+gnome_shell_real_LDADD = libgnome-shell.la libgnome-shell-js.la $(libgnome_shell_la_LIBADD)
|
||||
gnome_shell_real_DEPENDENCIES = libgnome-shell.la
|
||||
|
||||
EXTRA_DIST += test-gapplication.js
|
||||
--
|
||||
1.7.9.3
|
||||
@@ -0,0 +1,43 @@
|
||||
From 6fa762baaee77c9d1a8aacc758ab5c3c3c33df43 Mon Sep 17 00:00:00 2001
|
||||
From: Alexandre Rostovtsev <tetromino@gentoo.org>
|
||||
Date: Fri, 6 Apr 2012 14:00:48 -0400
|
||||
Subject: [PATCH] Prevent the link to libgnome-shell-js.so from being removed
|
||||
|
||||
Add a dummy call to shell_js_add_extension_importer() to ensure that the
|
||||
link to libgnome-shell-js.so is not removed when using -Wl,--as-needed,
|
||||
which is the default on many distros.
|
||||
---
|
||||
src/main.c | 13 +++++++++++++
|
||||
1 files changed, 13 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/src/main.c b/src/main.c
|
||||
index bac9524..c11c8d7 100644
|
||||
--- a/src/main.c
|
||||
+++ b/src/main.c
|
||||
@@ -24,6 +24,7 @@
|
||||
#include "shell-a11y.h"
|
||||
#include "shell-global.h"
|
||||
#include "shell-global-private.h"
|
||||
+#include "shell-js.h"
|
||||
#include "shell-perf-log.h"
|
||||
#include "st.h"
|
||||
|
||||
@@ -342,3 +343,15 @@ main (int argc, char **argv)
|
||||
|
||||
return ecode;
|
||||
}
|
||||
+
|
||||
+/* HACK:
|
||||
+ Add a dummy function that calls into libgnome-shell-js.so to ensure it's
|
||||
+ linked to /usr/bin/gnome-shell even when linking with --as-needed.
|
||||
+ This function is never actually called.
|
||||
+ https://bugzilla.gnome.org/show_bug.cgi?id=670477
|
||||
+*/
|
||||
+
|
||||
+void _shell_link_to_shell_js(void) {
|
||||
+ shell_js_add_extension_importer (NULL, NULL, NULL, NULL);
|
||||
+}
|
||||
+
|
||||
--
|
||||
1.7.8.5
|
||||
|
||||
@@ -0,0 +1,220 @@
|
||||
From 411d751935c9bdc485b113678284edf0cc9e545e Mon Sep 17 00:00:00 2001
|
||||
From: Michael Biebl <biebl@debian.org>
|
||||
Date: Thu, 22 Dec 2011 22:04:12 +0100
|
||||
Subject: [PATCH] Make NM optional
|
||||
|
||||
[ Alexandre Rostovtsev <tetromino@gentoo.org> :
|
||||
* use config.js (and AC_SUBST HAVE_NETWORKMANAGER appropriately);
|
||||
* take care to not import ui.status.network if nm is disabled;
|
||||
* do not try to reassign to const variables;
|
||||
* no point really in fiddling with the list of installed js files;
|
||||
* don't build shell-mobile-providers if nm is disabled;
|
||||
* use "networkmanager" instead of "network_manager" because THE
|
||||
BIKESHED SHOULD BE BLUE, also because the upstream package name is
|
||||
NetworkManager, not Network_Manager. ]
|
||||
---
|
||||
configure.ac | 47 ++++++++++++++++++++++++++++++++++++++++++++++-
|
||||
js/Makefile.am | 1 +
|
||||
js/misc/config.js.in | 2 ++
|
||||
js/ui/main.js | 8 ++++++--
|
||||
js/ui/panel.js | 3 ++-
|
||||
src/Makefile.am | 17 ++++++++++++-----
|
||||
6 files changed, 69 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index c6ad636..f228ebd 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -94,9 +94,42 @@ PKG_CHECK_MODULES(GNOME_SHELL, gio-unix-2.0 >= $GIO_MIN_VERSION
|
||||
telepathy-glib >= $TELEPATHY_GLIB_MIN_VERSION
|
||||
telepathy-logger-0.2 >= $TELEPATHY_LOGGER_MIN_VERSION
|
||||
polkit-agent-1 >= $POLKIT_MIN_VERSION xfixes
|
||||
- libnm-glib libnm-util gnome-keyring-1
|
||||
+ gnome-keyring-1
|
||||
gcr-3 >= $GCR_MIN_VERSION)
|
||||
|
||||
+##########################
|
||||
+# Check for NetworkManager
|
||||
+##########################
|
||||
+NM_MIN_VERSION=0.9
|
||||
+AC_ARG_ENABLE(networkmanager,
|
||||
+ AS_HELP_STRING([--disable-networkmanager],
|
||||
+ [disable NetworkManager support @<:@default=auto@:>@]),,
|
||||
+ [enable_networkmanager=auto])
|
||||
+
|
||||
+if test "x$enable_networkmanager" != "xno"; then
|
||||
+ PKG_CHECK_MODULES(NETWORKMANAGER,
|
||||
+ [libnm-glib libnm-util gnome-keyring-1],
|
||||
+ [have_networkmanager=yes],
|
||||
+ [have_networkmanager=no])
|
||||
+
|
||||
+ GNOME_SHELL_CFLAGS="$GNOME_SHELL_CFLAGS $NETWORKMANAGER_CFLAGS"
|
||||
+ GNOME_SHELL_LIBS="$GNOME_SHELL_LIBS $NETWORKMANAGER_LIBS"
|
||||
+else
|
||||
+ have_networkmanager="no (disabled)"
|
||||
+fi
|
||||
+
|
||||
+if test "x$have_networkmanager" = "xyes"; then
|
||||
+ AC_DEFINE(HAVE_NETWORKMANAGER, [1], [Define if we have NetworkManager])
|
||||
+ AC_SUBST([HAVE_NETWORKMANAGER], [1])
|
||||
+else
|
||||
+ if test "x$enable_networkmanager" = "xyes"; then
|
||||
+ AC_MSG_ERROR([Couldn't find NetworkManager.])
|
||||
+ fi
|
||||
+ AC_SUBST([HAVE_NETWORKMANAGER], [0])
|
||||
+fi
|
||||
+
|
||||
+AM_CONDITIONAL(HAVE_NETWORKMANAGER, test "$have_networkmanager" = "yes")
|
||||
+
|
||||
PKG_CHECK_MODULES(SHELL_PERF_HELPER, gtk+-3.0 gio-2.0)
|
||||
|
||||
PKG_CHECK_MODULES(SHELL_HOTPLUG_SNIFFER, gio-2.0 gdk-pixbuf-2.0)
|
||||
@@ -289,3 +322,15 @@ AC_CONFIG_FILES([
|
||||
man/Makefile
|
||||
])
|
||||
AC_OUTPUT
|
||||
+
|
||||
+echo "
|
||||
+Build configuration:
|
||||
+
|
||||
+ Prefix: ${prefix}
|
||||
+ Source code location: ${srcdir}
|
||||
+ Compiler: ${CC}
|
||||
+ Compiler Warnings: $enable_compile_warnings
|
||||
+
|
||||
+ Support for NetworkManager: $have_networkmanager
|
||||
+ Support for GStreamer recording: $build_recorder
|
||||
+"
|
||||
diff --git a/js/Makefile.am b/js/Makefile.am
|
||||
index e7751cc..5eb4c18 100644
|
||||
--- a/js/Makefile.am
|
||||
+++ b/js/Makefile.am
|
||||
@@ -8,6 +8,7 @@ misc/config.js: misc/config.js.in Makefile
|
||||
-e "s|[@]PACKAGE_VERSION@|$(PACKAGE_VERSION)|g" \
|
||||
-e "s|[@]GJS_VERSION@|$(GJS_VERSION)|g" \
|
||||
-e "s|[@]HAVE_BLUETOOTH@|$(HAVE_BLUETOOTH)|g" \
|
||||
+ -e "s|[@]HAVE_NETWORKMANAGER@|$(HAVE_NETWORKMANAGER)|g" \
|
||||
-e "s|[@]SHELL_SYSTEM_CA_FILE@|$(SHELL_SYSTEM_CA_FILE)|g" \
|
||||
-e "s|[@]GETTEXT_PACKAGE@|$(GETTEXT_PACKAGE)|g" \
|
||||
-e "s|[@]datadir@|$(datadir)|g" \
|
||||
diff --git a/js/misc/config.js.in b/js/misc/config.js.in
|
||||
index 4a0db16..3df3394 100644
|
||||
--- a/js/misc/config.js.in
|
||||
+++ b/js/misc/config.js.in
|
||||
@@ -8,6 +8,8 @@ const PACKAGE_VERSION = '@PACKAGE_VERSION@';
|
||||
const GJS_VERSION = '@GJS_VERSION@';
|
||||
/* 1 if gnome-bluetooth is available, 0 otherwise */
|
||||
const HAVE_BLUETOOTH = @HAVE_BLUETOOTH@;
|
||||
+/* 1 if networkmanager is available, 0 otherwise */
|
||||
+const HAVE_NETWORKMANAGER = @HAVE_NETWORKMANAGER@;
|
||||
/* The system TLS CA list */
|
||||
const SHELL_SYSTEM_CA_FILE = '@SHELL_SYSTEM_CA_FILE@';
|
||||
/* gettext package */
|
||||
diff --git a/js/ui/main.js b/js/ui/main.js
|
||||
index ac9330c..7ca91ee 100644
|
||||
--- a/js/ui/main.js
|
||||
+++ b/js/ui/main.js
|
||||
@@ -12,6 +12,7 @@ const St = imports.gi.St;
|
||||
|
||||
const AutomountManager = imports.ui.automountManager;
|
||||
const AutorunManager = imports.ui.autorunManager;
|
||||
+const Config = imports.misc.config;
|
||||
const CtrlAltTab = imports.ui.ctrlAltTab;
|
||||
const EndSessionDialog = imports.ui.endSessionDialog;
|
||||
const PolkitAuthenticationAgent = imports.ui.polkitAuthenticationAgent;
|
||||
@@ -26,7 +27,7 @@ const PlaceDisplay = imports.ui.placeDisplay;
|
||||
const RunDialog = imports.ui.runDialog;
|
||||
const Layout = imports.ui.layout;
|
||||
const LookingGlass = imports.ui.lookingGlass;
|
||||
-const NetworkAgent = imports.ui.networkAgent;
|
||||
+const NetworkAgent = Config.HAVE_NETWORKMANAGER ? imports.ui.networkAgent : null;
|
||||
const NotificationDaemon = imports.ui.notificationDaemon;
|
||||
const WindowAttentionHandler = imports.ui.windowAttentionHandler;
|
||||
const Scripting = imports.ui.scripting;
|
||||
@@ -85,7 +86,10 @@ function _createUserSession() {
|
||||
telepathyClient = new TelepathyClient.Client();
|
||||
automountManager = new AutomountManager.AutomountManager();
|
||||
autorunManager = new AutorunManager.AutorunManager();
|
||||
- networkAgent = new NetworkAgent.NetworkAgent();
|
||||
+ if (Config.HAVE_NETWORKMANAGER) {
|
||||
+ networkAgent = new NetworkAgent.NetworkAgent();
|
||||
+ }
|
||||
+
|
||||
}
|
||||
|
||||
function _createGDMSession() {
|
||||
diff --git a/js/ui/panel.js b/js/ui/panel.js
|
||||
index 329f118..865ce05 100644
|
||||
--- a/js/ui/panel.js
|
||||
+++ b/js/ui/panel.js
|
||||
@@ -45,7 +45,8 @@ if (Config.HAVE_BLUETOOTH)
|
||||
STANDARD_STATUS_AREA_SHELL_IMPLEMENTATION['bluetooth'] = imports.ui.status.bluetooth.Indicator;
|
||||
|
||||
try {
|
||||
- STANDARD_STATUS_AREA_SHELL_IMPLEMENTATION['network'] = imports.ui.status.network.NMApplet;
|
||||
+ if (Config.HAVE_NETWORKMANAGER)
|
||||
+ STANDARD_STATUS_AREA_SHELL_IMPLEMENTATION['network'] = imports.ui.status.network.NMApplet;
|
||||
} catch(e) {
|
||||
log('NMApplet is not supported. It is possible that your NetworkManager version is too old');
|
||||
}
|
||||
diff --git a/src/Makefile.am b/src/Makefile.am
|
||||
index 95f1a41..637455e 100644
|
||||
--- a/src/Makefile.am
|
||||
+++ b/src/Makefile.am
|
||||
@@ -110,9 +110,7 @@ shell_public_headers_h = \
|
||||
shell-gtk-embed.h \
|
||||
shell-global.h \
|
||||
shell-idle-monitor.h \
|
||||
- shell-mobile-providers.h \
|
||||
shell-mount-operation.h \
|
||||
- shell-network-agent.h \
|
||||
shell-perf-log.h \
|
||||
shell-screenshot.h \
|
||||
shell-screen-grabber.h \
|
||||
@@ -134,6 +132,10 @@ shell_private_sources = \
|
||||
gactionobserver.h \
|
||||
gactionobserver.c
|
||||
|
||||
+if HAVE_NETWORKMANAGER
|
||||
+shell_public_headers_h += shell-mobile-providers.h shell-network-agent.h
|
||||
+endif
|
||||
+
|
||||
libgnome_shell_la_SOURCES = \
|
||||
$(shell_built_sources) \
|
||||
$(shell_public_headers_h) \
|
||||
@@ -159,9 +161,7 @@ libgnome_shell_la_SOURCES = \
|
||||
shell-idle-monitor.c \
|
||||
shell-keyring-prompt.h \
|
||||
shell-keyring-prompt.c \
|
||||
- shell-mobile-providers.c \
|
||||
shell-mount-operation.c \
|
||||
- shell-network-agent.c \
|
||||
shell-perf-log.c \
|
||||
shell-polkit-authentication-agent.h \
|
||||
shell-polkit-authentication-agent.c \
|
||||
@@ -181,6 +181,10 @@ libgnome_shell_la_SOURCES = \
|
||||
$(NULL)
|
||||
|
||||
|
||||
+if HAVE_NETWORKMANAGER
|
||||
+libgnome_shell_la_SOURCES += shell-mobile-providers.c shell-network-agent.c
|
||||
+endif
|
||||
+
|
||||
libgnome_shell_la_gir_sources = \
|
||||
$(filter-out %-private.h $(shell_private_sources), $(shell_public_headers_h) $(libgnome_shell_la_SOURCES))
|
||||
|
||||
@@ -296,7 +300,10 @@ libgnome_shell_la_LIBADD = \
|
||||
libgnome_shell_la_CPPFLAGS = $(gnome_shell_cflags)
|
||||
|
||||
Shell-0.1.gir: libgnome-shell.la St-1.0.gir
|
||||
-Shell_0_1_gir_INCLUDES = Clutter-1.0 ClutterX11-1.0 Meta-3.0 TelepathyGLib-0.12 TelepathyLogger-0.2 Soup-2.4 GMenu-3.0 NetworkManager-1.0 NMClient-1.0 Folks-0.6
|
||||
+Shell_0_1_gir_INCLUDES = Clutter-1.0 ClutterX11-1.0 Meta-3.0 TelepathyGLib-0.12 TelepathyLogger-0.2 Soup-2.4 GMenu-3.0 Folks-0.6
|
||||
+if HAVE_NETWORKMANAGER
|
||||
+Shell_0_1_gir_INCLUDES += NetworkManager-1.0 NMClient-1.0
|
||||
+endif
|
||||
Shell_0_1_gir_CFLAGS = $(libgnome_shell_la_CPPFLAGS) -I $(srcdir)
|
||||
Shell_0_1_gir_LIBS = libgnome-shell.la
|
||||
Shell_0_1_gir_FILES = $(libgnome_shell_la_gir_sources)
|
||||
--
|
||||
1.7.8.5
|
||||
|
||||
201
gnome-base/gnome-shell/gnome-shell-3.2.2.1.ebuild
Normal file
201
gnome-base/gnome-shell/gnome-shell-3.2.2.1.ebuild
Normal file
@@ -0,0 +1,201 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/gnome-base/gnome-shell/gnome-shell-3.2.2.1.ebuild,v 1.4 2012/05/05 05:38:12 jdhore Exp $
|
||||
|
||||
EAPI="4"
|
||||
GCONF_DEBUG="no"
|
||||
GNOME2_LA_PUNT="yes"
|
||||
PYTHON_DEPEND="2:2.5"
|
||||
|
||||
inherit autotools eutils gnome2 multilib pax-utils python
|
||||
|
||||
DESCRIPTION="Provides core UI functions for the GNOME 3 desktop"
|
||||
HOMEPAGE="http://live.gnome.org/GnomeShell"
|
||||
|
||||
SRC_URI="${SRC_URI}
|
||||
http://dev.gentoo.org/~tetromino/distfiles/${PN}/${P}-patches-1.tar.xz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
IUSE="+bluetooth +networkmanager"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
|
||||
# gnome-desktop-2.91.2 is needed due to header changes, db82a33 in gnome-desktop
|
||||
# latest gsettings-desktop-schemas is needed due to commit 602fa1c6
|
||||
# latest g-c-c is needed due to https://bugs.gentoo.org/show_bug.cgi?id=360057
|
||||
# libXfixes-5.0 needed for pointer barriers
|
||||
COMMON_DEPEND=">=dev-libs/glib-2.25.9:2
|
||||
>=dev-libs/gjs-1.29.18
|
||||
>=dev-libs/gobject-introspection-0.10.1
|
||||
x11-libs/gdk-pixbuf:2[introspection]
|
||||
>=x11-libs/gtk+-3.0.0:3[introspection]
|
||||
>=media-libs/clutter-1.7.5:1.0[introspection]
|
||||
app-misc/ca-certificates
|
||||
>=dev-libs/folks-0.5.2
|
||||
>=dev-libs/json-glib-0.13.2
|
||||
>=gnome-base/gnome-desktop-2.91.2:3
|
||||
>=gnome-base/gsettings-desktop-schemas-2.91.91
|
||||
>=gnome-extra/evolution-data-server-2.91.6
|
||||
>=media-libs/gstreamer-0.10.16:0.10
|
||||
>=media-libs/gst-plugins-base-0.10.16:0.10
|
||||
>=net-im/telepathy-logger-0.2.4[introspection]
|
||||
net-libs/libsoup:2.4[introspection]
|
||||
>=net-libs/telepathy-glib-0.15.5[introspection]
|
||||
>=sys-auth/polkit-0.100[introspection]
|
||||
>=x11-wm/mutter-3.2.1[introspection]
|
||||
|
||||
dev-libs/dbus-glib
|
||||
dev-libs/libxml2:2
|
||||
x11-libs/pango[introspection]
|
||||
>=dev-libs/libcroco-0.6.2:0.6
|
||||
|
||||
gnome-base/gconf:2[introspection]
|
||||
>=gnome-base/gnome-menus-2.29.10:3[introspection]
|
||||
gnome-base/librsvg
|
||||
media-libs/libcanberra
|
||||
media-sound/pulseaudio
|
||||
|
||||
>=x11-libs/startup-notification-0.11
|
||||
x11-libs/libX11
|
||||
>=x11-libs/libXfixes-5.0
|
||||
x11-apps/mesa-progs
|
||||
|
||||
bluetooth? ( >=net-wireless/gnome-bluetooth-3.1.0[introspection] )
|
||||
networkmanager? (
|
||||
gnome-base/libgnome-keyring
|
||||
>=net-misc/networkmanager-0.8.999[introspection] )"
|
||||
# Runtime-only deps are probably incomplete and approximate.
|
||||
# Each block:
|
||||
# 1. Pull in polkit-0.101 for pretty authorization dialogs
|
||||
# 2. Introspection stuff + dconf needed via imports.gi.*
|
||||
# 3. gnome-session is needed for gnome-session-quit
|
||||
# 4. Control shell settings
|
||||
# 5. accountsservice is needed for GdmUserManager (0.6.14 needed for fast
|
||||
# user switching with gdm-3.1.x)
|
||||
# 6. caribou needed for on-screen keyboard
|
||||
# 7. xdg-utils needed for xdg-open, used by extension tool
|
||||
# 8. gnome-icon-theme-symbolic neeed for various icons
|
||||
# 9. mobile-broadband-provider-info, timezone-data for shell-mobile-providers.c
|
||||
RDEPEND="${COMMON_DEPEND}
|
||||
>=sys-auth/polkit-0.101[introspection]
|
||||
|
||||
>=gnome-base/dconf-0.4.1
|
||||
>=gnome-base/libgnomekbd-2.91.4[introspection]
|
||||
sys-power/upower[introspection]
|
||||
|
||||
>=gnome-base/gnome-session-2.91.91
|
||||
|
||||
>=gnome-base/gnome-settings-daemon-2.91
|
||||
>=gnome-base/gnome-control-center-2.91.92-r1
|
||||
|
||||
>=sys-apps/accountsservice-0.6.14[introspection]
|
||||
|
||||
>=app-accessibility/caribou-0.3
|
||||
|
||||
x11-misc/xdg-utils
|
||||
|
||||
x11-themes/gnome-icon-theme-symbolic
|
||||
|
||||
networkmanager? (
|
||||
net-misc/mobile-broadband-provider-info
|
||||
sys-libs/timezone-data )"
|
||||
DEPEND="${COMMON_DEPEND}
|
||||
>=sys-devel/gettext-0.17
|
||||
virtual/pkgconfig
|
||||
>=dev-util/intltool-0.40
|
||||
gnome-base/gnome-common
|
||||
!!=dev-lang/spidermonkey-1.8.2*"
|
||||
# libmozjs.so is picked up from /usr/lib while compiling, so block at build-time
|
||||
# https://bugs.gentoo.org/show_bug.cgi?id=360413
|
||||
|
||||
pkg_setup() {
|
||||
DOCS="AUTHORS NEWS README"
|
||||
# Don't error out on warnings
|
||||
G2CONF="${G2CONF}
|
||||
--enable-compile-warnings=maximum
|
||||
--disable-schemas-compile
|
||||
--disable-jhbuild-wrapper-script
|
||||
$(use_with bluetooth)
|
||||
$(use_enable networkmanager)
|
||||
--with-ca-certificates=${EPREFIX}/etc/ssl/certs/ca-certificates.crt
|
||||
BROWSER_PLUGIN_DIR=${EPREFIX}/usr/$(get_libdir)/nsbrowser/plugins"
|
||||
python_set_active_version 2
|
||||
python_pkg_setup
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# Useful patches from git master (not in gnome-3-2 branch yet)
|
||||
epatch ../patch/*.patch
|
||||
|
||||
# Fix automagic gnome-bluetooth dep, bug #398145
|
||||
epatch "${FILESDIR}/${PN}-3.2.1-automagic-gnome-bluetooth.patch"
|
||||
|
||||
# Make networkmanager optional, bug #398593
|
||||
epatch "${FILESDIR}/${PN}-3.2.1-optional-networkmanager.patch"
|
||||
|
||||
if use arm; then
|
||||
#epatch "${FILESDIR}/30_use-glx-if-cogl-supports.patch"
|
||||
#epatch "${FILESDIR}/31_don-t-link-directly-to-libGL.patch"
|
||||
#epatch "${FILESDIR}/32_remove-shell-screen-grabber.patch"
|
||||
#epatch "${FILESDIR}/33_remove_glx_headers.patch"
|
||||
epatch "${FILESDIR}/${PN}-3.2.2.1-GLES.patch"
|
||||
fi
|
||||
|
||||
eautoreconf
|
||||
gnome2_src_prepare
|
||||
|
||||
# Drop G_DISABLE_DEPRECATED for sanity on glib upgrades; bug #384765
|
||||
# Note: sed Makefile.in because it is generated from several Makefile.ams
|
||||
sed -e 's/-DG_DISABLE_DEPRECATED//g' \
|
||||
-i src/Makefile.in browser-plugin/Makefile.in || die "sed failed"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
gnome2_src_install
|
||||
python_convert_shebangs 2 "${ED}/usr/bin/gnome-shell-extension-tool"
|
||||
|
||||
# Required for gnome-shell on hardened/PaX, bug #398941
|
||||
pax-mark mr "${ED}usr/bin/gnome-shell"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
gnome2_pkg_postinst
|
||||
|
||||
if ! has_version '>=media-libs/gst-plugins-good-0.10.23' || \
|
||||
! has_version 'media-plugins/gst-plugins-vp8'; then
|
||||
ewarn "To make use of GNOME Shell's built-in screen recording utility,"
|
||||
ewarn "you need to either install >=media-libs/gst-plugins-good-0.10.23"
|
||||
ewarn "and media-plugins/gst-plugins-vp8, or use dconf-editor to change"
|
||||
ewarn "apps.gnome-shell.recorder/pipeline to what you want to use."
|
||||
fi
|
||||
|
||||
if ! has_version ">=x11-base/xorg-server-1.11"; then
|
||||
ewarn "If you use multiple screens, it is highly recommended that you"
|
||||
ewarn "upgrade to >=x11-base/xorg-server-1.11 to be able to make use of"
|
||||
ewarn "pointer barriers which will make it easier to use hot corners."
|
||||
fi
|
||||
|
||||
if has_version "<x11-drivers/ati-drivers-12"; then
|
||||
ewarn "GNOME Shell has been reported to show graphical corruption under"
|
||||
ewarn "x11-drivers/ati-drivers-11.*; you may want to use GNOME in"
|
||||
ewarn "fallback mode, or switch to open-source drivers."
|
||||
fi
|
||||
|
||||
if has_version "media-libs/mesa[video_cards_radeon]"; then
|
||||
elog "GNOME Shell is unstable under classic-mode r300/r600 mesa drivers."
|
||||
elog "Make sure that gallium architecture for r300 and r600 drivers is"
|
||||
elog "selected using 'eselect mesa'."
|
||||
if ! has_version "media-libs/mesa[gallium]"; then
|
||||
ewarn "You will need to emerge media-libs/mesa with USE=gallium."
|
||||
fi
|
||||
fi
|
||||
|
||||
if has_version "media-libs/mesa[video_cards_intel]"; then
|
||||
elog "GNOME Shell is unstable under gallium-mode i915/i965 mesa drivers."
|
||||
elog "Make sure that classic architecture for i915 and i965 drivers is"
|
||||
elog "selected using 'eselect mesa'."
|
||||
if ! has_version "media-libs/mesa[classic]"; then
|
||||
ewarn "You will need to emerge media-libs/mesa with USE=classic."
|
||||
fi
|
||||
fi
|
||||
}
|
||||
203
gnome-base/gnome-shell/gnome-shell-3.4.1.ebuild
Normal file
203
gnome-base/gnome-shell/gnome-shell-3.4.1.ebuild
Normal file
@@ -0,0 +1,203 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/gnome-base/gnome-shell/gnome-shell-3.4.1.ebuild,v 1.1 2012/05/14 00:04:36 tetromino Exp $
|
||||
|
||||
EAPI="4"
|
||||
GCONF_DEBUG="no"
|
||||
GNOME2_LA_PUNT="yes"
|
||||
PYTHON_DEPEND="2:2.5"
|
||||
|
||||
inherit autotools eutils gnome2 multilib pax-utils python
|
||||
|
||||
DESCRIPTION="Provides core UI functions for the GNOME 3 desktop"
|
||||
HOMEPAGE="http://live.gnome.org/GnomeShell"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
IUSE="+bluetooth +networkmanager systemd"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
|
||||
# gnome-desktop-2.91.2 is needed due to header changes, db82a33 in gnome-desktop
|
||||
# latest g-c-c is needed due to https://bugs.gentoo.org/show_bug.cgi?id=360057
|
||||
# libXfixes-5.0 needed for pointer barriers
|
||||
COMMON_DEPEND=">=app-crypt/gcr-3.3.90[introspection]
|
||||
>=dev-libs/glib-2.31.6:2
|
||||
>=dev-libs/gjs-1.31.22
|
||||
>=dev-libs/gobject-introspection-0.10.1
|
||||
>=x11-libs/gtk+-3.3.9:3[introspection]
|
||||
>=media-libs/clutter-1.9.16:1.0[introspection]
|
||||
>=dev-libs/folks-0.5.2
|
||||
>=dev-libs/json-glib-0.13.2
|
||||
>=dev-libs/libcroco-0.6.2:0.6
|
||||
>=gnome-base/gnome-desktop-2.91.2:3
|
||||
>=gnome-base/gsettings-desktop-schemas-2.91.91
|
||||
>=gnome-base/gnome-keyring-3.3.90
|
||||
>=gnome-base/gnome-menus-2.29.10:3[introspection]
|
||||
gnome-base/libgnome-keyring
|
||||
>=gnome-extra/evolution-data-server-2.91.6
|
||||
>=media-libs/gstreamer-0.10.16:0.10
|
||||
>=media-libs/gst-plugins-base-0.10.16:0.10
|
||||
>=net-im/telepathy-logger-0.2.4[introspection]
|
||||
>=net-libs/telepathy-glib-0.17.5[introspection]
|
||||
>=sys-auth/polkit-0.100[introspection]
|
||||
>=x11-libs/libXfixes-5.0
|
||||
>=x11-wm/mutter-3.4.1[introspection]
|
||||
>=x11-libs/startup-notification-0.11
|
||||
|
||||
app-misc/ca-certificates
|
||||
dev-libs/dbus-glib
|
||||
dev-libs/libxml2:2
|
||||
gnome-base/librsvg
|
||||
media-libs/libcanberra
|
||||
media-libs/mesa
|
||||
media-sound/pulseaudio
|
||||
net-libs/libsoup:2.4[introspection]
|
||||
x11-libs/libX11
|
||||
x11-libs/gdk-pixbuf:2[introspection]
|
||||
x11-libs/pango[introspection]
|
||||
x11-apps/mesa-progs
|
||||
|
||||
bluetooth? ( >=net-wireless/gnome-bluetooth-3.1.0[introspection] )
|
||||
networkmanager? ( >=net-misc/networkmanager-0.8.999[introspection] )
|
||||
systemd? ( >=sys-apps/systemd-31 )
|
||||
"
|
||||
# Runtime-only deps are probably incomplete and approximate.
|
||||
# Each block:
|
||||
# 1. Pull in polkit-0.101 for pretty authorization dialogs
|
||||
# 2. Introspection stuff + dconf needed via imports.gi.*
|
||||
# 3. gnome-session is needed for gnome-session-quit
|
||||
# 4. Control shell settings
|
||||
# 5. accountsservice is needed for GdmUserManager (0.6.14 needed for fast
|
||||
# user switching with gdm-3.1.x)
|
||||
# 6. caribou needed for on-screen keyboard
|
||||
# 7. xdg-utils needed for xdg-open, used by extension tool
|
||||
# 8. gnome-icon-theme-symbolic neeed for various icons
|
||||
# 9. mobile-broadband-provider-info, timezone-data for shell-mobile-providers.c
|
||||
RDEPEND="${COMMON_DEPEND}
|
||||
>=sys-auth/polkit-0.101[introspection]
|
||||
|
||||
>=gnome-base/dconf-0.4.1
|
||||
>=gnome-base/libgnomekbd-2.91.4[introspection]
|
||||
sys-power/upower[introspection]
|
||||
|
||||
>=gnome-base/gnome-session-2.91.91
|
||||
|
||||
>=gnome-base/gnome-settings-daemon-2.91
|
||||
>=gnome-base/gnome-control-center-2.91.92-r1[bluetooth(+)?]
|
||||
|
||||
>=sys-apps/accountsservice-0.6.14[introspection]
|
||||
|
||||
>=app-accessibility/caribou-0.3
|
||||
|
||||
x11-misc/xdg-utils
|
||||
|
||||
x11-themes/gnome-icon-theme-symbolic
|
||||
|
||||
networkmanager? (
|
||||
net-misc/mobile-broadband-provider-info
|
||||
sys-libs/timezone-data )
|
||||
|
||||
!systemd? ( sys-auth/consolekit )
|
||||
"
|
||||
DEPEND="${COMMON_DEPEND}
|
||||
>=sys-devel/gettext-0.17
|
||||
>=dev-util/intltool-0.40
|
||||
gnome-base/gnome-common
|
||||
virtual/pkgconfig
|
||||
!!=dev-lang/spidermonkey-1.8.2*"
|
||||
# libmozjs.so is picked up from /usr/lib while compiling, so block at build-time
|
||||
# https://bugs.gentoo.org/show_bug.cgi?id=360413
|
||||
|
||||
pkg_setup() {
|
||||
DOCS="AUTHORS NEWS README"
|
||||
# Don't error out on warnings
|
||||
G2CONF="${G2CONF}
|
||||
--enable-compile-warnings=maximum
|
||||
--disable-schemas-compile
|
||||
--disable-jhbuild-wrapper-script
|
||||
$(use_with bluetooth)
|
||||
$(use_enable networkmanager)
|
||||
$(use_with systemd)
|
||||
--with-ca-certificates=${EPREFIX}/etc/ssl/certs/ca-certificates.crt
|
||||
BROWSER_PLUGIN_DIR=${EPREFIX}/usr/$(get_libdir)/nsbrowser/plugins"
|
||||
python_set_active_version 2
|
||||
python_pkg_setup
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# Fix automagic gnome-bluetooth dep, bug #398145
|
||||
epatch "${FILESDIR}/${PN}-3.2.1-automagic-gnome-bluetooth.patch"
|
||||
|
||||
# Make networkmanager optional, bug #398593
|
||||
epatch "${FILESDIR}/${PN}-3.4.0-optional-networkmanager.patch"
|
||||
|
||||
# Force /usr/bin/gnome-shell to link to libgnome-shell-js; fixes extensions
|
||||
# https://bugzilla.gnome.org/show_bug.cgi?id=670477
|
||||
epatch "${FILESDIR}/${PN}-3.4.0-libgnome-shell-js.so-link"-{1,2}.patch
|
||||
|
||||
# Testy
|
||||
if use arm; then
|
||||
epatch "${FILESDIR}/30_use-glx-if-cogl-supports.patch"
|
||||
epatch "${FILESDIR}/31_don-t-link-directly-to-libGL.patch"
|
||||
epatch "${FILESDIR}/32_remove-shell-screen-grabber-1.patch"
|
||||
epatch "${FILESDIR}/33_remove_glx_headers.patch"
|
||||
fi
|
||||
|
||||
eautoreconf
|
||||
gnome2_src_prepare
|
||||
|
||||
# Drop G_DISABLE_DEPRECATED for sanity on glib upgrades; bug #384765
|
||||
# Note: sed Makefile.in because it is generated from several Makefile.ams
|
||||
sed -e 's/-DG_DISABLE_DEPRECATED//g' \
|
||||
-i src/Makefile.in browser-plugin/Makefile.in || die "sed failed"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
gnome2_src_install
|
||||
python_convert_shebangs 2 "${ED}/usr/bin/gnome-shell-extension-tool"
|
||||
|
||||
# Required for gnome-shell on hardened/PaX, bug #398941
|
||||
pax-mark mr "${ED}usr/bin/gnome-shell"
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
gnome2_pkg_postinst
|
||||
|
||||
if ! has_version '>=media-libs/gst-plugins-good-0.10.23' || \
|
||||
! has_version 'media-plugins/gst-plugins-vp8'; then
|
||||
ewarn "To make use of GNOME Shell's built-in screen recording utility,"
|
||||
ewarn "you need to either install >=media-libs/gst-plugins-good-0.10.23"
|
||||
ewarn "and media-plugins/gst-plugins-vp8, or use dconf-editor to change"
|
||||
ewarn "apps.gnome-shell.recorder/pipeline to what you want to use."
|
||||
fi
|
||||
|
||||
if ! has_version ">=x11-base/xorg-server-1.11"; then
|
||||
ewarn "If you use multiple screens, it is highly recommended that you"
|
||||
ewarn "upgrade to >=x11-base/xorg-server-1.11 to be able to make use of"
|
||||
ewarn "pointer barriers which will make it easier to use hot corners."
|
||||
fi
|
||||
|
||||
if has_version "<x11-drivers/ati-drivers-12"; then
|
||||
ewarn "GNOME Shell has been reported to show graphical corruption under"
|
||||
ewarn "x11-drivers/ati-drivers-11.*; you may want to use GNOME in"
|
||||
ewarn "fallback mode, or switch to open-source drivers."
|
||||
fi
|
||||
|
||||
if has_version "media-libs/mesa[video_cards_radeon]"; then
|
||||
elog "GNOME Shell is unstable under classic-mode r300/r600 mesa drivers."
|
||||
elog "Make sure that gallium architecture for r300 and r600 drivers is"
|
||||
elog "selected using 'eselect mesa'."
|
||||
if ! has_version "media-libs/mesa[gallium]"; then
|
||||
ewarn "You will need to emerge media-libs/mesa with USE=gallium."
|
||||
fi
|
||||
fi
|
||||
|
||||
if has_version "media-libs/mesa[video_cards_intel]"; then
|
||||
elog "GNOME Shell is unstable under gallium-mode i915/i965 mesa drivers."
|
||||
elog "Make sure that classic architecture for i915 and i965 drivers is"
|
||||
elog "selected using 'eselect mesa'."
|
||||
if ! has_version "media-libs/mesa[classic]"; then
|
||||
ewarn "You will need to emerge media-libs/mesa with USE=classic."
|
||||
fi
|
||||
fi
|
||||
}
|
||||
Reference in New Issue
Block a user