delete relicts

git-svn-id: https://svn.disconnected-by-peer.at/svn/linamh/trunk/linamh@658 6952d904-891a-0410-993b-d76249ca496b
This commit is contained in:
geos_one 2008-12-12 08:38:26 +00:00
parent 65604cc650
commit f5add00134
25 changed files with 0 additions and 1414 deletions

View File

@ -1,7 +0,0 @@
# ChangeLog for x11-drivers/synaptics
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
# $Header: $
02 Sep 2008; Mario Fetka <mario.fetka@gmail.com> +metadata.xml:
Initial checkin xorg 1.5 patched

View File

@ -1,20 +0,0 @@
AUX 11-x11-synaptics.fdi 460 RMD160 973e332bd506d0160e573a028115bf3c0924e334 SHA1 77cc42785faecc3fb9b33ffac0b433ba9ba03808 SHA256 51c0da7a8e7048a753afa83d2d81e62fa8b61e0a1718083a2cc110767a76a8a3
AUX rc.conf 330 RMD160 75825d70b749ae4e8b59b4066428d73815b19d70 SHA1 639736e2b424fcd3d6a78d0e6a3f90bed49ee6f4 SHA256 1776915a739c2f1432ab1602717cac1ff2464160a9d33d20124853a93605f6a5
AUX rc.init 440 RMD160 82c30d248ef010cdd41600e3b19878b9f2ea6ff0 SHA1 cfb299682f9ec85340950917cbfebe5387080b32 SHA256 314d7d7c7d20608a398b439427e9c74cfaf2521996abc50af8a7963f1e7f22b8
AUX synaptics-0.14.4-r2-makefile-fpic.patch 681 RMD160 492189b170c19043e35e28d9d347d61d718eef0a SHA1 d784c87ef1d144bb863f5fb05f69b511c528bf8f SHA256 c8cbd624521f7490a04df72d8a2738c5bb586b57c560af0bb60b860f286658bc
AUX synaptics-0.14.4-r2-makefile.patch 531 RMD160 64ac6a8bd06befe99f126a1cad08028c38714c8b SHA1 4bbc1f9bba91efdada4bedb7b4676dab0c42fccf SHA256 4797db102c69d06d56bdfb761308df5a2349bfa75c09383d3b67e3d6e4487ec9
AUX synaptics-0.14.5-makefile-fpic.patch 604 RMD160 610b6f52382cab61d669c7ed126796a7ba0c96f2 SHA1 ff235d5ea1b20a4b19a5339fc31afeb88750f8d3 SHA256 bfe89f8ecae8a0af6e8b478ed29f5fe652bf3aa6016d6c41a7a678fc25f92c36
AUX synaptics-0.14.5-xorg-7.1-compile-fix.patch 2249 RMD160 639955f8ae5162d4c3b4f527a6e6bb1cf4c0bb26 SHA1 0d59b2d11dbb94127ee843310e3badcaff6b61e1 SHA256 0de534613bd1df8b0b36f0387fcea858e463833bb6f4248b71c0975d7effae19
AUX synaptics-0.14.6-configurable_polling_interval.patch 1880 RMD160 ca90cd33992df42c573547645633b30e377a146e SHA1 e3abb85af87ee6b3c356be635898840d42819c74 SHA256 f4ed2db4c2e20f703cebea778f8605187be0a84ba77fde0b69512c15462d697e
AUX synaptics-0.14.6_p20070706-fixeventgrab.patch 3036 RMD160 c6b40e5e8827060a39e0dc64ac125f9b7306d7c1 SHA1 a4fcb3e8c3376f1fa0eab4e83a2f0a1994107555 SHA256 28640f58d83d5bdeadb713541e0ad521c2f705211a352bf1078c4f5f2509d416
AUX synaptics-0.14.6_p20070706-input_api.patch 686 RMD160 67ecdecc01f255b4fec693e4237976a23a4e6a7a SHA1 7acb718d19a4870833dc86b6810f2af33aac56cd SHA256 829a3355fdd935ee6861687bfabe96d12efb37f13ccdc525c515dee43dc2e1f9
AUX synaptics-0.14.x-gcc4-the-sentinels-have-attacked.patch 538 RMD160 aec4ddbe8c93439d2245aeea1909eeb0e9ee555f SHA1 985ee12c3b61cdb89c97d150a52da4df85e2f236 SHA256 81cd1a662faf37141ca1e731c0ef63ba493a99b2c794d8ceb9510a7367e4f97c
AUX synaptics-fix-xf86_ansic.h.patch 3924 RMD160 4748823c9edf709ef9ec0bef42a96a151b4cada1 SHA1 8a4d180a73dc0f4cc9e1fdcaebfe905a62221211 SHA256 647d7ae2044b949cab4016eb985936b0ef6bb995105ec90dccc38fa03cdb85b3
AUX synaptics-fix-xinerama.patch 602 RMD160 128bc48024c04d789cc1393462e81c2dbe6bae5c SHA1 225993afe0f2ec6be5df7e132f60a92db0c54815 SHA256 8feb3ca55e1c476b068dda6b411ad6a317ac8fa4d3569fe38a0e5af14b8cb1c7
AUX synaptics-fixeventgrab.diff 2826 RMD160 0888ceb9cb2847d336be4c267ee8a4f6aee76a1d SHA1 38de7f5c4c94f89e5170b4ff6306cc6b1d7fac84 SHA256 90f49ad2885202a23ad70e3630d712dc26249c4d3035cff2e0094de2f806dab8
AUX synaptics-install-so-exec.patch 337 RMD160 e9111545b7c04ab66bd1ff36d116d25baa205ef1 SHA1 c9f67efed41c5c4a1201b1261be0d72f912e4ab6 SHA256 227a147a0d7d0c9528d51ffec03506db530af8a6911c6f89f45e451fdc4d39eb
AUX synaptics_input_api.diff 2181 RMD160 c7adda057b1591721abb4e2cba73e5fca1442361 SHA1 e0ac5c149a4a2899feacc1eaea27b78fa3c4a97b SHA256 0f415142a67a1a2cac51d9e67a33e7cadd9a20846b3f187db1ab5ff280b9c1f8
DIST synaptics-0.14.6_p20070706.tar.bz2 129509 RMD160 bacf7f08c04a9164af2883133d479ace59f7a3ce SHA1 55077ecf4bba3ced44702aa516af7a23c5172c03 SHA256 a22e3995756ce2050832a9ee1a8b300dfa18101e00e940399e329e4f9e78cb90
EBUILD synaptics-0.14.6_p20070706-r2.ebuild 2898 RMD160 0b6206e970a1e00ffd2ca6fb0373cafb278cf8ed SHA1 bc877acff7e31ec33581c89af071177ce9184542 SHA256 8a3cc60197641c278a27ddb49e7a73e17e74f9114b367e0e7de8c2ab0682e4b1
MISC ChangeLog 224 RMD160 25054aceedab375439a8d7a1390c9e74295d7a44 SHA1 eca00b0e69d46b6b72b40238b3606b4a5ee0caf4 SHA256 a4045c85b89973d0ca4159fc5481c532a9f3ef6e6cb9f391d30e6c437b5d0596
MISC metadata.xml 170 RMD160 645927a396fdc21cdeb089fe42c5397332420ea6 SHA1 ac7f48a14fec325926f9ce1be8fbf1f311b4f2e4 SHA256 d797a2ec6f9dc516c9f9c1a758ee87ad3e8c43101b5dc76c2f872d5bd4639b42

View File

@ -1,13 +0,0 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<deviceinfo version="0.2">
<device>
<match key="info.capabilities" contains="input.touchpad">
<match key="info.product" contains="Synaptics TouchPad">
<merge key="input.x11_driver" type="string">synaptics</merge>
</match>
<match key="info.product" contains="AlpsPS/2 ALPS">
<merge key="input.x11_driver" type="string">synaptics</merge>
</match>
</match>
</device>
</deviceinfo>

View File

@ -1,8 +0,0 @@
# Copyright 1999-2003 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/x11-drivers/synaptics/files/rc.conf,v 1.1 2005/12/09 16:11:18 seemant Exp $
# Config file for /etc/init.d/syndaemon
# run `syndaemon --help` for valid cmdline options
#SYNDAEMON_OPTS=""

View File

@ -1,20 +0,0 @@
#!/sbin/runscript
# Copyright 1999-2002 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/x11-drivers/synaptics/files/rc.init,v 1.2 2006/12/19 01:07:10 lu_zero Exp $
depend() {
use localmount
}
start() {
ebegin "Starting syndaemon"
/usr/bin/syndaemon ${SYNDAEMON_OPTS}
eend $?
}
stop() {
ebegin "Stopping syndaemon"
kill `cat /var/run/syndaemon.pid`
eend $?
}

