xserver-common: use git patches and add functions file

* otherwise we were depending on initscripts to provide it without RDEPENDing on it

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Acked-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
This commit is contained in:
Martin Jansa
2012-04-11 13:14:59 +00:00
committed by Koen Kooi
parent 189f61dc46
commit bc0243c2a2
21 changed files with 434 additions and 221 deletions
@@ -1,10 +1,18 @@
COPYING: add GPLv2 license file From 834fa06920f88ceedf752964c8e296c653d541e4 Mon Sep 17 00:00:00 2001
From: Yu Ke <ke.yu@intel.com>
Date: Wed, 11 Apr 2012 14:26:16 +0200
Subject: [PATCH 01/12] COPYING: add GPLv2 license file
this is a local file recipe and the license file is missing.In order this is a local file recipe and the license file is missing.In order
to pass the license checksum checking, the license file is needed. So to pass the license checksum checking, the license file is needed. So
this patch add the GPLv2 license file. this patch add the GPLv2 license file.
Signed-off-by: Yu Ke <ke.yu@intel.com> Signed-off-by: Yu Ke <ke.yu@intel.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
COPYING | 339 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 339 insertions(+), 0 deletions(-)
create mode 100644 COPYING
diff --git a/COPYING b/COPYING diff --git a/COPYING b/COPYING
new file mode 100644 new file mode 100644
@@ -351,3 +359,6 @@ index 0000000..d511905
+consider it more useful to permit linking proprietary applications with the +consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Lesser General +library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. +Public License instead of this License.
--
1.7.8.5
@@ -0,0 +1,112 @@
From 3d1a1a8273112668927a6c6bb3e361e896f5b229 Mon Sep 17 00:00:00 2001
From: Martin Jansa <Martin.Jansa@gmail.com>
Date: Wed, 11 Apr 2012 14:28:45 +0200
Subject: [PATCH 02/12] add setdpi Xinit.d script
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
X11/Xinit.d/50setdpi | 92 ++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 92 insertions(+), 0 deletions(-)
create mode 100644 X11/Xinit.d/50setdpi
diff --git a/X11/Xinit.d/50setdpi b/X11/Xinit.d/50setdpi
new file mode 100644
index 0000000..04a2edd
--- /dev/null
+++ b/X11/Xinit.d/50setdpi
@@ -0,0 +1,92 @@
+#! /bin/sh
+#
+# Copyright Matthias Hentges <devel@hentges.net> (c) 2006
+# License: GPL (see http://www.gnu.org/licenses/gpl.txt for a copy of the license)
+#
+# Filename: setDPI.sh
+# Date: 09-Apr-06
+
+# This script configures Xft.dpi dependent on your screens DPI. This insures that the same font-size
+# setting of 7 can be used on all machines.
+
+
+XDEFAULTS="/etc/X11/Xdefaults"
+
+
+
+set_dpi() {
+
+ CURRENT_SETTING="`cat ${XDEFAULTS} | sed -n "/Xft.dpi\:/s/.*\:\(.*\)/\1/p" | sed -n "s/\ //p"`"
+
+ if test "$CURRENT_SETTING" != "$1"
+ then
+ echo "Using Xft.dpi of $SET_SCREEN_DPI for your $SCREEN_DPI DPI screen"
+
+ if grep -q "Xft.dpi" "$XDEFAULTS"
+ then
+ cat "${XDEFAULTS}" | sed "s/^Xft.dpi\:.*/Xft.dpi\: $SET_SCREEN_DPI/" > "${XDEFAULTS}_"
+ mv "${XDEFAULTS}_" "${XDEFAULTS}"
+ else
+ echo -e "Xft.dpi: $SET_SCREEN_DPI\n" >> "$XDEFAULTS"
+ fi
+ else
+ echo "Your $SCREEN_DPI DPI screen is already configured."
+ fi
+}
+
+set_rxvt_font() {
+
+ CURRENT_SETTING="`cat ${XDEFAULTS} | sed -n "/Rxvt\*font/s/\(.*\pixelsize=\)\(.*\)/\2/p"`"
+
+ if test "$1" -gt 100
+ then
+
+ # Configure the rxvt font-size for your screen here:
+ test "$1" -gt 180 -a "$1" -lt "221" && RXVT_FONT_SIZE=16
+
+ if test -z "$RXVT_FONT_SIZE"
+ then
+ echo "WARNING: No rxvt font-size configured for a $SCREEN_DPI DPI screen!"
+ echo "Defaulting to size 9"
+ RXVT_FONT_SIZE=9
+ fi
+
+ if test "$CURRENT_SETTING" != "$RXVT_FONT_SIZE"
+ then
+ echo "Using a rxvt font-size of $RXVT_FONT_SIZE"
+ cat ${XDEFAULTS} | sed "/Rxvt\*font/s/\(.*\pixelsize\)\(=*.*\)/\1=$RXVT_FONT_SIZE/" > ${XDEFAULTS}_
+ mv ${XDEFAULTS}_ ${XDEFAULTS}
+ else
+ echo "The rxvt font-size is already configured"
+ fi
+ fi
+}
+
+if test -z "$DISPLAY"
+then
+ echo "DISPLAY is not set, aborting..."
+ exit 0
+fi
+
+SCREEN_DPI="`/usr/bin/xdpyinfo | grep "dots per inch" | awk '{print $2}'| sed -n "s/\(.*\)x\(.*\)/\2/p"`"
+
+if test -z "$SCREEN_DPI"
+then
+ echo "WARNING: Couldn't read your screens DPI, defaulting to 100"
+ SCREEN_DPI=100
+fi
+
+# Configure your screen here:
+test "$SCREEN_DPI" -gt 180 -a "$SCREEN_DPI" -lt "221" && SET_SCREEN_DPI=160
+test "$SCREEN_DPI" -gt 90 -a "$SCREEN_DPI" -lt "121" && SET_SCREEN_DPI=100
+
+
+if test -z "$SET_SCREEN_DPI"
+then
+ echo "WARNING: No default configuration found for your $SCREEN_DPI DPI screen!"
+ echo "Using 100 DPI"
+ SET_SCREEN_DPI=100
+fi
+
+set_dpi "$SET_SCREEN_DPI"
+set_rxvt_font "$SCREEN_DPI"
--
1.7.8.5
@@ -0,0 +1,29 @@
From a93a86c2ff1ca5eb35615f4e1568409ff342aa7f Mon Sep 17 00:00:00 2001
From: Martin Jansa <Martin.Jansa@gmail.com>
Date: Wed, 11 Apr 2012 14:29:41 +0200
Subject: [PATCH 03/12] add 89xdgautostart Xsession.d script
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
X11/Xsession.d/89xdgautostart | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
create mode 100644 X11/Xsession.d/89xdgautostart
diff --git a/X11/Xsession.d/89xdgautostart b/X11/Xsession.d/89xdgautostart
new file mode 100644
index 0000000..9886f9f
--- /dev/null
+++ b/X11/Xsession.d/89xdgautostart
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+XDGAUTOSTART=/etc/xdg/autostart
+if [ -d $XDGAUTOSTART ] ; then
+ for SCRIPT in $XDGAUTOSTART/*; do
+ CMD=`grep ^Exec= $SCRIPT | cut -d '=' -f 2`
+ $CMD &
+ done
+fi
--
1.7.8.5
@@ -0,0 +1,27 @@
From 2877156d5bbc11f8d8e8d6aafd138173d2a4bd3b Mon Sep 17 00:00:00 2001
From: Martin Jansa <Martin.Jansa@gmail.com>
Date: Wed, 11 Apr 2012 14:31:34 +0200
Subject: [PATCH 04/12] add Ts_Calibrate_xinput_calibrator Xsession.d script
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
X11/Xsession.d/89xTs_Calibrate_xinput_calibrator | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
create mode 100644 X11/Xsession.d/89xTs_Calibrate_xinput_calibrator
diff --git a/X11/Xsession.d/89xTs_Calibrate_xinput_calibrator b/X11/Xsession.d/89xTs_Calibrate_xinput_calibrator
new file mode 100644
index 0000000..6ef4d1e
--- /dev/null
+++ b/X11/Xsession.d/89xTs_Calibrate_xinput_calibrator
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+if [ -e /usr/bin/xinput_calibrator_once.sh ] ; then
+ if [ -e /etc/pointercal.xinput ] ; then
+ /usr/bin/xinput_calibrator_once.sh
+ fi
+fi
--
1.7.8.5
@@ -0,0 +1,26 @@
From b01a532ebb525552e23d7169a2aeb55c42b3ec99 Mon Sep 17 00:00:00 2001
From: Martin Jansa <Martin.Jansa@gmail.com>
Date: Wed, 11 Apr 2012 14:32:13 +0200
Subject: [PATCH 05/12] add XWindowManager Xsession.d script
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
X11/Xsession.d/90xXWindowManager | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
create mode 100644 X11/Xsession.d/90xXWindowManager
diff --git a/X11/Xsession.d/90xXWindowManager b/X11/Xsession.d/90xXWindowManager
new file mode 100644
index 0000000..3df8435
--- /dev/null
+++ b/X11/Xsession.d/90xXWindowManager
@@ -0,0 +1,6 @@
+#!/bin/sh
+if [ -x $HOME/.Xsession ]; then
+ exec $HOME/.Xsession
+else
+ exec /usr/bin/x-window-manager
+fi
--
1.7.8.5
@@ -0,0 +1,26 @@
From 0c42e1fb84cc2bfe768bed17f3b979aca868cf64 Mon Sep 17 00:00:00 2001
From: Martin Jansa <Martin.Jansa@gmail.com>
Date: Wed, 11 Apr 2012 14:34:43 +0200
Subject: [PATCH 06/12] add support for /etc/X11/xserver-system
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
X11/xserver-common | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/X11/xserver-common b/X11/xserver-common
index 4c7ed6e..6d8c9df 100644
--- a/X11/xserver-common
+++ b/X11/xserver-common
@@ -204,3 +204,8 @@ fi
if [ "$XSERVER" != "Xorg" ] ; then
ARGS="$ARGS $MOUSE $KDRIVEARGS"
fi
+
+# let a local script modify the variables
+if [ -e /etc/X11/xserver-system ] ; then
+ . /etc/X11/xserver-system
+fi
--
1.7.8.5
@@ -0,0 +1,87 @@
From 63e6b9a54e1f12dbf7ddbfe3376fff4c382421a5 Mon Sep 17 00:00:00 2001
From: Martin Jansa <Martin.Jansa@gmail.com>
Date: Wed, 11 Apr 2012 14:36:02 +0200
Subject: [PATCH 07/12] use own functions file instead /etc/init.d/functions
* so we don't have to depend on initscripts
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
Makefile | 1 +
X11/Xinit.d/11zaurus | 2 +-
X11/Xinit.d/12keymap | 2 +-
X11/functions | 11 +++++++++++
X11/xserver-common | 2 +-
5 files changed, 15 insertions(+), 3 deletions(-)
create mode 100644 X11/functions
diff --git a/Makefile b/Makefile
index e2d9af9..caa5de1 100644
--- a/Makefile
+++ b/Makefile
@@ -23,6 +23,7 @@ install-program:
install -m 755 X11/Xserver $(DESTDIR)/etc/X11/Xserver
install -m 755 X11/Xsession $(DESTDIR)/etc/X11/Xsession
install -m 755 X11/xserver-common $(DESTDIR)/etc/X11/xserver-common
+ install -m 755 X11/functions $(DESTDIR)/etc/X11/functions
install -d $(DESTDIR)/etc/X11/xmodmap
install -m 644 X11/xmodmap/*.xmodmap $(DESTDIR)/etc/X11/xmodmap
install -m 644 X11/xmodmap/xmodmap-* $(DESTDIR)/etc/X11/xmodmap
diff --git a/X11/Xinit.d/11zaurus b/X11/Xinit.d/11zaurus
index 54ea6f5..23e7713 100644
--- a/X11/Xinit.d/11zaurus
+++ b/X11/Xinit.d/11zaurus
@@ -8,7 +8,7 @@ else
CHCK=chkhinge
fi
-. /etc/init.d/functions
+. /etc/X11/functions
$CHCK -e
if [ $? = 12 ]; then
diff --git a/X11/Xinit.d/12keymap b/X11/Xinit.d/12keymap
index 7eac296..b7a7f2d 100644
--- a/X11/Xinit.d/12keymap
+++ b/X11/Xinit.d/12keymap
@@ -1,6 +1,6 @@
#!/bin/sh
-. /etc/init.d/functions
+. /etc/X11/functions
# since kdrive 1.4 there is no default keymap in server
xmodmap - </etc/X11/xmodmap/default.xmodmap
diff --git a/X11/functions b/X11/functions
new file mode 100644
index 0000000..a1311ad
--- /dev/null
+++ b/X11/functions
@@ -0,0 +1,11 @@
+# -*-Shell-script-*-
+#
+# functions This file contains functions shared by few X11 scripts
+# machine_id also exists in /etc/init.d/functions but some
+# people don't use initscripts anymore
+#
+
+machine_id() { # return the machine ID
+ awk 'BEGIN { FS=": " } /Hardware/ \
+ { gsub(" ", "_", $2); print tolower($2) } ' </proc/cpuinfo
+}
diff --git a/X11/xserver-common b/X11/xserver-common
index 6d8c9df..de92bb7 100644
--- a/X11/xserver-common
+++ b/X11/xserver-common
@@ -30,7 +30,7 @@ if [ -f /etc/profile ]; then
. /etc/profile
fi
-. /etc/init.d/functions
+. /etc/X11/functions
fallback_screen_arg() {
geom=`fbset | grep geometry`
--
1.7.8.5
@@ -1,9 +1,19 @@
xdpyinfo returns 96, but 285 is right value (but 280 is used as it renders 4 columns of illume icons instead of 3 and empty space) From 0ee7bf87e0c83abc79de3a99dfa3c87dd5c5b229 Mon Sep 17 00:00:00 2001
From: Martin Jansa <Martin.Jansa@gmail.com>
Date: Wed, 11 Apr 2012 14:37:29 +0200
Subject: [PATCH 08/12] xserver-common: add dpi and nocursor params for gta01
and gta02
diff -uNr xserver-common-1.33.orig//X11/xserver-common xserver-common-1.33/X11/xserver-common Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
--- xserver-common-1.33.orig//X11/xserver-common 2010-04-28 23:27:10.000000000 +0200 ---
+++ xserver-common-1.33/X11/xserver-common 2010-04-28 23:29:07.000000000 +0200 X11/xserver-common | 8 ++++++--
@@ -133,19 +133,19 @@ 1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/X11/xserver-common b/X11/xserver-common
index de92bb7..f76fa5f 100644
--- a/X11/xserver-common
+++ b/X11/xserver-common
@@ -133,15 +133,19 @@ else
ARGS="$ARGS -screen ${SCREEN_SIZE}" ARGS="$ARGS -screen ${SCREEN_SIZE}"
DPI="225" ;; DPI="225" ;;
"gta01" ) "gta01" )
@@ -11,8 +21,7 @@ diff -uNr xserver-common-1.33.orig//X11/xserver-common xserver-common-1.33/X11/x
+ DPI="280" + DPI="280"
if [ "$XSERVER" != "Xorg" ] ; then if [ "$XSERVER" != "Xorg" ] ; then
ARGS="$ARGS -screen 480x640" ARGS="$ARGS -screen 480x640"
else + else
- ARGS="$ARGS -nocursor"
+ ARGS="$ARGS -dpi ${DPI} -nocursor" + ARGS="$ARGS -dpi ${DPI} -nocursor"
fi fi
;; ;;
@@ -21,9 +30,11 @@ diff -uNr xserver-common-1.33.orig//X11/xserver-common xserver-common-1.33/X11/x
+ DPI="280" + DPI="280"
if [ "$XSERVER" != "Xorg" ] ; then if [ "$XSERVER" != "Xorg" ] ; then
ARGS="$ARGS -screen ${SCREEN_SIZE}" ARGS="$ARGS -screen ${SCREEN_SIZE}"
else + else
- ARGS="$ARGS -nocursor"
+ ARGS="$ARGS -dpi ${DPI} -nocursor" + ARGS="$ARGS -dpi ${DPI} -nocursor"
fi fi
;; ;;
"motorola_ezx_platform") "motorola_ezx_platform")
--
1.7.8.5
@@ -1,7 +1,19 @@
diff -uri xserver-common-1.33.orig/X11/xserver-common xserver-common-1.33/X11/xserver-common From 6d6caecb7172b9b33e7364564b0e6eabf67b6e8b Mon Sep 17 00:00:00 2001
--- xserver-common-1.33.orig/X11/xserver-common 2010-09-14 17:10:35.955430177 +0200 From: Martin Jansa <Martin.Jansa@gmail.com>
+++ xserver-common-1.33/X11/xserver-common 2010-09-14 17:17:12.484423440 +0200 Date: Wed, 11 Apr 2012 14:40:14 +0200
@@ -132,6 +132,13 @@ Subject: [PATCH 09/12] xserver-common: add support for n900 alias
nokia_rx-51_board
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
X11/xserver-common | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/X11/xserver-common b/X11/xserver-common
index f76fa5f..86ed17f 100644
--- a/X11/xserver-common
+++ b/X11/xserver-common
@@ -132,6 +132,13 @@ else
"nokia_n800" | "nokia_rx-44" | "nokia_n770") "nokia_n800" | "nokia_rx-44" | "nokia_n770")
ARGS="$ARGS -screen ${SCREEN_SIZE}" ARGS="$ARGS -screen ${SCREEN_SIZE}"
DPI="225" ;; DPI="225" ;;
@@ -15,3 +27,6 @@ diff -uri xserver-common-1.33.orig/X11/xserver-common xserver-common-1.33/X11/xs
"gta01" ) "gta01" )
DPI="280" DPI="280"
if [ "$XSERVER" != "Xorg" ] ; then if [ "$XSERVER" != "Xorg" ] ; then
--
1.7.8.5
@@ -0,0 +1,27 @@
From 52003e6b52b1417c1a0e57243d83349addcdacf6 Mon Sep 17 00:00:00 2001
From: Martin Jansa <Martin.Jansa@gmail.com>
Date: Wed, 11 Apr 2012 14:40:44 +0200
Subject: [PATCH 10/12] xserver-common: add support for nexus S alias herring
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
X11/xserver-common | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/X11/xserver-common b/X11/xserver-common
index 86ed17f..5c9a6eb 100644
--- a/X11/xserver-common
+++ b/X11/xserver-common
@@ -126,6 +126,9 @@ else
"htc_tornado")
ARGS="$ARGS -hide-cursor"
DPI="100" ;;
+ "herring")
+ DPI="235"
+ ARGS="$ARGS -dpi ${DPI} -nocursor";;
"generic_omap1510/1610/1710")
ARGS="$ARGS -screen ${SCREEN_SIZE}"
DPI="225" ;;
--
1.7.8.5
@@ -0,0 +1,28 @@
From 0ecc978b7d8cb6867646fb2a29523ebef3afa016 Mon Sep 17 00:00:00 2001
From: Martin Jansa <Martin.Jansa@gmail.com>
Date: Wed, 11 Apr 2012 14:41:06 +0200
Subject: [PATCH 11/12] xserver-common: add support for nexus one alias
mahimahi
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
X11/xserver-common | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/X11/xserver-common b/X11/xserver-common
index 5c9a6eb..55594fd 100644
--- a/X11/xserver-common
+++ b/X11/xserver-common
@@ -129,6 +129,9 @@ else
"herring")
DPI="235"
ARGS="$ARGS -dpi ${DPI} -nocursor";;
+ "mahimahi")
+ DPI="254"
+ ARGS="$ARGS -dpi ${DPI}";;
"generic_omap1510/1610/1710")
ARGS="$ARGS -screen ${SCREEN_SIZE}"
DPI="225" ;;
--
1.7.8.5
@@ -1,15 +1,16 @@
From 95d741d6849a2faddf8c1e930c7250ead90e7bed Mon Sep 17 00:00:00 2001 From d194f0302582f1ca599f2ea58c15e15f4fd6bdef Mon Sep 17 00:00:00 2001
From: Klaus Kurzmann <mok@fluxnetz.de> From: Martin Jansa <Martin.Jansa@gmail.com>
Date: Thu, 20 Oct 2011 09:05:43 +0200 Date: Wed, 11 Apr 2012 14:41:52 +0200
Subject: [PATCH] gta04 Subject: [PATCH 12/12] xserver-common: add support for gta04 alias
OpenPhoenux
Signed-off-by: Klaus Kurzmann <mok@fluxnetz.de> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
--- ---
X11/xserver-common | 8 ++++++++ X11/xserver-common | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-) 1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/X11/xserver-common b/X11/xserver-common diff --git a/X11/xserver-common b/X11/xserver-common
index 448b262..208bbfd 100644 index 55594fd..434333e 100644
--- a/X11/xserver-common --- a/X11/xserver-common
+++ b/X11/xserver-common +++ b/X11/xserver-common
@@ -161,6 +161,14 @@ else @@ -161,6 +161,14 @@ else
@@ -28,5 +29,5 @@ index 448b262..208bbfd 100644
ARGS="$ARGS -screen 240x320" ARGS="$ARGS -screen 240x320"
DPI="170" ;; DPI="170" ;;
-- --
1.7.7 1.7.8.5
@@ -1,12 +0,0 @@
Index: xserver-common/X11/Xsession.d/89xTs_Calibrate_xinput_calibrator
===================================================================
--- xserver-common/X11/Xsession.d/89xTs_Calibrate_xinput_calibrator (revision 0)
+++ xserver-common/X11/Xsession.d/89xTs_Calibrate_xinput_calibrator (revision 0)
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+if [ -e /usr/bin/xinput_calibrator_once.sh ] ; then
+ if [ -e /etc/pointercal.xinput ] ; then
+ /usr/bin/xinput_calibrator_once.sh
+ fi
+fi
@@ -1,9 +0,0 @@
#!/bin/sh
XDGAUTOSTART=/etc/xdg/autostart
if [ -d $XDGAUTOSTART ] ; then
for SCRIPT in $XDGAUTOSTART/*; do
CMD=`grep ^Exec= $SCRIPT | cut -d '=' -f 2`
$CMD &
done
fi
@@ -1,11 +0,0 @@
Index: xserver-common/X11/Xsession.d/90xXWindowManager
===================================================================
--- xserver-common/X11/Xsession.d/90xXWindowManager (revision 0)
+++ xserver-common/X11/Xsession.d/90xXWindowManager (revision 0)
@@ -0,0 +1,6 @@
+#!/bin/sh
+if [ -x $HOME/.Xsession ]; then
+ exec $HOME/.Xsession
+else
+ exec /usr/bin/x-window-manager
+fi
@@ -1,20 +0,0 @@
diff -uNr xserver-common-1.33.orig//X11/xserver-common xserver-common-1.33/X11/xserver-common
--- xserver-common-1.33.orig//X11/xserver-common 2010-04-28 10:44:23.000000000 +0200
+++ xserver-common-1.33/X11/xserver-common 2010-04-28 10:46:41.000000000 +0200
@@ -136,12 +136,16 @@
DPI="285"
if [ "$XSERVER" != "Xorg" ] ; then
ARGS="$ARGS -screen 480x640"
+ else
+ ARGS="$ARGS -nocursor"
fi
;;
"gta02")
DPI="285"
if [ "$XSERVER" != "Xorg" ] ; then
ARGS="$ARGS -screen ${SCREEN_SIZE}"
+ else
+ ARGS="$ARGS -nocursor"
fi
;;
"motorola_ezx_platform")
@@ -1,12 +0,0 @@
diff -uNr xserver-common-1.33.orig//X11/xserver-common xserver-common-1.33/X11/xserver-common
--- xserver-common-1.33.orig//X11/xserver-common 2010-04-28 23:27:10.000000000 +0200
+++ xserver-common-1.33/X11/xserver-common 2010-04-28 23:29:07.000000000 +0200
@@ -192,3 +196,8 @@
if [ "$XSERVER" != "Xorg" ] ; then
ARGS="$ARGS $MOUSE"
fi
+
+# let a local script modify the variables
+if [ -e /etc/X11/xserver-system ] ; then
+ . /etc/X11/xserver-system
+fi
@@ -1,14 +0,0 @@
Index: xserver-common-1.34/X11/xserver-common
===================================================================
--- xserver-common-1.34.orig/X11/xserver-common 2011-10-10 22:36:14.163129002 +0200
+++ xserver-common-1.34/X11/xserver-common 2011-10-10 22:37:47.513129001 +0200
@@ -129,6 +129,9 @@
"herring")
DPI="235"
ARGS="$ARGS -dpi ${DPI} -nocursor";;
+ "mahimahi")
+ DPI="254"
+ ARGS="$ARGS -dpi ${DPI}";;
"generic_omap1510/1610/1710")
ARGS="$ARGS -screen ${SCREEN_SIZE}"
DPI="225" ;;
@@ -1,14 +0,0 @@
Index: xserver-common-1.34/X11/xserver-common
===================================================================
--- xserver-common-1.34.orig/X11/xserver-common 2011-10-09 14:57:10.716896996 +0200
+++ xserver-common-1.34/X11/xserver-common 2011-10-09 14:57:31.226897012 +0200
@@ -126,6 +126,9 @@
"htc_tornado")
ARGS="$ARGS -hide-cursor"
DPI="100" ;;
+ "herring")
+ DPI="235"
+ ARGS="$ARGS -dpi ${DPI} -nocursor";;
"generic_omap1510/1610/1710")
ARGS="$ARGS -screen ${SCREEN_SIZE}"
DPI="225" ;;
@@ -1,92 +0,0 @@
#! /bin/sh
#
# Copyright Matthias Hentges <devel@hentges.net> (c) 2006
# License: GPL (see http://www.gnu.org/licenses/gpl.txt for a copy of the license)
#
# Filename: setDPI.sh
# Date: 09-Apr-06
# This script configures Xft.dpi dependent on your screens DPI. This insures that the same font-size
# setting of 7 can be used on all machines.
XDEFAULTS="/etc/X11/Xdefaults"
set_dpi() {
CURRENT_SETTING="`cat ${XDEFAULTS} | sed -n "/Xft.dpi\:/s/.*\:\(.*\)/\1/p" | sed -n "s/\ //p"`"
if test "$CURRENT_SETTING" != "$1"
then
echo "Using Xft.dpi of $SET_SCREEN_DPI for your $SCREEN_DPI DPI screen"
if grep -q "Xft.dpi" "$XDEFAULTS"
then
cat "${XDEFAULTS}" | sed "s/^Xft.dpi\:.*/Xft.dpi\: $SET_SCREEN_DPI/" > "${XDEFAULTS}_"
mv "${XDEFAULTS}_" "${XDEFAULTS}"
else
echo -e "Xft.dpi: $SET_SCREEN_DPI\n" >> "$XDEFAULTS"
fi
else
echo "Your $SCREEN_DPI DPI screen is already configured."
fi
}
set_rxvt_font() {
CURRENT_SETTING="`cat ${XDEFAULTS} | sed -n "/Rxvt\*font/s/\(.*\pixelsize=\)\(.*\)/\2/p"`"
if test "$1" -gt 100
then
# Configure the rxvt font-size for your screen here:
test "$1" -gt 180 -a "$1" -lt "221" && RXVT_FONT_SIZE=16
if test -z "$RXVT_FONT_SIZE"
then
echo "WARNING: No rxvt font-size configured for a $SCREEN_DPI DPI screen!"
echo "Defaulting to size 9"
RXVT_FONT_SIZE=9
fi
if test "$CURRENT_SETTING" != "$RXVT_FONT_SIZE"
then
echo "Using a rxvt font-size of $RXVT_FONT_SIZE"
cat ${XDEFAULTS} | sed "/Rxvt\*font/s/\(.*\pixelsize\)\(=*.*\)/\1=$RXVT_FONT_SIZE/" > ${XDEFAULTS}_
mv ${XDEFAULTS}_ ${XDEFAULTS}
else
echo "The rxvt font-size is already configured"
fi
fi
}
if test -z "$DISPLAY"
then
echo "DISPLAY is not set, aborting..."
exit 0
fi
SCREEN_DPI="`/usr/bin/xdpyinfo | grep "dots per inch" | awk '{print $2}'| sed -n "s/\(.*\)x\(.*\)/\2/p"`"
if test -z "$SCREEN_DPI"
then
echo "WARNING: Couldn't read your screens DPI, defaulting to 100"
SCREEN_DPI=100
fi
# Configure your screen here:
test "$SCREEN_DPI" -gt 180 -a "$SCREEN_DPI" -lt "221" && SET_SCREEN_DPI=160
test "$SCREEN_DPI" -gt 90 -a "$SCREEN_DPI" -lt "121" && SET_SCREEN_DPI=100
if test -z "$SET_SCREEN_DPI"
then
echo "WARNING: No default configuration found for your $SCREEN_DPI DPI screen!"
echo "Using 100 DPI"
SET_SCREEN_DPI=100
fi
set_dpi "$SET_SCREEN_DPI"
set_rxvt_font "$SCREEN_DPI"
@@ -2,7 +2,7 @@ DESCRIPTION = "Common X11 scripts and support files"
LICENSE = "GPLv2" LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
PR = "r5" PR = "r6"
# we are using a gpe-style Makefile # we are using a gpe-style Makefile
inherit gpe inherit gpe
@@ -11,24 +11,21 @@ SRC_URI[md5sum] = "82f2f84cd96610e8f7b92c700cd31c14"
SRC_URI[sha256sum] = "cd04c33418f776b1e13fcc7af3d6bd0c7cccd03fbabd7dbcd97f88166cc34210" SRC_URI[sha256sum] = "cd04c33418f776b1e13fcc7af3d6bd0c7cccd03fbabd7dbcd97f88166cc34210"
SRC_URI_append = " \ SRC_URI_append = " \
file://gplv2-license.patch \ file://0001-COPYING-add-GPLv2-license-file.patch \
file://setDPI.sh \ file://0002-add-setdpi-Xinit.d-script.patch \
file://89xdgautostart.sh \ file://0003-add-89xdgautostart-Xsession.d-script.patch \
file://89xTs_Calibrate.xinput_calibrator.patch \ file://0004-add-Ts_Calibrate_xinput_calibrator-Xsession.d-script.patch \
file://90xXWindowManager.patch \ file://0005-add-XWindowManager-Xsession.d-script.patch \
file://Xserver.add.xserver-system.patch \ file://0006-add-support-for-etc-X11-xserver-system.patch \
file://Xserver.add.nocursor.for.gta.patch \ file://0007-use-own-functions-file-instead-etc-init.d-functions.patch \
file://Xserver.add.dpi.for.gta.patch \ file://0008-xserver-common-add-dpi-and-nocursor-params-for-gta01.patch \
file://Xserver.n900.patch \ file://0009-xserver-common-add-support-for-n900-alias-nokia_rx-5.patch \
file://Xserver.nexuss.patch \ file://0010-xserver-common-add-support-for-nexus-S-alias-herring.patch \
file://Xserver.nexusone.patch \ file://0011-xserver-common-add-support-for-nexus-one-alias-mahim.patch \
file://Xserver.gta04.patch \ file://0012-xserver-common-add-support-for-gta04-alias-OpenPhoen.patch \
" "
do_install_append() { do_install_append() {
install -m 0755 "${WORKDIR}/setDPI.sh" "${D}/etc/X11/Xinit.d/50setdpi"
install -m 0755 "${WORKDIR}/89xdgautostart.sh" "${D}/etc/X11/Xsession.d/89xdgautostart"
sed -i 's:^BINDIR=.*$:BINDIR=${bindir}:' ${D}/etc/X11/xserver-common sed -i 's:^BINDIR=.*$:BINDIR=${bindir}:' ${D}/etc/X11/xserver-common
} }