View File

@ -1,14 +0,0 @@
--- Makefile.orig 2005-12-15 16:07:36.000000000 -0500
+++ Makefile 2005-12-15 16:08:45.000000000 -0500
@@ -62,9 +62,9 @@
CCOPTIONS := -pedantic -Wall -Wpointer-arith
CCOPTIONS += $(call check_gcc,-fno-merge-constants,)
-CCOPTIONS += $(call check_gcc,-fno-pic,)
+CCOPTIONS += $(call check_gcc,)
CDEBUGFLAGS = -O2
-CFLAGS = $(CDEBUGFLAGS) $(CCOPTIONS) $(ALLDEFINES) -DVERSION="\"$(VERSION)\"" -DVERSION_ID="$(VERSION_ID)"
+CFLAGS = $(CDEBUGFLAGS) $(CCOPTIONS) $(ALLDEFINES) -DVERSION="\"$(VERSION)\"" -DVERSION_ID="$(VERSION_ID)" -fPIC
CFLAGSCLIENT = $(CDEBUGFLAGS) $(CCOPTIONS) -DVERSION="\"$(VERSION)\"" -DVERSION_ID="$(VERSION_ID)" -I$(X_INCLUDES_ROOT)/include
CC = gcc

View File

@ -1,16 +0,0 @@
--- Makefile.orig 2005-12-15 16:07:36.000000000 -0500
+++ Makefile 2005-12-15 16:08:45.000000000 -0500
@@ -7,10 +7,10 @@
# Define the TOP variable to build using include files from a local source tree.
#TOP = /usr/src/redhat/BUILD/XFree86-4.3.0/xc
-INSTALLED_X = $(DESTDIR)/usr/X11R6
+INSTALLED_X = $(DESTDIR)/usr
LOCAL_X = Xincludes/usr/X11R6
-BINDIR = $(DESTDIR)/usr/local/bin
-MANDIR = $(DESTDIR)/usr/local/man
+BINDIR = $(DESTDIR)/usr/bin
+MANDIR = $(DESTDIR)/usr/share/man
ifeq ($(ARCH),)
ARCH = $(shell /bin/arch)

View File

@ -1,11 +0,0 @@
--- Makefile.orig 2006-06-04 09:50:43.000000000 +0100
+++ Makefile 2006-06-04 09:50:53.000000000 +0100
@@ -81,7 +81,7 @@
CCOPTIONS := -pedantic -Wall -Wpointer-arith
CCOPTIONS += $(call check_gcc,-fno-merge-constants,)
CDEBUGFLAGS = -O2
-CFLAGS = $(CDEBUGFLAGS) $(CCOPTIONS) $(ALLDEFINES) -DVERSION="\"$(VERSION)\"" -DVERSION_ID="$(VERSION_ID)"
+CFLAGS = $(CDEBUGFLAGS) $(CCOPTIONS) $(ALLDEFINES) -DVERSION="\"$(VERSION)\"" -DVERSION_ID="$(VERSION_ID)" -fPIC
CFLAGSCLIENT = $(CDEBUGFLAGS) $(CCOPTIONS) -DVERSION="\"$(VERSION)\"" -DVERSION_ID="$(VERSION_ID)" -I$(X_INCLUDES_ROOT)/include
CC = gcc

View File

@ -1,97 +0,0 @@
Fix compile errors when using Xorg 7.1.
From: Peter Osterlund <petero2@telia.com>
Initial patch from VMiklos <vmiklos@frugalware.org>. Somewhat
modified by me.
---
eventcomm.c | 5 +++++
ps2comm.h | 1 +
psmcomm.c | 2 ++
psmcomm.h | 1 +
synaptics.c | 1 +
synproto.h | 1 +
6 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/eventcomm.c b/eventcomm.c
index 6f6de7f..1b0f8bc 100644
--- a/eventcomm.c
+++ b/eventcomm.c
@@ -18,6 +18,11 @@
*/
#include "eventcomm.h"
+#include <errno.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <stdio.h>
#include "synproto.h"
#include "synaptics.h"
#include <xf86.h>
diff --git a/ps2comm.h b/ps2comm.h
index d6f0a25..4a1a051 100644
--- a/ps2comm.h
+++ b/ps2comm.h
@@ -1,6 +1,7 @@
#ifndef _PS2COMM_H_
#define _PS2COMM_H_
+#include <unistd.h>
#include <sys/ioctl.h>
#include "xf86_OSproc.h"
diff --git a/psmcomm.c b/psmcomm.c
index e4df42b..257ec13 100644
--- a/psmcomm.c
+++ b/psmcomm.c
@@ -29,6 +29,8 @@
*/
#include "psmcomm.h"
+#include <errno.h>
+#include <string.h>
#include "synproto.h"
#include "synaptics.h"
#include "ps2comm.h" /* ps2_print_ident() */
diff --git a/psmcomm.h b/psmcomm.h
index 6d64df6..a3162a2 100644
--- a/psmcomm.h
+++ b/psmcomm.h
@@ -1,6 +1,7 @@
#ifndef _PSMCOMM_H_
#define _PSMCOMM_H_
+#include <unistd.h>
#include <sys/ioctl.h>
#include "freebsd_mouse.h"
diff --git a/synaptics.c b/synaptics.c
index 2a17f81..63edebb 100644
--- a/synaptics.c
+++ b/synaptics.c
@@ -59,6 +59,7 @@
* Standard Headers
****************************************************************************/
+#include <unistd.h>
#include <sys/ioctl.h>
#include <misc.h>
#include <xf86.h>
diff --git a/synproto.h b/synproto.h
index 8562a75..ecc4357 100644
--- a/synproto.h
+++ b/synproto.h
@@ -19,6 +19,7 @@
#ifndef _SYNPROTO_H_
#define _SYNPROTO_H_
+#include <unistd.h>
#include <sys/ioctl.h>
#include <xf86Xinput.h>
#include <xisb.h>

View File

@ -1,58 +0,0 @@
--- ./syndaemon.c 2006-04-16 21:31:43.000000000 +0200
+++ ./syndaemon.c 2007-10-16 13:40:02.000000000 +0200
@@ -43,9 +43,11 @@
static void
usage()
{
- fprintf(stderr, "Usage: syndaemon [-i idle-time] [-d] [-t] [-k]\n");
+ fprintf(stderr, "Usage: syndaemon [-i idle-time] [-m poll-delay] [-d] [-t] [-k]\n");
fprintf(stderr, " -i How many seconds to wait after the last key press before\n");
fprintf(stderr, " enabling the touchpad. (default is 2.0s)\n");
+ fprintf(stderr, " -m How many milli-seconds to wait until next poll.\n");
+ fprintf(stderr, " (default is 20ms)\n");
fprintf(stderr, " -d Start as a daemon, ie in the background.\n");
fprintf(stderr, " -p Create a pid file with the specified name.\n");
fprintf(stderr, " -t Only disable tapping and scrolling, not mouse movements.\n");
@@ -159,9 +161,8 @@
}
static void
-main_loop(Display *display, double idle_time)
+main_loop(Display *display, double idle_time, int poll_delay)
{
- const int poll_delay = 20000; /* 20 ms */
double last_activity = 0.0;
double current_time;
@@ -228,17 +229,21 @@
main(int argc, char *argv[])
{
double idle_time = 2.0;
+ int poll_delay = 20000; /* 20 ms */
Display *display;
int c;
int shmid;
int ignore_modifier_keys = 0;
/* Parse command line parameters */
- while ((c = getopt(argc, argv, "i:dtp:kK?")) != EOF) {
+ while ((c = getopt(argc, argv, "i:m:dtp:kK?")) != EOF) {
switch(c) {
case 'i':
idle_time = atof(optarg);
break;
+ case 'm':
+ poll_delay = atoi(optarg) * 1000;
+ break;
case 'd':
background = 1;
break;
@@ -314,7 +319,7 @@
setup_keyboard_mask(display, ignore_modifier_keys);
/* Run the main loop */
- main_loop(display, idle_time);
+ main_loop(display, idle_time, poll_delay);
return 0;
}

View File

@ -1,82 +0,0 @@
diff -urN synaptics-0.14.6_p20070706.orig/eventcomm.c synaptics-0.14.6_p20070706/eventcomm.c
--- synaptics-0.14.6_p20070706.orig/eventcomm.c 2008-08-29 09:34:11.000000000 +0200
+++ synaptics-0.14.6_p20070706/eventcomm.c 2008-08-29 10:23:04.000000000 +0200
@@ -41,17 +41,25 @@
* Function Definitions
****************************************************************************/
-static void
+static Bool
+grab_event_device(int fd)
+{
+ int ret;
+ SYSCALL(ret = ioctl(fd, EVIOCGRAB, (pointer)1));
+ return !(ret < 0);
+}
+
+static Bool
EventDeviceOnHook(LocalDevicePtr local, SynapticsSHM *para)
{
if (para->grab_event_device) {
/* Try to grab the event device so that data don't leak to /dev/input/mice */
- int ret;
- SYSCALL(ret = ioctl(local->fd, EVIOCGRAB, (pointer)1));
- if (ret < 0) {
+ if(!grab_event_device(local->fd)) {
xf86Msg(X_WARNING, "%s can't grab event device, errno=%d\n",
local->name, errno);
+ return FALSE;
}
+ return TRUE;
}
}
@@ -273,6 +281,7 @@
char fname[64];
int fd = -1;
Bool is_touchpad;
+ Bool is_grabbable;
sprintf(fname, "%s/%s%d", DEV_INPUT_EVENT, EVENT_DEV_NAME, i);
SYSCALL(fd = open(fname, O_RDONLY));
@@ -289,7 +298,14 @@
noent_cnt = 0;
have_evdev = TRUE;
is_touchpad = event_query_is_touchpad(fd);
- if (is_touchpad) {
+ /**
+ * Check whether device can be grabbed. This means there is a race
+ * condition with EventDeviceOnHook, which can't be solved cleanly
+ * the way things are done with the current design. One possible
+ * solution would be to keep the file descriptor open.
+ */
+ is_grabbable = grab_event_device(fd);
+ if (is_touchpad && is_grabbable) {
xf86Msg(X_PROBED, "%s auto-dev sets device to %s\n",
local->name, fname);
xf86ReplaceStrOption(local->options, "Device", fname);
diff -urN synaptics-0.14.6_p20070706.orig/synaptics.c synaptics-0.14.6_p20070706/synaptics.c
--- synaptics-0.14.6_p20070706.orig/synaptics.c 2008-08-29 09:34:11.000000000 +0200
+++ synaptics-0.14.6_p20070706/synaptics.c 2008-08-29 10:26:01.000000000 +0200
@@ -595,7 +595,8 @@
return !Success;
}
- priv->proto_ops->DeviceOnHook(local, priv->synpara);
+ if(!priv->proto_ops->DeviceOnHook(local, priv->synpara))
+ return !Success;
priv->comm.buffer = XisbNew(local->fd, 64);
if (!priv->comm.buffer) {
diff -urN synaptics-0.14.6_p20070706.orig/synproto.h synaptics-0.14.6_p20070706/synproto.h
--- synaptics-0.14.6_p20070706.orig/synproto.h 2008-08-29 09:34:11.000000000 +0200
+++ synaptics-0.14.6_p20070706/synproto.h 2008-08-29 10:28:34.000000000 +0200
@@ -77,7 +77,7 @@
struct CommData;
struct SynapticsProtocolOperations {
- void (*DeviceOnHook)(LocalDevicePtr local, struct _SynapticsSHM *para);
+ Bool (*DeviceOnHook)(LocalDevicePtr local, struct _SynapticsSHM *para);
void (*DeviceOffHook)(LocalDevicePtr local);
Bool (*QueryHardware)(LocalDevicePtr local, struct SynapticsHwInfo *synhw);
Bool (*ReadHwState)(LocalDevicePtr local, struct SynapticsHwInfo *synhw,

View File

@ -1,15 +0,0 @@
diff -urN synaptics-0.14.6_p20070706.orig/Makefile synaptics-0.14.6_p20070706/Makefile
--- synaptics-0.14.6_p20070706.orig/Makefile 2008-08-29 09:34:11.000000000 +0200
+++ synaptics-0.14.6_p20070706/Makefile 2008-08-29 10:40:29.000000000 +0200
@@ -34,10 +34,9 @@
LDCOMBINEFLAGS = -shared -lc
PICFLAG = $(call check_gcc,-fPIC,)
X_INCLUDES_ROOT = $(INSTALLED_X)
- SDKDIR = $(shell pkg-config xorg-server --variable=sdkdir)
ALLINCLUDES = -I. -I$(INSTALLED_X)/include/X11 \
-I$(INSTALLED_X)/include/X11/extensions \
- -I$(SDKDIR)
+ `pkg-config xorg-server --cflags`
else
INSTALLED_X = /usr/X11R6
INPUT_MODULE_DIR = $(DESTDIR)/$(INSTALLED_X)/$(LIBDIR)/modules/input

View File

@ -1,16 +0,0 @@
--- Xincludes/usr/X11R6/include/X11/Xfuncproto.h.orig 2005-07-02 12:50:40.000000000 +0200
+++ Xincludes/usr/X11R6/include/X11/Xfuncproto.h 2005-07-25 08:13:46.000000000 +0200
@@ -69,4 +69,12 @@
#endif
#endif /* _XFUNCPROTOBEGIN */
+#if defined(__GNUC__) && (__GNUC__ >= 4)
+# define _X_SENTINEL(x) __attribute__ ((__sentinel__(x)))
+# define _X_ATTRIBUTE_PRINTF(x,y) __attribute__((__format__(__printf__,x,y)))
+#else
+# define _X_SENTINEL(x)
+# define _X_ATTRIBUTE_PRINTF(x,y)
+#endif /* GNUC >= 4 */
+
#endif /* _XFUNCPROTO_H_ */

View File

@ -1,131 +0,0 @@
diff -Nur synaptics-0.14.6-org/synaptics.c synaptics-0.14.6-patched/synaptics.c
--- synaptics-0.14.6-org/synaptics.c 2006-07-15 17:54:29.000000000 +0200
+++ synaptics-0.14.6-patched/synaptics.c 2008-06-28 17:52:54.000000000 +0200
@@ -61,10 +61,18 @@
#include <unistd.h>
#include <sys/ioctl.h>
+#include <string.h>
+#include <sys/ipc.h>
+#include <sys/shm.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <stdio.h>
+#include <math.h>
+#include <errno.h>
#include <misc.h>
#include <xf86.h>
#define NEED_XF86_TYPES
-#include <xf86_ansic.h>
#include <xf86_OSproc.h>
#include <xf86Xinput.h>
#include "mipointer.h"
@@ -224,14 +232,14 @@
return TRUE; /* Already allocated */
if (priv->shm_config) {
- if ((shmid = xf86shmget(SHM_SYNAPTICS, 0, 0)) != -1)
- xf86shmctl(shmid, XF86IPC_RMID, NULL);
- if ((shmid = xf86shmget(SHM_SYNAPTICS, sizeof(SynapticsSHM),
- 0777 | XF86IPC_CREAT)) == -1) {
+ if ((shmid = shmget(SHM_SYNAPTICS, 0, 0)) != -1)
+ shmctl(shmid, IPC_RMID, NULL);
+ if ((shmid = shmget(SHM_SYNAPTICS, sizeof(SynapticsSHM),
+ 0777 | IPC_CREAT)) == -1) {
xf86Msg(X_ERROR, "%s error shmget\n", local->name);
return FALSE;
}
- if ((priv->synpara = (SynapticsSHM*)xf86shmat(shmid, NULL, 0)) == NULL) {
+ if ((priv->synpara = (SynapticsSHM*)shmat(shmid, NULL, 0)) == NULL) {
xf86Msg(X_ERROR, "%s error shmat\n", local->name);
return FALSE;
}
@@ -257,8 +265,8 @@
return;
if (priv->shm_config) {
- if ((shmid = xf86shmget(SHM_SYNAPTICS, 0, 0)) != -1)
- xf86shmctl(shmid, XF86IPC_RMID, NULL);
+ if ((shmid = shmget(SHM_SYNAPTICS, 0, 0)) != -1)
+ shmctl(shmid, IPC_RMID, NULL);
} else {
xfree(priv->synpara);
}
@@ -272,7 +280,7 @@
char *str_par;
double value;
str_par = xf86FindOptionValue(options, optname);
- if ((!str_par) || (xf86sscanf(str_par, "%lf", &value) != 1))
+ if ((!str_par) || (sscanf(str_par, "%lf", &value) != 1))
return default_value;
return value;
}
@@ -437,8 +445,8 @@
priv->fifofd = -1;
if (repeater) {
/* create repeater fifo */
- if ((xf86mknod(repeater, 666, XF86_S_IFIFO) != 0) &&
- (xf86errno != xf86_EEXIST)) {
+ if ((mknod(repeater, 666, S_IFIFO) != 0) &&
+ (errno != EEXIST)) {
xf86Msg(X_ERROR, "%s can't create repeater fifo\n", local->name);
} else {
/* open the repeater fifo */
@@ -447,7 +455,7 @@
xf86Msg(X_ERROR, "%s repeater device open failed\n", local->name);
}
}
- xf86free(repeater);
+ free(repeater);
}
if (!QueryHardware(local)) {
@@ -634,7 +642,7 @@
static int
move_distance(int dx, int dy)
{
- return xf86sqrt(SQR(dx) + SQR(dy));
+ return sqrt(SQR(dx) + SQR(dy));
}
/*
@@ -669,14 +677,14 @@
double xCenter = (priv->synpara->left_edge + priv->synpara->right_edge) / 2.0;
double yCenter = (priv->synpara->top_edge + priv->synpara->bottom_edge) / 2.0;
- return xf86atan2(-(y - yCenter), x - xCenter);
+ return atan2(-(y - yCenter), x - xCenter);
}
/* return angle difference */
static double
diffa(double a1, double a2)
{
- double da = xf86fmod(a2 - a1, 2 * M_PI);
+ double da = fmod(a2 - a1, 2 * M_PI);
if (da < 0)
da += 2 * M_PI;
if (da > M_PI)
@@ -784,7 +792,7 @@
int c;
while ((c = XisbRead(priv->comm.buffer)) >= 0) {
unsigned char u = (unsigned char)c;
- xf86write(priv->fifofd, &u, 1);
+ write(priv->fifofd, &u, 1);
if (++count >= 3)
break;
}
@@ -1280,10 +1288,10 @@
/* save the fraction, report the integer part */
tmpf = dx * speed + x_edge_speed * dtime + priv->frac_x;
- priv->frac_x = xf86modf(tmpf, &integral);
+ priv->frac_x = modf(tmpf, &integral);
dx = integral;
tmpf = dy * speed + y_edge_speed * dtime + priv->frac_y;
- priv->frac_y = xf86modf(tmpf, &integral);
+ priv->frac_y = modf(tmpf, &integral);
dy = integral;
}

View File

@ -1,16 +0,0 @@
--- synaptics-0.14.6.orig/synaptics.c 2008-01-18 23:32:59.000000000 -0500
+++ synaptics-0.14.6/synaptics.c 2008-01-18 23:32:15.000000000 -0500
@@ -617,10 +617,10 @@
miPointerGetMotionBufferSize());
/* X valuator */
- xf86InitValuatorAxisStruct(dev, 0, 0, -1, 1, 0, 1);
+ xf86InitValuatorAxisStruct(dev, 0, -1, -1, 1, 0, 1);
xf86InitValuatorDefaults(dev, 0);
/* Y valuator */
- xf86InitValuatorAxisStruct(dev, 1, 0, -1, 1, 0, 1);
+ xf86InitValuatorAxisStruct(dev, 1, -1, -1, 1, 0, 1);
xf86InitValuatorDefaults(dev, 1);
xf86MotionHistoryAllocate(local);

View File

@ -1,83 +0,0 @@
diff -urN synaptics-0.14.6.orig/eventcomm.c synaptics-0.14.6/eventcomm.c
--- synaptics-0.14.6.orig/eventcomm.c 2006-07-15 17:54:29.000000000 +0200
+++ synaptics-0.14.6/eventcomm.c 2008-01-06 23:44:09.000000000 +0100
@@ -40,16 +40,24 @@
* Function Definitions
****************************************************************************/
-static void
+static Bool
+grab_event_device(int fd)
+{
+ int ret;
+ SYSCALL(ret = ioctl(fd, EVIOCGRAB, (pointer)1));
+ return !(ret < 0);
+}
+
+static Bool
EventDeviceOnHook(LocalDevicePtr local)
{
/* Try to grab the event device so that data don't leak to /dev/input/mice */
- int ret;
- SYSCALL(ret = ioctl(local->fd, EVIOCGRAB, (pointer)1));
- if (ret < 0) {
+ if(!grab_event_device(local->fd)) {
xf86Msg(X_WARNING, "%s can't grab event device, errno=%d\n",
local->name, errno);
+ return FALSE;
}
+ return TRUE;
}
static void
@@ -247,6 +255,7 @@
char fname[64];
int fd = -1;
Bool is_touchpad;
+ Bool is_grabbable;
sprintf(fname, "%s/%s%d", DEV_INPUT_EVENT, EVENT_DEV_NAME, i);
SYSCALL(fd = open(fname, O_RDONLY));
@@ -263,8 +272,16 @@
noent_cnt = 0;
have_evdev = TRUE;
is_touchpad = event_query_is_touchpad(fd);
+ /**
+ * Check whether device can be grabbed. This means there is a race
+ * condition with EventDeviceOnHook, which can't be solved cleanly
+ * the way things are done with the current design. One possible
+ * solution would be to keep the file descriptor open.
+ */
+ is_grabbable = grab_event_device(fd);
+
SYSCALL(close(fd));
- if (is_touchpad) {
+ if (is_touchpad && is_grabbable) {
xf86Msg(X_PROBED, "%s auto-dev sets device to %s\n",
local->name, fname);
xf86ReplaceStrOption(local->options, "Device", fname);
diff -urN synaptics-0.14.6.orig/synaptics.c synaptics-0.14.6/synaptics.c
--- synaptics-0.14.6.orig/synaptics.c 2006-07-15 17:54:29.000000000 +0200
+++ synaptics-0.14.6/synaptics.c 2008-01-06 23:03:26.000000000 +0100
@@ -543,7 +543,8 @@
return !Success;
}
- priv->proto_ops->DeviceOnHook(local);
+ if(!priv->proto_ops->DeviceOnHook(local))
+ return !Success;
priv->comm.buffer = XisbNew(local->fd, 64);
if (!priv->comm.buffer) {
diff -urN synaptics-0.14.6.orig/synproto.h synaptics-0.14.6/synproto.h
--- synaptics-0.14.6.orig/synproto.h 2006-07-09 18:53:02.000000000 +0200
+++ synaptics-0.14.6/synproto.h 2008-01-06 22:31:19.000000000 +0100
@@ -76,7 +76,7 @@
struct CommData;
struct SynapticsProtocolOperations {
- void (*DeviceOnHook)(LocalDevicePtr local);
+ Bool (*DeviceOnHook)(LocalDevicePtr local);
void (*DeviceOffHook)(LocalDevicePtr local);
Bool (*QueryHardware)(LocalDevicePtr local, struct SynapticsHwInfo *synhw);
Bool (*ReadHwState)(LocalDevicePtr local, struct SynapticsHwInfo *synhw,

View File

@ -1,11 +0,0 @@
--- synaptics-0.14.6/Makefile.orig 2008-04-01 16:10:04.000000000 -0400
+++ synaptics-0.14.6/Makefile 2008-04-01 16:10:23.000000000 -0400
@@ -115,7 +115,7 @@
install -D $< $@
$(INPUT_MODULE_DIR)/$(SYNAPTICS_DRV) : $(SYNAPTICS_DRV)
- install --mode=0644 -D $< $@
+ install --mode=0755 -D $< $@
$(SYNAPTICS_DRV): $(OBJS)
$(RM) $@

View File

@ -1,62 +0,0 @@
diff -u synaptics-0.14.6.orig/Makefile synaptics-0.14.6/Makefile
--- synaptics-0.14.6.orig/Makefile 2006-07-15 17:58:26.000000000 +0200
+++ synaptics-0.14.6/Makefile 2007-09-07 15:03:17.386179198 +0200
@@ -34,10 +34,9 @@
LDCOMBINEFLAGS = -shared -lc
PICFLAG = $(call check_gcc,-fPIC,)
X_INCLUDES_ROOT = $(INSTALLED_X)
- SDKDIR = $(shell pkg-config xorg-server --variable=sdkdir)
ALLINCLUDES = -I. -I$(INSTALLED_X)/include/X11 \
-I$(INSTALLED_X)/include/X11/extensions \
- -I$(SDKDIR)
+ `pkg-config xorg-server --cflags`
else
INSTALLED_X = /usr/X11R6
INPUT_MODULE_DIR = $(DESTDIR)/$(INSTALLED_X)/$(LIBDIR)/modules/input
diff -u synaptics-0.14.6.orig/synaptics.c synaptics-0.14.6/synaptics.c
--- synaptics-0.14.6.orig/synaptics.c 2006-07-15 17:54:29.000000000 +0200
+++ synaptics-0.14.6/synaptics.c 2007-09-07 15:10:24.910542275 +0200
@@ -321,7 +321,9 @@
local->private_flags = 0;
local->flags = XI86_POINTER_CAPABLE | XI86_SEND_DRAG_EVENTS;
local->conf_idev = dev;
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) == 0
local->motion_history_proc = xf86GetMotionEvents;
+#endif
local->history_size = 0;
local->always_core_feedback = 0;
@@ -613,8 +615,17 @@
InitPointerDeviceStruct((DevicePtr)dev, map,
SYN_MAX_BUTTONS,
- miPointerGetMotionEvents, SynapticsCtrl,
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) == 0
+ miPointerGetMotionEvents,
+#else
+ GetMotionHistory,
+#endif
+ SynapticsCtrl,
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) == 0
miPointerGetMotionBufferSize());
+#else
+ GetMotionHistorySize(), 2);
+#endif
/* X valuator */
xf86InitValuatorAxisStruct(dev, 0, 0, -1, 1, 0, 1);
diff -u synaptics-0.14.6.orig/synaptics.h synaptics-0.14.6/synaptics.h
--- synaptics-0.14.6.orig/synaptics.h 2006-07-15 17:54:29.000000000 +0200
+++ synaptics-0.14.6/synaptics.h 2007-09-07 15:10:12.409829887 +0200
@@ -226,5 +226,11 @@
#endif /* SYNAPTICS_PRIVATE */
+/* Previously found in xf86Xinput.h */
+#ifdef DBG
+#undef DBG
+#endif
+
+#define DBG(lvl, f) {if ((lvl) <= xf86GetVerbosity()) f;}
#endif /* _SYNAPTICS_H_ */

View File

@ -1,5 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<herd>maintainer-wanted</herd>
</pkgmetadata>

View File

@ -1,104 +0,0 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/x11-drivers/synaptics/synaptics-0.14.6_p20070706-r1.ebuild,v 1.1 2008/08/30 22:33:17 calchan Exp $
inherit toolchain-funcs eutils linux-info
IUSE="hal"
DESCRIPTION="Driver for Synaptics touchpads"
HOMEPAGE="http://w1.894.telia.com/~u89404340/touchpad/"
SRC_URI="http://dev.gentoo.org/~calchan/distfiles/${P}.tar.bz2"
SLOT="0"
LICENSE="GPL-2"
KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
RDEPEND="x11-libs/libXext
hal? ( sys-apps/hal )"
DEPEND="${RDEPEND}
x11-base/xorg-server
x11-proto/inputproto
>=sys-apps/sed-4"
evdev-input_check() {
# Check kernel config for required event interface support (either
# built-in or as a module. Bug #134309.
ebegin "Checking kernel config for event device support"
linux_chkconfig_present INPUT_EVDEV
eend $?
if [[ $? -ne 0 ]] ; then
ewarn "Synaptics driver requires event interface support."
ewarn "Please enable the event interface in your kernel config."
ewarn "The option can be found at:"
ewarn
ewarn " Device Drivers"
ewarn " Input device support"
ewarn " -*- Generic input layer"
ewarn " <*> Event interface"
ewarn
ewarn "Then rebuild the kernel or install the module."
epause 5
fi
}
pkg_setup() {
linux-info_pkg_setup
evdev-input_check
}
src_unpack() {
unpack ${A} ; cd "${S}"
# Switch up the CC, CFLAGS and LDFLAGS stuff.
sed -i \
-e "s:CC = gcc:CC = $(tc-getCC) ${CFLAGS} ${LDFLAGS}:g" \
-e "/CC = / a\
LD = \$(CC)" \
-e "s:\$(CDEBUGFLAGS)::g" \
"${S}"/Makefile
# Fix grabbing of event devices so it will not stop working together with
# packages which grab their devices at their own like sys-apps/inputd does.
epatch "${FILESDIR}"/${P}-fixeventgrab.patch
epatch "${FILESDIR}"/${P}-input_api.patch
# Patch the Makefile to install the library as executable. Bug #215323.
epatch "${FILESDIR}"/synaptics-install-so-exec.patch
# Fix to handle multiple screens through Xinerama properly. Bug #206614.
epatch "${FILESDIR}"/synaptics-fix-xinerama.patch
# Adds configurable polling interval. Patch from Novell. Bug #216679.
epatch "${FILESDIR}"/${PN}-0.14.6-configurable_polling_interval.patch
epatch "${FILESDIR}"/synaptics-fix-xf86_ansic.h.patch
}
src_compile() {
emake || die
}
src_install() {
make \
DESTDIR="${D}" \
PREFIX=/usr \
MANDIR="${D}"/usr/share/man \
install || die
dodoc script/usbmouse script/usbhid alps.patch trouble-shooting.txt
dodoc COMPATIBILITY FILES INSTALL* NEWS TODO README*
# Stupid new daemon, didn't work for me because of shm issues
newinitd "${FILESDIR}"/rc.init syndaemon
newconfd "${FILESDIR}"/rc.conf syndaemon
if use hal ; then
# Have HAL assign this driver to supported touchpads.
insinto /usr/share/hal/fdi/policy/10osvendor
doins "${FILESDIR}"/11-x11-synaptics.fdi
fi
}

View File

@ -1,87 +0,0 @@
# ChangeLog for x11-misc/google-gadgets
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
# $Header: /var/cvsroot/gentoo-x86/x11-misc/google-gadgets/ChangeLog,v 1.13 2008/09/26 13:52:39 loki_val Exp $
09 Dec 2008; Mario Fetka <mario.fetka@gmail.com> ++,
-google-gadgets-0.10.3_pre20081105.ebuild:
Bump
26 Sep 2008; Peter Alfredsen <loki_val@gentoo.org>
google-gadgets-0.10.2-r2.ebuild:
!! instead of ! to block.
26 Sep 2008; Peter Alfredsen <loki_val@gentoo.org>
google-gadgets-0.10.2-r2.ebuild:
Add note about failure with <gcc-4.2
*google-gadgets-0.10.2-r2 (26 Sep 2008)
26 Sep 2008; Peter Alfredsen <loki_val@gentoo.org>
-google-gadgets-0.10.2.ebuild, -google-gadgets-0.10.2-r1.ebuild,
+google-gadgets-0.10.2-r2.ebuild:
Fix for 'undefined symbol: JS_SetOperationCallback', blocking
spidermonkey. Shifting to EAPI 2 and losing a lot of cruft. Fix sysdeps.h
being installed the wrong place, reported by Sput.
*google-gadgets-0.10.2-r1 (24 Sep 2008)
24 Sep 2008; Peter Alfredsen <loki_val@gentoo.org>
+google-gadgets-0.10.2-r1.ebuild:
Fix ggl crashing on startup.
http://code.google.com/p/google-gadgets-for-linux/issues/detail?id=220
*google-gadgets-0.10.2 (14 Sep 2008)
14 Sep 2008; Peter Alfredsen <loki_val@gentoo.org>
-google-gadgets-0.10.0-r1.ebuild, +google-gadgets-0.10.2.ebuild:
Bump for 0.10.2
24 Aug 2008; Peter Alfredsen <loki_val@gentoo.org>
google-gadgets-0.10.0-r1.ebuild, google-gadgets-0.10.0-r2.ebuild:
Remove ewarn about qt4, since qt-4.4.1 is now unmasked
*google-gadgets-0.10.0-r2 (20 Jul 2008)
20 Jul 2008; Peter Alfredsen <loki_val@gentoo.org>
+files/google-gadgets-0.10.0-xulrunner-1.9.patch,
-google-gadgets-0.10.0.ebuild, google-gadgets-0.10.0-r1.ebuild,
+google-gadgets-0.10.0-r2.ebuild:
Add fix to *really* build with xulrunner-1.9 plus fix ggl-gtk sometimes
not being able to quit.
*google-gadgets-0.10.0-r1 (16 Jul 2008)
16 Jul 2008; Peter Alfredsen <loki_val@gentoo.org>
+google-gadgets-0.10.0-r1.ebuild:
Bugfixes wrt bug 231990 (love to eva) and cleanup of ebuild.
*google-gadgets-0.10.0 (11 Jul 2008)
11 Jul 2008; Peter Alfredsen <loki_val@gentoo.org>
-files/google-gadgets-0.9.2-gcc43-test.patch,
-google-gadgets-0.9.2-r1.ebuild, -google-gadgets-0.9.3.ebuild,
+google-gadgets-0.10.0.ebuild:
Bump to 0.10.0, remove old.
*google-gadgets-0.9.3 (13 Jun 2008)
13 Jun 2008; Peter Alfredsen <loki_val@gentoo.org>
+google-gadgets-0.9.3.ebuild:
Version bump
11 Jun 2008; <welp@gentoo.org> google-gadgets-0.9.2-r1.ebuild:
Keyword ~amd64
*google-gadgets-0.9.2-r1 (08 Jun 2008)
08 Jun 2008; Peter Alfredsen <loki_val@gentoo.org>
+files/google-gadgets-0.9.2-gcc43-test.patch,
-google-gadgets-0.9.2.ebuild, +google-gadgets-0.9.2-r1.ebuild:
New ebuild with Desktop entries and fix for bug 225361.
*google-gadgets-0.9.2 (06 Jun 2008)
06 Jun 2008; Peter Alfredsen <loki_val@gentoo.org> +metadata.xml,
+google-gadgets-0.9.2.ebuild:
Initial commit.

View File

@ -1,4 +0,0 @@
AUX google-gadgets-0.10.0-xulrunner-1.9.patch 13284 RMD160 4bbb2f3ba511bafddd888a32641ee1e7224739be SHA1 b4ae542da4266e8e3fe70c8ce691e40c3d458b17 SHA256 7644f7b00a0e0b2c798079b6c62c4fd6ace16428e7d23c44e149ceb4ff5ca4d4
EBUILD google-gadgets-0.10.3_pre20081208.ebuild 4815 RMD160 56e0921c220411dc0480c1ea42133a4adc0f0147 SHA1 c261d1819f8965dcfd952495f4cc20f96e603c7e SHA256 5594e4d2afa08214e5ba9ce0e3d58f4f778a047a4a0f039fd23f015d3184ef1d
MISC ChangeLog 3010 RMD160 037280cf9ec2f838b3644757fdb4c9bacd7c921c SHA1 7d8a19a39862d65115241d4288d815a5e70c7f6a SHA256 41cf09667eb53f529dc14a323c47699bbdbcc4388a0cfcc967fdc1dff5d8294c
MISC metadata.xml 258 RMD160 e363fac4024fa1d6e8481465c06e42cbe2eb9e2a SHA1 26ea33fa143b55cfa84ee879aab41f1b5e337127 SHA256 960cfc8d2eda3540d50ea76f60889fb72e3dc8342ecd9dce2070517e4469f599

View File

@ -1,372 +0,0 @@
Index: extensions/gtkmoz_browser_element/browser_element.cc
===================================================================
--- extensions/gtkmoz_browser_element/browser_element.cc (revision 712)
+++ extensions/gtkmoz_browser_element/browser_element.cc (revision 713)
@@ -384,10 +384,6 @@
std::string down_fd_str = StringPrintf("%d", down_pipe_fds[0]);
std::string up_fd_str = StringPrintf("%d", up_pipe_fds[1]);
std::string ret_fd_str = StringPrintf("%d", ret_pipe_fds[0]);
-#ifdef MOZILLA_FIVE_HOME
- // Set appropriate environment variable for running mozilla gecko.
- setenv("MOZILLA_FIVE_HOME", MOZILLA_FIVE_HOME, 0);
-#endif
for (size_t i = 0; kBrowserChildNames[i]; ++i) {
execl(kBrowserChildNames[i], kBrowserChildNames[i],
down_fd_str.c_str(), up_fd_str.c_str(),
Index: extensions/gtkmoz_browser_element/browser_child.cc
===================================================================
--- extensions/gtkmoz_browser_element/browser_child.cc (revision 712)
+++ extensions/gtkmoz_browser_element/browser_child.cc (revision 713)
@@ -25,12 +25,18 @@
#include <gtk/gtk.h>
#define MOZILLA_CLIENT
+
+#ifdef XPCOM_GLUE
+#include <gtkmozembed_glue.cpp>
+#endif
+
#include <mozilla-config.h>
#include <gtkmozembed.h>
#include <gtkmozembed_internal.h>
#include <jsapi.h>
#include <jsconfig.h>
+#include <nsComponentManagerUtils.h>
#include <nsCOMPtr.h>
#include <nsCRT.h>
#include <nsEvent.h>
@@ -772,9 +778,9 @@
// Register external object (Javascript window.external object).
g_external_object.AddRef();
nsCOMPtr<nsIGenericFactory> factory;
- rv = NS_NewGenericFactory(getter_AddRefs(factory),
- &kExternalObjectComponentInfo);
+ factory = do_CreateInstance ("@mozilla.org/generic-factory;1", &rv);
NS_ENSURE_SUCCESS(rv, rv);
+ factory->SetComponentInfo(&kExternalObjectComponentInfo);
rv = registrar->RegisterFactory(kExternalObjectComponentInfo.mCID,
EXTOBJ_CLASSNAME, EXTOBJ_CONTRACTID,
factory);
@@ -787,9 +793,9 @@
// Register customized content policy.
g_content_policy.AddRef();
- rv = NS_NewGenericFactory(getter_AddRefs(factory),
- &kContentPolicyComponentInfo);
+ factory = do_CreateInstance ("@mozilla.org/generic-factory;1", &rv);
NS_ENSURE_SUCCESS(rv, rv);
+ factory->SetComponentInfo(&kContentPolicyComponentInfo);
rv = registrar->RegisterFactory(kContentPolicyComponentInfo.mCID,
CONTENT_POLICY_CLASSNAME,
CONTENT_POLICY_CONTRACTID,
@@ -803,8 +809,64 @@
return rv;
}
+static bool InitGecko() {
+#ifdef XPCOM_GLUE
+ nsresult rv;
+
+ NS_LogInit();
+ static const GREVersionRange kGREVersion = {
+ "1.9a", PR_TRUE,
+ "1.9.*", PR_TRUE
+ };
+
+ char xpcom_location[4096];
+ rv = GRE_GetGREPathWithProperties(&kGREVersion, 1, nsnull, 0, xpcom_location, 4096);
+ if (NS_FAILED(rv)) {
+ g_warning("Failed to find proper Gecko Runtime Environment!");
+ return false;
+ }
+
+ // Startup the XPCOM Glue that links us up with XPCOM.
+ rv = XPCOMGlueStartup(xpcom_location);
+ if (NS_FAILED(rv)) {
+ g_warning("Failed to startup XPCOM Glue!");
+ return false;
+ }
+
+ rv = GTKEmbedGlueStartup();
+ if (NS_FAILED(rv)) {
+ g_warning("Failed to startup Gtk Embed Glue!");
+ return false;
+ }
+
+ rv = GTKEmbedGlueStartupInternal();
+ if (NS_FAILED(rv)) {
+ g_warning("Failed to startup Gtk Embed Glue (internal)!");
+ return false;
+ }
+
+ char *last_slash = strrchr(xpcom_location, '/');
+ if (last_slash)
+ *last_slash = '\0';
+
+ gtk_moz_embed_set_path(xpcom_location);
+#elif defined(MOZILLA_FIVE_HOME)
+ gtk_moz_embed_set_comp_path(MOZILLA_FIVE_HOME);
+#endif
+ return true;
+}
+
int main(int argc, char **argv) {
+ if (!g_thread_supported())
+ g_thread_init(NULL);
+
gtk_init(&argc, &argv);
+
+ if (!InitGecko()) {
+ g_warning("Failed to initialize Gecko.");
+ return 1;
+ }
+
signal(SIGPIPE, OnSigPipe);
if (argc >= 2)
g_down_fd = g_ret_fd = static_cast<int>(strtol(argv[1], NULL, 0));
Index: hosts/gtk/sidebar_gtk_host.cc
===================================================================
--- hosts/gtk/sidebar_gtk_host.cc (revision 712)
+++ hosts/gtk/sidebar_gtk_host.cc (revision 713)
@@ -203,9 +203,9 @@
void OnHotKeyPressed() {
if (!gadgets_shown_ || sidebar_->IsMinimized())
- ShowOrHideAllGadgets(true);
+ ShowOrHideAll(true);
else
- ShowOrHideAllGadgets(false);
+ ShowOrHideAll(false);
}
void OnWorkAreaChange() {
@@ -356,9 +356,9 @@
void OnSideBarClose() {
if (!gadgets_shown_ || sidebar_->IsMinimized())
- ShowOrHideAllGadgets(true);
+ ShowOrHideAll(true);
else
- ShowOrHideAllGadgets(false);
+ ShowOrHideAll(false);
}
void OnSideBarSizeEvent() {
@@ -1142,9 +1142,14 @@
return false;
}
+ void ShowOrHideAll(bool show) {
+ DLOG("ShowOrHideAll(%d)", show);
+ ShowOrHideSideBar(show);
+ ShowOrHideAllGadgets(show);
+ gadgets_shown_ = show;
+ }
+
void ShowOrHideAllGadgets(bool show) {
- DLOG("ShowOrHideAllGadgets(%d)", show);
- ShowOrHideSideBar(show);
for (GadgetsMap::iterator it = gadgets_.begin();
it != gadgets_.end(); ++it) {
if (it->second.gadget->GetDisplayTarget() != Gadget::TARGET_SIDEBAR) {
@@ -1158,7 +1163,6 @@
OnMainViewPopIn(it->first);
}
}
- gadgets_shown_ = show;
}
void ShowOrHideSideBar(bool show) {
@@ -1421,11 +1425,11 @@
}
void ShowAllMenuHandler(const char *str) {
- ShowOrHideAllGadgets(true);
+ ShowOrHideAll(true);
}
void HideAllMenuHandler(const char *str) {
- ShowOrHideAllGadgets(false);
+ ShowOrHideAll(false);
}
void AutoHideMenuHandler(const char *str) {
@@ -1551,6 +1555,9 @@
g_source_remove(impl->auto_hide_source_);
impl->auto_hide_source_ = 0;
}
+ if (widget == impl->sidebar_window_ && !impl->sidebar_->IsMinimized()) {
+ impl->ShowOrHideAllGadgets(true);
+ }
return FALSE;
}
@@ -1613,9 +1620,9 @@
#if GTK_CHECK_VERSION(2,10,0) && defined(GGL_HOST_LINUX)
static void StatusIconActivateHandler(GtkWidget *widget, Impl *impl) {
if (!impl->gadgets_shown_ || impl->sidebar_->IsMinimized())
- impl->ShowOrHideAllGadgets(true);
+ impl->ShowOrHideAll(true);
else
- impl->ShowOrHideAllGadgets(false);
+ impl->ShowOrHideAll(false);
}
static void StatusIconPopupMenuHandler(GtkWidget *widget, guint button,
Index: ggadget/gtk/single_view_host.cc
===================================================================
--- ggadget/gtk/single_view_host.cc (revision 712)
+++ ggadget/gtk/single_view_host.cc (revision 713)
@@ -339,9 +339,9 @@
if (record_states_)
LoadWindowStates();
- // Show window immediately. So that following calls against the window can
- // take effect immediately.
- gtk_widget_show_now(window_);
+ // Can't use gtk_widget_show_now() here, because in some cases, it'll cause
+ // nested main loop and prevent ggl-gtk from being quitted.
+ gtk_widget_show(window_);
gtk_window_present(GTK_WINDOW(window_));
gdk_window_raise(window_->window);
Index: ggadget/decorated_view_host.cc
===================================================================
--- ggadget/decorated_view_host.cc (revision 712)
+++ ggadget/decorated_view_host.cc (revision 713)
@@ -82,6 +82,7 @@
hittest_(HT_CLIENT),
child_resizable_(ViewInterface::RESIZABLE_ZOOM),
auto_restore_view_size_(true),
+ view_state_restored_(false),
child_view_(NULL),
view_element_(new ViewElement(NULL, this, NULL, false)) {
view_element_->SetVisible(true);
@@ -104,6 +105,7 @@
child_view_ = child_view;
view_element_->SetChildView(child_view);
+ view_state_restored_ = false;
if (child_view_) {
child_resizable_ = child_view_->GetResizable();
@@ -401,7 +403,8 @@
}
virtual void SaveViewStates() {
- if (!auto_restore_view_size_)
+ // Don't save view state if the view state is not restored yet.
+ if (!auto_restore_view_size_ || !view_state_restored_)
return;
View *child = GetChildView();
Gadget *gadget = child ? child->GetGadget() : NULL;
@@ -430,7 +433,8 @@
View *child = GetChildView();
Gadget *gadget = child ? child->GetGadget() : NULL;
// Only load view states when the original size has been saved.
- if (gadget) {
+ // Only restore view state once.
+ if (gadget && !view_state_restored_) {
OptionsInterface *opt = gadget->GetOptions();
ViewElement *elm = GetViewElement();
std::string prefix(option_prefix_);
@@ -458,6 +462,9 @@
DLOG("RestoreViewStates(%d): w:%.0lf h:%.0lf s: %.2lf",
gadget->GetInstanceID(), elm->GetPixelWidth(),
elm->GetPixelHeight(), elm->GetScale());
+
+ // It's safe to save view state from now on.
+ view_state_restored_ = true;
UpdateViewSize();
UpdateChildViewSize();
}
@@ -533,6 +540,7 @@
HitTest hittest_;
ViewInterface::ResizableMode child_resizable_;
bool auto_restore_view_size_;
+ bool view_state_restored_;
View *child_view_;
ViewElement *view_element_;
@@ -850,7 +858,7 @@
virtual void SaveViewStates() {
Gadget *gadget = GetGadget();
- if (gadget) {
+ if (gadget && minimized_state_loaded_) {
OptionsInterface *opt = gadget->GetOptions();
opt->PutInternalValue("main_view_minimized", Variant(minimized_));
DLOG("SaveViewStates(%d): main view minimized: %s",
Index: configure.ac
===================================================================
--- configure.ac (revision 712)
+++ configure.ac (revision 713)
@@ -551,15 +551,25 @@
PKG_CHECK_MODULES(RSVG, librsvg-2.0 >= 2.14.0, [has_rsvg=yes], [has_rsvg=no])
# Check gtkmozembed
-PKG_CHECK_MODULES(GTKMOZEMBED, [xulrunner-gtkmozembed xulrunner-js],
- [has_gtkmozembed=xulrunner-gtkmozembed],
- [PKG_CHECK_MODULES(GTKMOZEMBED, [firefox2-gtkmozembed firefox2-js],
- [has_gtkmozembed=firefox2-gtkmozembed],
- [PKG_CHECK_MODULES(GTKMOZEMBED, [firefox-gtkmozembed firefox-js],
- [has_gtkmozembed=firefox-gtkmozembed],
- [PKG_CHECK_MODULES(GTKMOZEMBED, [mozilla-gtkmozembed mozilla-js],
- [has_gtkmozembed=mozilla-gtkmozembed],
- [has_gtkmozembed=no])])])])
+# Check priority:
+# xulrunner 1.9: mozilla-gtkmozembed-embedding and mozilla-js
+# xulrunner 1.9: libxul-embedding-unstable and mozilla-js
+# xulrunner 1.8: xulrunner-gtkmozembed and xulrunner-js
+# firefox 2.0: firefox2-gtkmozembed and firefox2-js
+# firefox 1.5: firefox-gtkmozembed and firefox-js
+#
+# Add more rules here if your distribution doesn't support above rules.
+PKG_CHECK_MODULES(GTKMOZEMBED, [mozilla-gtkmozembed-embedding mozilla-js],
+ [has_gtkmozembed=mozilla-gtkmozembed-embedding],
+ [PKG_CHECK_MODULES(GTKMOZEMBED, [libxul-embedding-unstable mozilla-js],
+ [has_gtkmozembed=libxul-embedding-unstable],
+ [PKG_CHECK_MODULES(GTKMOZEMBED, [xulrunner-gtkmozembed xulrunner-js],
+ [has_gtkmozembed=xulrunner-gtkmozembed],
+ [PKG_CHECK_MODULES(GTKMOZEMBED, [firefox2-gtkmozembed firefox2-js],
+ [has_gtkmozembed=firefox2-gtkmozembed],
+ [PKG_CHECK_MODULES(GTKMOZEMBED, [firefox-gtkmozembed firefox-js],
+ [has_gtkmozembed=firefox-gtkmozembed],
+ [has_gtkmozembed=no])])])])])
if test x$has_dbus = xyes; then
AC_DEFINE(HAVE_DBUS_LIBRARY,1,[Have dbus library])
@@ -677,21 +687,26 @@
GTKMOZEMBED_CFLAGS="$GTKMOZEMBED_CFLAGS -I$EMBED_INCDIR/dom"
GTKMOZEMBED_CFLAGS="$GTKMOZEMBED_CFLAGS -I$EMBED_INCDIR/xpconnect"
GTKMOZEMBED_CFLAGS="$GTKMOZEMBED_CFLAGS -I$EMBED_INCDIR/widget"
+ GTKMOZEMBED_LDFLAGS=""
MOZILLA_FIVE_HOME=`$PKG_CONFIG --variable=libdir $has_gtkmozembed`
if test "x$MOZILLA_FIVE_HOME" = "x"; then
# Some distributions doesn't have libdir, so try to extract libdir from LIBS.
+# It usually occurs on some pre xulrunner 1.9 versions.
# @<:@ and @:>@ will be replace by [ and ] by M4. Really evil.
+# FIXME: Following method might not work on systems other than Linux.
MOZILLA_FIVE_HOME=`echo $GTKMOZEMBED_LIBS | sed -e 's/.*-L\(@<:@^ @:>@*\) .*/\1/'`
- if test ! -e "$MOZILLA_FIVE_HOME"; then
- MOZILLA_FIVE_HOME=""
+ # Try to find out the correct xulrunner path.
+ if test -e "$MOZILLA_FIVE_HOME/libxpcom.so"; then
+ XPCOM_PATH=`readlink -f $MOZILLA_FIVE_HOME/libxpcom.so`
+ MOZILLA_FIVE_HOME=`dirname $XPCOM_PATH`
fi
fi
- PREDEFINED_MACROS="$PREDEFINED_MACROS -DMOZILLA_FIVE_HOME=\\\"$MOZILLA_FIVE_HOME\\\""
- AC_SUBST(MOZILLA_FIVE_HOME)
- if test "x$MOZILLA_FIVE_HOME" != "x"; then
+ if test "x$MOZILLA_FIVE_HOME" != "x" -a -d "$MOZILLA_FIVE_HOME"; then
+ GTKMOZEMBED_CFLAGS="$GTKMOZEMBED_CFLAGS -DMOZILLA_FIVE_HOME=\\\"$MOZILLA_FIVE_HOME\\\""
GTKMOZEMBED_LDFLAGS="$GTKMOZEMBED_LDFLAGS -R$MOZILLA_FIVE_HOME"
- AC_SUBST(GTKMOZEMBED_LDFLAGS)
fi
+
+ AC_SUBST(GTKMOZEMBED_LDFLAGS)
fi
AM_CONDITIONAL(

View File

@ -1,153 +0,0 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/x11-misc/google-gadgets/google-gadgets-0.10.2-r2.ebuild,v 1.3 2008/09/26 13:52:39 loki_val Exp $
EAPI=2
inherit base autotools multilib eutils fdo-mime subversion libtool
MY_PN=${PN}-for-linux
MY_P=${MY_PN}-${PV}
DESCRIPTION="Cool gadgets from Google for your Desktop"
HOMEPAGE="http://code.google.com/p/google-gadgets-for-linux/"
#SRC_URI="http://${MY_PN}.googlecode.com/files/${MY_P}.tar.bz2"
ESVN_REPO_URI="http://google-gadgets-for-linux.googlecode.com/svn/trunk/@{${PV/0.10.3_pre/}}"
LICENSE="Apache-2.0"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="+dbus debug +gtk +qt4 +gstreamer"
# Weird things happen when we start mix-n-matching, so for the time being
# I've just locked the deps to the versions I had as of Summer 2008. With any
# luck, they'll be stable when we get to stabling this package.
# FIXME: ggl should be able to compile with xulrunner-1.9, xulrunner-1.8 and
# various combinations of mozilla and spidermonkey. Since its configure script
# is broken, though, I've hacked it to depend only on xulrunner-1.9, to avoid
# mid-air symbol collisions. A giant bonanza of automagic is what it takes to get
# this to work. I say blah. Blocking spidermonkey to avoid incorrect linking.
#BIG DANGLING NOTE: This fails with gcc <4.2.
RDEPEND="x11-libs/libX11
x11-libs/libXext
>=dev-libs/libxml2-2.6.32
sys-libs/zlib
net-libs/xulrunner:1.9
!!dev-lang/spidermonkey
dbus? ( sys-apps/dbus )
gstreamer? ( >=media-libs/gstreamer-0.10.19
>=media-libs/gst-plugins-base-0.10.19 )
gtk? ( dbus? ( >=dev-libs/dbus-glib-0.74 )
>=x11-libs/cairo-1.6.4
>=x11-libs/gtk+-2.12.10
>=x11-libs/pango-1.20.3
gnome-base/librsvg
>=net-misc/curl-7.18.2[ssl,-nss,-gnutls]
>=dev-libs/atk-1.22.0 )
qt4? ( dbus? ( >=x11-libs/qt-dbus-4.4.0 )
>=x11-libs/qt-core-4.4.0
>=x11-libs/qt-webkit-4.4.0
>=x11-libs/qt-xmlpatterns-4.4.0
>=x11-libs/qt-opengl-4.4.0
>=x11-libs/qt-script-4.4.0 )"
DEPEND="${RDEPEND}
>=dev-util/pkgconfig-0.20"
# S="${WORKDIR}/${MY_P}"
RESTRICT="test"
pkg_setup() {
# If a non-google, non-qt4 and non-gtk host system for google-gadgets is ever developed,
# I'll consider changing the error below.
if ! use gtk && ! use qt4
then
eerror "You must choose which toolkit to build for. Either qt4 or gtk can be"
eerror "chosen. For qt4, see also above. To enable \$toolkit, do:"
eerror "echo \"${CATEGORY}/${PN} \$toolkit\" >> /etc/portage/package.use"
die "You need to choose a toolkit"
fi
if ! use gstreamer
then
ewarn "Disabling gstreamer disables the multimedia functions of ${PN}."
ewarn "This is not recommended. To enable gstreamer, do:"
ewarn "echo \"${CATEGORY}/${PN} gstreamer\" >> /etc/portage/package.use"
fi
}
src_unpack() {
subversion_src_unpack
cd "${S}"
sed -i -r \
-e '/^GGL_SYSDEPS_INCLUDE_DIR/ c\GGL_SYSDEPS_INCLUDE_DIR=$GGL_INCLUDE_DIR' \
configure.ac||die "404"
libtoolize -i --ltdl
eautoreconf
}
src_configure() {
#For the time being, the smjs-script runtime is required for both gtk and qt
#versions, but the goal is to make the qt4 version depend only on qt-script.
has_pkg_smjs=no \
econf --disable-dependency-tracking \
--disable-update-desktop-database \
--disable-update-mime-database \
--disable-werror \
--enable-libxml2-xml-parser \
--enable-smjs-script-runtime \
--with-gtkmozembed=libxul \
--with-smjs-cppflags=-I/usr/include/nspr \
--with-smjs-libdir=/usr/$(get_libdir)/xulrunner-1.9 \
--with-smjs-incdir=/usr/include/xulrunner-1.9/unstable \
$(use_enable debug) \
$(use_enable dbus libggadget-dbus) \
$(use_enable gstreamer gst-audio-framework) \
$(use_enable gstreamer gst-mediaplayer-element) \
$(use_enable gtk gtk-host) \
$(use_enable gtk libggadget-gtk ) \
$(use_enable gtk gtkmoz-browser-element) \
$(use_enable gtk gtk-system-framework) \
$(use_enable gtk curl_xml_http_request) \
$(use_enable qt4 qt-host) \
$(use_enable qt4 libggadget-qt) \
$(use_enable qt4 qt-system-framework) \
$(use_enable qt4 qtwebkit-browser-element) \
$(use_enable qt4 qt-xml-http-request) \
$(use_enable qt4 qt-script-runtime) \
|| die "econf failed"
}
src_compile() {
default_src_compile
#See https://bugs.gentoo.org/238753
}
src_test() {
#If someone wants to guarantee that emake will not make
#tests fail promiscuosly, please do, otherwise we're using make.
make check &> "${WORKDIR}"/check
}
pkg_postinst() {
fdo-mime_desktop_database_update
fdo-mime_mime_database_update
}
curl_die() {
eerror "net-misc/curl must be built with these use flags: ssl -gnutls -nss"
eerror "to do so, do:"
eerror 'echo "net-misc/curl ssl -gnutls -nss" >> /etc/portage/package.use'
die "Your net-misc/curl was misconfigured."
}

View File

@ -1,9 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<herd>no-herd</herd>
<maintainer>
<email>loki_val@gentoo.org</email>
<name>Peter Alfredsen</name>
</maintainer>
</pkgmetadata>