mirror of
https://github.com/flatcar/scripts.git
synced 2025-10-10 15:01:50 +02:00
cleanup: delete lots of unused and outdated ebuilds
This commit is contained in:
parent
73dd541387
commit
bd5fee44e8
@ -1 +0,0 @@
|
||||
DIST eselect-mesa-0.0.8.tar.gz 1888 SHA256 92a007e66750fb1f0a41182ba21bee61b7282c4299a7d47f637d19d209eb4e5b SHA512 f5b98aafd3c0fcc100bb0061b11c5a60f037c40a6611bedd81c3dff788ad7836781f110a8294b7464742ab0c52fda5c747e1a3b0d6a3d8be69e5940ea619bc0a WHIRLPOOL 7058f687c3295a313d8e7d386decd2a0b56bed01e889c65ac0bf335441d15615926c420e0579ab56969b164671186f92476fc0f6464ab1f9fa4b8192bf5fd987
|
@ -1,30 +0,0 @@
|
||||
# Copyright 1999-2010 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-admin/eselect-mesa/eselect-mesa-0.0.8.ebuild,v 1.2 2010/11/28 15:37:34 chithanh Exp $
|
||||
|
||||
EAPI=3
|
||||
|
||||
DESCRIPTION="Utility to change the Mesa OpenGL driver being used"
|
||||
HOMEPAGE="http://www.gentoo.org/"
|
||||
|
||||
SRC_URI="mirror://gentoo/${P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha amd64 arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc x86 ~x86-fbsd"
|
||||
IUSE=""
|
||||
|
||||
DEPEND=""
|
||||
RDEPEND=">=app-admin/eselect-1.2.4"
|
||||
|
||||
src_install() {
|
||||
insinto /usr/share/eselect/modules
|
||||
doins mesa.eselect || die
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if has_version ">=media-libs/mesa-7.9" && \
|
||||
! [ -f "${EROOT}"/usr/share/mesa/eselect-mesa.conf ]; then
|
||||
eerror "Rebuild media-libs/mesa for ${PN} to work."
|
||||
fi
|
||||
}
|
@ -1,14 +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>taysom@google.com</email>
|
||||
<name>Paul Taysom</name>
|
||||
</maintainer>
|
||||
<longdescription>
|
||||
Punybench exercises the file system with a set of simple micro-benchmarks.
|
||||
Each of the more than 60 benchmarks focus on just one aspect of the
|
||||
file system.
|
||||
</longdescription>
|
||||
</pkgmetadata>
|
@ -1,37 +0,0 @@
|
||||
#
|
||||
# Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header:$
|
||||
#
|
||||
|
||||
EAPI=2
|
||||
CROS_WORKON_COMMIT="57224245adf877c44b884e1d38c5a5b1c7af554f"
|
||||
CROS_WORKON_TREE="82e2c58d5dd033f61d396db341daca182448c8ad"
|
||||
CROS_WORKON_PROJECT="chromiumos/platform/punybench"
|
||||
CROS_WORKON_LOCALNAME="../platform/punybench"
|
||||
inherit toolchain-funcs cros-workon
|
||||
|
||||
DESCRIPTION="A set of file system microbenchmarks"
|
||||
HOMEPAGE="http://git.chromium.org/gitweb/?s=punybench"
|
||||
SRC_URI=""
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 arm x86"
|
||||
IUSE=""
|
||||
|
||||
##DEPEND="sys-libs/ncurses"
|
||||
|
||||
src_compile() {
|
||||
tc-export CC
|
||||
if [ "${ARCH}" == "amd64" ]; then
|
||||
PUNYARCH="x86_64"
|
||||
else
|
||||
PUNYARCH=${ARCH}
|
||||
fi
|
||||
emake BOARD="${PUNYARCH}"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake install BOARD="${PUNYARCH}" DESTDIR="${D}"
|
||||
}
|
@ -1,35 +0,0 @@
|
||||
#
|
||||
# Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header:$
|
||||
#
|
||||
|
||||
EAPI=2
|
||||
CROS_WORKON_PROJECT="chromiumos/platform/punybench"
|
||||
CROS_WORKON_LOCALNAME="../platform/punybench"
|
||||
inherit toolchain-funcs cros-workon
|
||||
|
||||
DESCRIPTION="A set of file system microbenchmarks"
|
||||
HOMEPAGE="http://git.chromium.org/gitweb/?s=punybench"
|
||||
SRC_URI=""
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm ~x86"
|
||||
IUSE=""
|
||||
|
||||
##DEPEND="sys-libs/ncurses"
|
||||
|
||||
src_compile() {
|
||||
tc-export CC
|
||||
if [ "${ARCH}" == "amd64" ]; then
|
||||
PUNYARCH="x86_64"
|
||||
else
|
||||
PUNYARCH=${ARCH}
|
||||
fi
|
||||
emake BOARD="${PUNYARCH}"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake install BOARD="${PUNYARCH}" DESTDIR="${D}"
|
||||
}
|
@ -1 +0,0 @@
|
||||
DIST qemacs-0.4.0_pre20090420.tar.bz2 1393436 RMD160 69889f79319a44015a45a294499ddd4dbd3b2242 SHA1 68d3b78801a3687e714d91b6f8c890bd37b0ce7e SHA256 14f1ffad569f1bdaaa27d2d7ab0251ce69afc9efc347bb244b11f5e34e818ab5
|
@ -1,43 +0,0 @@
|
||||
utf8 input in tty.c
|
||||
http://lists.gnu.org/archive/html/qemacs-devel/2004-03/msg00000.html
|
||||
http://bugs.gentoo.org/62829
|
||||
|
||||
--- qemacs-orig/tty.c 2007-02-08 00:27:33.000000000 +0100
|
||||
+++ qemacs/tty.c 2007-02-26 15:07:41.000000000 +0100
|
||||
@@ -78,7 +78,6 @@
|
||||
/* input handling */
|
||||
enum InputState input_state;
|
||||
int input_param;
|
||||
- int utf8_state;
|
||||
int utf8_index;
|
||||
unsigned char buf[10];
|
||||
char *term_name;
|
||||
@@ -374,15 +373,19 @@
|
||||
|
||||
/* charset handling */
|
||||
if (s->charset == &charset_utf8) {
|
||||
- if (ts->utf8_state == 0) {
|
||||
- const char *p;
|
||||
- p = (const char *)ts->buf;
|
||||
- ch = utf8_decode(&p);
|
||||
- } else {
|
||||
- ts->utf8_state = utf8_length[ts->buf[0]] - 1;
|
||||
- ts->utf8_index = 0;
|
||||
- return;
|
||||
- }
|
||||
+ /* Make sure utf8 input works correctly 20040314 <damm@opensource.se> */
|
||||
+ ts->utf8_index++;
|
||||
+
|
||||
+ if (utf8_length[ts->buf[0]] == ts->utf8_index) {;
|
||||
+ const char *p;
|
||||
+ p = (const char *)ts->buf;
|
||||
+ ch = utf8_decode(&p);
|
||||
+ ts->utf8_index = 0;
|
||||
+ }
|
||||
+ else {
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
} else {
|
||||
ch = ts->buf[0];
|
||||
}
|
@ -1,35 +0,0 @@
|
||||
--- Makefile.orig 2009-03-07 21:27:48.000000000 +0100
|
||||
+++ Makefile 2009-03-07 21:28:43.000000000 +0100
|
||||
@@ -19,32 +19,6 @@
|
||||
|
||||
include config.mak
|
||||
|
||||
-ifeq ($(CC),gcc)
|
||||
- CFLAGS := -Wall -g -O2 -funsigned-char
|
||||
- # do not warn about zero-length formats.
|
||||
- CFLAGS += -Wno-format-zero-length
|
||||
- LDFLAGS := -g
|
||||
-endif
|
||||
-
|
||||
-#include local compiler configuration file
|
||||
--include cflags.mk
|
||||
-
|
||||
-ifdef TARGET_GPROF
|
||||
- CFLAGS += -p
|
||||
- LDFLAGS += -p
|
||||
-endif
|
||||
-
|
||||
-TLDFLAGS := $(LDFLAGS)
|
||||
-
|
||||
-ifdef TARGET_ARCH_X86
|
||||
- #CFLAGS+=-fomit-frame-pointer
|
||||
- ifeq ($(GCC_MAJOR),2)
|
||||
- CFLAGS+=-m386 -malign-functions=0
|
||||
- else
|
||||
- CFLAGS+=-march=i386 -falign-functions=0
|
||||
- endif
|
||||
-endif
|
||||
-
|
||||
DEFINES=-DHAVE_QE_CONFIG_H
|
||||
|
||||
########################################################
|
@ -1,64 +0,0 @@
|
||||
--- buffer.c.orig 2009-03-07 21:14:02.000000000 +0100
|
||||
+++ buffer.c 2009-03-07 21:15:40.000000000 +0100
|
||||
@@ -1657,12 +1657,14 @@
|
||||
if (stat(filename, &st) == 0)
|
||||
mode = st.st_mode & 0777;
|
||||
|
||||
- /* backup old file if present */
|
||||
- if (strlen(filename) < MAX_FILENAME_SIZE - 1) {
|
||||
+ /* backup old file if present and make-backup-files is on */
|
||||
+ if(mbf == 1) {
|
||||
+ if (strlen(filename) < MAX_FILENAME_SIZE - 1) {
|
||||
if (snprintf(buf1, sizeof(buf1), "%s~", filename) < ssizeof(buf1)) {
|
||||
// should check error code
|
||||
rename(filename, buf1);
|
||||
}
|
||||
+ }
|
||||
}
|
||||
|
||||
/* CG: should pass mode to buffer_save */
|
||||
--- qe.c.orig 2009-03-07 21:14:09.000000000 +0100
|
||||
+++ qe.c 2009-03-07 21:17:01.000000000 +0100
|
||||
@@ -71,6 +71,7 @@
|
||||
static int screen_height = 0;
|
||||
static int no_init_file;
|
||||
static const char *user_option;
|
||||
+mbf = 1;
|
||||
|
||||
/* mode handling */
|
||||
|
||||
@@ -5316,6 +5317,14 @@
|
||||
do_refresh(qs->first_window);
|
||||
}
|
||||
|
||||
+static void make_backup_files(EditState *s) {
|
||||
+ if(mbf == 1) {
|
||||
+ mbf = 0;
|
||||
+ } else {
|
||||
+ mbf = 1;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
/* compute default path for find/save buffer */
|
||||
static void get_default_path(EditState *s, char *buf, int buf_size)
|
||||
{
|
||||
--- qeconfig.h.orig 2009-03-07 21:14:19.000000000 +0100
|
||||
+++ qeconfig.h 2009-03-07 21:17:37.000000000 +0100
|
||||
@@ -192,6 +192,7 @@
|
||||
"downcase-region", do_changecase_region, ESi, -1, "*v")
|
||||
CMD3( KEY_CTRLX(KEY_CTRL('u')), KEY_NONE,
|
||||
"upcase-region", do_changecase_region, ESi, 1, "*v")
|
||||
+ CMD0( KEY_NONE, KEY_NONE, "make-backup-files", make_backup_files)
|
||||
|
||||
/*---------------- Command handling ----------------*/
|
||||
|
||||
--- qe.h.orig 2009-03-07 21:14:26.000000000 +0100
|
||||
+++ qe.h 2009-03-07 21:17:53.000000000 +0100
|
||||
@@ -1765,6 +1765,7 @@
|
||||
/* image.c */
|
||||
void fill_border(EditState *s, int x, int y, int w, int h, int color);
|
||||
int qe_bitmap_format_to_pix_fmt(int format);
|
||||
+int mbf;
|
||||
|
||||
/* shell.c */
|
||||
EditBuffer *new_shell_buffer(EditBuffer *b0, const char *name,
|
@ -1,36 +0,0 @@
|
||||
--- qemacs-orig/Makefile
|
||||
+++ qemacs/Makefile
|
||||
@@ -151,7 +151,6 @@
|
||||
qe$(EXE): qe_g$(EXE) Makefile
|
||||
rm -f $@
|
||||
cp $< $@
|
||||
- -$(STRIP) $@
|
||||
@ls -l $@
|
||||
echo `size $@` `wc -c $@` qe $(OPTIONS) \
|
||||
| cut -d ' ' -f 7-10,13,15-40 >> STATS
|
||||
@@ -165,7 +164,6 @@
|
||||
tqe$(EXE): tqe_g$(EXE) Makefile
|
||||
rm -f $@
|
||||
cp $< $@
|
||||
- -$(STRIP) $@
|
||||
@ls -l $@
|
||||
echo `size $@` `wc -c $@` tqe $(OPTIONS) \
|
||||
| cut -d ' ' -f 7-10,13,15-40 >> STATS
|
||||
@@ -329,7 +327,7 @@
|
||||
$(INSTALL) -m 755 -d $(DESTDIR)$(prefix)/bin
|
||||
$(INSTALL) -m 755 -d $(DESTDIR)$(prefix)/man/man1
|
||||
$(INSTALL) -m 755 -d $(DESTDIR)$(prefix)/share/qe
|
||||
- $(INSTALL) -m 755 -s qe$(EXE) $(DESTDIR)$(prefix)/bin/qemacs$(EXE)
|
||||
+ $(INSTALL) -m 755 qe$(EXE) $(DESTDIR)$(prefix)/bin/qemacs$(EXE)
|
||||
ln -sf qemacs $(DESTDIR)$(prefix)/bin/qe$(EXE)
|
||||
ifdef CONFIG_FFMPEG
|
||||
ln -sf qemacs$(EXE) $(DESTDIR)$(prefix)/bin/ffplay$(EXE)
|
||||
@@ -337,7 +335,7 @@
|
||||
$(INSTALL) -m 644 kmaps ligatures $(DESTDIR)$(prefix)/share/qe
|
||||
$(INSTALL) -m 644 qe.1 $(DESTDIR)$(prefix)/man/man1
|
||||
ifdef CONFIG_HTML
|
||||
- $(INSTALL) -m 755 -s html2png$(EXE) $(DESTDIR)$(prefix)/bin
|
||||
+ $(INSTALL) -m 755 html2png$(EXE) $(DESTDIR)$(prefix)/bin
|
||||
endif
|
||||
|
||||
uninstall:
|
@ -1,76 +0,0 @@
|
||||
# Copyright 1999-2009 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-editors/qemacs/qemacs-0.4.0_pre20090420.ebuild,v 1.4 2009/12/08 19:33:49 nixnut Exp $
|
||||
|
||||
EAPI=2
|
||||
|
||||
inherit eutils flag-o-matic toolchain-funcs
|
||||
|
||||
DESCRIPTION="QEmacs is a very small but powerful UNIX editor"
|
||||
HOMEPAGE="http://savannah.nongnu.org/projects/qemacs"
|
||||
SRC_URI="mirror://gentoo/${P}.tar.bz2"
|
||||
|
||||
LICENSE="LGPL-2.1"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 ppc x86"
|
||||
IUSE="X png unicode xv"
|
||||
RESTRICT="strip test"
|
||||
|
||||
RDEPEND="!app-editors/qe
|
||||
X? ( x11-libs/libX11
|
||||
x11-libs/libXext
|
||||
xv? ( x11-libs/libXv ) )
|
||||
png? ( media-libs/libpng:1.2 )"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
app-text/texi2html"
|
||||
|
||||
S="${WORKDIR}/${PN}"
|
||||
|
||||
src_prepare() {
|
||||
# Removes forced march setting and align-functions on x86, as they
|
||||
# would override user's CFLAGS..
|
||||
epatch "${FILESDIR}/${PN}-0.4.0_pre20080605-Makefile.patch"
|
||||
# Make backup files optional
|
||||
epatch "${FILESDIR}/${PN}-0.4.0_pre20080605-make_backup.patch"
|
||||
# Suppress stripping
|
||||
epatch "${FILESDIR}/${P}-nostrip.patch"
|
||||
|
||||
use unicode && epatch "${FILESDIR}/${PN}-0.3.2_pre20070226-tty_utf8.patch"
|
||||
|
||||
# Change the manpage to reference a /real/ file instead of just an
|
||||
# approximation. Purely cosmetic!
|
||||
sed -i "s,^/usr/share/doc/qe,&-${PVR}," qe.1 || die
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# when using any other CFLAGS than -O0, qemacs will segfault on startup,
|
||||
# see bug 92011
|
||||
replace-flags -O? -O0
|
||||
econf --cross-prefix="${CHOST}-" \
|
||||
$(use_enable X x11) \
|
||||
$(use_enable png) \
|
||||
$(use_enable xv)
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# Does not support parallel building
|
||||
emake -j1 || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake install DESTDIR="${D}" || die
|
||||
dodoc Changelog README TODO config.eg || die
|
||||
dohtml *.html || die
|
||||
|
||||
# Fix man page location
|
||||
mv "${D}"/usr/{,share/}man || die
|
||||
|
||||
# Install headers so users can build their own plugins.
|
||||
insinto /usr/include/qe
|
||||
doins cfb.h config.h cutils.h display.h fbfrender.h libfbf.h qe.h \
|
||||
qeconfig.h qestyles.h qfribidi.h || die
|
||||
cd libqhtml
|
||||
insinto /usr/include/qe/libqhtml
|
||||
doins css.h cssid.h htmlent.h || die
|
||||
}
|
@ -1,263 +0,0 @@
|
||||
# ChangeLog for app-emulation/lxc
|
||||
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-emulation/lxc/ChangeLog,v 1.44 2012/11/14 02:15:10 flameeyes Exp $
|
||||
|
||||
*lxc-0.8.0-r1 (14 Nov 2012)
|
||||
|
||||
14 Nov 2012; Diego E. Pettenò <flameeyes@gentoo.org> +lxc-0.8.0-r1.ebuild,
|
||||
-lxc-0.8.0.ebuild, files/lxc.initd.2:
|
||||
Drop one kernel config check for a kernel config that's been dropped; drop the
|
||||
vanilla USE flag; fix a mistake in the setarch call in the init script for
|
||||
32-bit guests.
|
||||
|
||||
*lxc-0.8.0 (11 Nov 2012)
|
||||
|
||||
11 Nov 2012; Diego E. Pettenò <flameeyes@gentoo.org> +lxc-0.8.0.ebuild:
|
||||
Version bump.
|
||||
|
||||
*lxc-0.8.0_rc2-r1 (04 Aug 2012)
|
||||
|
||||
04 Aug 2012; Diego E. Pettenò <flameeyes@gentoo.org> +lxc-0.8.0_rc2-r1.ebuild,
|
||||
-lxc-0.8.0_rc2.ebuild:
|
||||
Fix lxc-sshd template; don't remove lxc-ls.
|
||||
|
||||
*lxc-0.8.0_rc2 (21 Jul 2012)
|
||||
|
||||
21 Jul 2012; Diego E. Pettenò <flameeyes@gentoo.org> +lxc-0.8.0_rc2.ebuild,
|
||||
-lxc-0.8.0_rc1-r5.ebuild, files/lxc.initd.2:
|
||||
Version bump; also fixes bug #427078 and #427086, thanks to Alexander Zubkov
|
||||
for the report.
|
||||
|
||||
*lxc-0.8.0_rc1-r5 (07 Jun 2012)
|
||||
|
||||
07 Jun 2012; Diego E. Pettenò <flameeyes@gentoo.org> +lxc-0.8.0_rc1-r5.ebuild,
|
||||
-lxc-0.8.0_rc1-r4.ebuild, files/lxc.initd.2:
|
||||
Update init script to better handle x32 containers.
|
||||
|
||||
31 May 2012; Zac Medico <zmedico@gentoo.org> lxc-0.8.0_rc1-r4.ebuild:
|
||||
tweak inherit so repoman can parse it
|
||||
|
||||
12 May 2012; Diego E. Pettenò <flameeyes@gentoo.org> lxc-0.8.0_rc1-r4.ebuild:
|
||||
Make sure to check for CGROUP_DEVICE in particular, see bug #409371.
|
||||
|
||||
01 May 2012; Diego E. Pettenò <flameeyes@gentoo.org> files/lxc.initd.2:
|
||||
Make the init.d decide whether it needs or uses the network interface
|
||||
depending on configuration.
|
||||
|
||||
*lxc-0.8.0_rc1-r4 (01 May 2012)
|
||||
|
||||
01 May 2012; Diego E. Pettenò <flameeyes@gentoo.org> +lxc-0.8.0_rc1-r4.ebuild,
|
||||
-files/lxc-0.8.0_rc1-blockmount.patch, -files/lxc-0.8.0_rc1-libtoolize.patch,
|
||||
-files/lxc.initd, -lxc-0.7.5-r3.ebuild, -lxc-0.8.0_rc1-r3.ebuild:
|
||||
Remove old; move patches to backports tarball (it's in git); add a patch to
|
||||
fix bug #423737 by Kevin Pyle (kernel sources are no longer required for
|
||||
build).
|
||||
|
||||
29 Apr 2012; Diego E. Pettenò <flameeyes@gentoo.org> files/lxc.initd.2:
|
||||
Make sure to need the network interface, not use it.
|
||||
|
||||
*lxc-0.8.0_rc1-r3 (29 Apr 2012)
|
||||
|
||||
29 Apr 2012; Diego E. Pettenò <flameeyes@gentoo.org> +lxc-0.8.0_rc1-r3.ebuild,
|
||||
-lxc-0.8.0_rc1-r2.ebuild, files/lxc-0.8.0_rc1-blockmount.patch:
|
||||
Fix my own patch for mounting devices and files.
|
||||
|
||||
*lxc-0.8.0_rc1-r2 (28 Apr 2012)
|
||||
|
||||
28 Apr 2012; Diego E. Pettenò <flameeyes@gentoo.org>
|
||||
+files/lxc-0.8.0_rc1-blockmount.patch, +lxc-0.8.0_rc1-r2.ebuild,
|
||||
-lxc-0.8.0_rc1-r1.ebuild:
|
||||
Add a patch to fix handling of mount points for block devices; also add some
|
||||
warnings related to grsecurity and LXC.
|
||||
|
||||
27 Mar 2012; Diego E. Pettenò <flameeyes@gentoo.org> -lxc-0.8.0_rc1.ebuild,
|
||||
lxc-0.7.5-r3.ebuild, lxc-0.8.0_rc1-r1.ebuild:
|
||||
Fix dependencies for lxc 0.7.5; depend on a newer OpenRC to have cgroups
|
||||
mounted for us in the init script.
|
||||
|
||||
*lxc-0.8.0_rc1-r1 (24 Mar 2012)
|
||||
|
||||
24 Mar 2012; Diego E. Pettenò <flameeyes@gentoo.org>
|
||||
+files/lxc-0.8.0_rc1-libtoolize.patch, +lxc-0.8.0_rc1-r1.ebuild:
|
||||
Add a patch that libtoolizes lxc, and builds a static lxc-init executable.
|
||||
|
||||
*lxc-0.8.0_rc1 (24 Mar 2012)
|
||||
|
||||
24 Mar 2012; Diego E. Pettenò <flameeyes@gentoo.org> +files/lxc.initd.2,
|
||||
+lxc-0.8.0_rc1.ebuild:
|
||||
Version bump; change init script as the path is changed. Assume a modern
|
||||
OpenRC is used.
|
||||
|
||||
*lxc-0.7.5-r3 (19 Oct 2011)
|
||||
|
||||
19 Oct 2011; Diego E. Pettenò <flameeyes@gentoo.org> -lxc-0.7.5-r2.ebuild,
|
||||
+lxc-0.7.5-r3.ebuild, files/lxc.initd:
|
||||
Revision bump to fix two issues with the init script reported by Alexander Y.
|
||||
Fomichev (bug #387675 and #387679).
|
||||
|
||||
*lxc-0.7.5-r2 (28 Sep 2011)
|
||||
|
||||
28 Sep 2011; Diego E. Pettenò <flameeyes@gentoo.org> -lxc-0.7.5-r1.ebuild,
|
||||
+lxc-0.7.5-r2.ebuild, files/lxc.initd:
|
||||
Fix init script to find the correct PID for the container's init and use a
|
||||
30-seconds timeout to see if it has stopped correctly. Thanks to Stef Simoens
|
||||
for both (bug #384265).
|
||||
|
||||
*lxc-0.7.5-r1 (14 Sep 2011)
|
||||
|
||||
14 Sep 2011; Diego E. Pettenò <flameeyes@gentoo.org> -lxc-0.7.4.2.ebuild,
|
||||
-lxc-0.7.5.ebuild, +lxc-0.7.5-r1.ebuild, files/lxc.initd:
|
||||
Fix init script not to look for a configuration file when generating
|
||||
dependencies for the base (multiplexed) init script. Revision bump to make
|
||||
sure users reinstall the ebuild, and remove old. Closes bug #382519.
|
||||
|
||||
*lxc-0.7.5 (05 Sep 2011)
|
||||
|
||||
05 Sep 2011; Diego E. Pettenò <flameeyes@gentoo.org> -lxc-0.7.4.1-r1.ebuild,
|
||||
+lxc-0.7.5.ebuild, files/lxc.initd:
|
||||
Version bump; also includes fixes for the init script, closing bugs #379679
|
||||
and #379683 by George Georgiev.
|
||||
|
||||
*lxc-0.7.4.2 (26 Jul 2011)
|
||||
|
||||
26 Jul 2011; Diego E. Pettenò <flameeyes@gentoo.org> +lxc-0.7.4.2.ebuild:
|
||||
Version bump.
|
||||
|
||||
05 Jul 2011; Mark Loeser <halcy0n@gentoo.org> lxc-0.7.4.1-r1.ebuild:
|
||||
Mark ~ppc64
|
||||
|
||||
06 May 2011; Diego E. Pettenò <flameeyes@gentoo.org> files/lxc.initd:
|
||||
Reset the environment when starting the container so that its environment is
|
||||
picked up entirely.
|
||||
|
||||
*lxc-0.7.4.1-r1 (24 Apr 2011)
|
||||
|
||||
24 Apr 2011; Diego E. Pettenò <flameeyes@gentoo.org> -lxc-0.7.4.1.ebuild,
|
||||
+lxc-0.7.4.1-r1.ebuild, files/lxc.initd:
|
||||
Revision bump to improve the init script so that it searches the new location
|
||||
of configuration files created by lxc-create (closes bug #364611).
|
||||
|
||||
*lxc-0.7.4.1 (30 Mar 2011)
|
||||
|
||||
30 Mar 2011; Diego E. Pettenò <flameeyes@gentoo.org> -lxc-0.7.2-r1.ebuild,
|
||||
-lxc-0.7.3-r1.ebuild, -lxc-0.7.4.ebuild, +lxc-0.7.4.1.ebuild:
|
||||
Version bump.
|
||||
|
||||
*lxc-0.7.4 (26 Feb 2011)
|
||||
|
||||
26 Feb 2011; Diego E. Pettenò <flameeyes@gentoo.org> +lxc-0.7.4.ebuild,
|
||||
files/lxc.initd:
|
||||
Version bump; update warnings (configuration is now back to 0.7.2 syntax);
|
||||
make sure the init script logs warnings, as otherwise you'll never know
|
||||
what's going on.
|
||||
|
||||
22 Nov 2010; Diego E. Pettenò <flameeyes@gentoo.org> lxc-0.7.3-r1.ebuild:
|
||||
Add a postinst note about the new location, since upstream provides no
|
||||
changelog.
|
||||
|
||||
*lxc-0.7.3-r1 (22 Nov 2010)
|
||||
|
||||
22 Nov 2010; Diego E. Pettenò <flameeyes@gentoo.org> -lxc-0.7.3.ebuild,
|
||||
+lxc-0.7.3-r1.ebuild:
|
||||
Revision bump to make sure that the rootfs mount point is the same between
|
||||
32-bit and 64-bit systems.
|
||||
|
||||
*lxc-0.7.3 (16 Nov 2010)
|
||||
|
||||
16 Nov 2010; Diego E. Pettenò <flameeyes@gentoo.org> +lxc-0.7.3.ebuild:
|
||||
Version bump; this also solves bug #345259.
|
||||
|
||||
15 Oct 2010; Diego E. Pettenò <flameeyes@gentoo.org> -lxc-0.7.1.ebuild:
|
||||
Cleanup old version.
|
||||
|
||||
*lxc-0.7.2-r1 (01 Aug 2010)
|
||||
|
||||
01 Aug 2010; Diego E. Pettenò <flameeyes@gentoo.org> -lxc-0.7.2.ebuild,
|
||||
+lxc-0.7.2-r1.ebuild, files/lxc.initd:
|
||||
New init script, with more thorough verification of the config, support
|
||||
for mounting the cgroup pseudo-fs, proper network dependencies, improved
|
||||
start-up (verifies that the container actually started up) and stop (won't
|
||||
waste time if the container was externally stopped).
|
||||
|
||||
*lxc-0.7.2 (01 Aug 2010)
|
||||
|
||||
01 Aug 2010; Diego E. Pettenò <flameeyes@gentoo.org> +lxc-0.7.2.ebuild,
|
||||
+files/lxc.initd, metadata.xml:
|
||||
Version bump, add the long-requested init script (protected with a
|
||||
USE=vanilla for those preferring not to have it).
|
||||
|
||||
*lxc-0.7.1 (28 Jun 2010)
|
||||
|
||||
28 Jun 2010; Diego E. Pettenò <flameeyes@gentoo.org>
|
||||
-files/lxc-0.6.4-fix-full-system.patch,
|
||||
-files/lxc-0.6.4-lxc.network.pair.patch,
|
||||
-files/lxc-0.6.4-move-rcfile.patch, -files/lxc-0.6.4-tty-malloc.patch,
|
||||
-lxc-0.6.5.ebuild, -lxc-0.7.0.ebuild, +lxc-0.7.1.ebuild:
|
||||
Version bump, remove old versions, remove stray patch files.
|
||||
|
||||
*lxc-0.7.0 (20 Jun 2010)
|
||||
|
||||
20 Jun 2010; Diego E. Pettenò <flameeyes@gentoo.org> +lxc-0.7.0.ebuild:
|
||||
Version bump.
|
||||
|
||||
16 Mar 2010; Diego E. Pettenò <flameeyes@gentoo.org> lxc-0.6.5.ebuild:
|
||||
Avoid testing for file capabilities support: we don't support the setcap
|
||||
mode for lxc and it has been dropped by 2.6.33 onward. Thanks to Vadim
|
||||
Kuznetsov in bug #309267.
|
||||
|
||||
11 Mar 2010; Diego E. Pettenò <flameeyes@gentoo.org> lxc-0.6.5.ebuild:
|
||||
Stop trying to remove /etc/lxc, it's no longer installed.
|
||||
|
||||
09 Mar 2010; Diego E. Pettenò <flameeyes@gentoo.org>
|
||||
-lxc-0.6.4-r2.ebuild, lxc-0.6.5.ebuild, metadata.xml:
|
||||
Remove old version, install man pages even with USE=-doc now that they are
|
||||
shipped upstream, thanks to Allen Parker in bug #308553. Assign to
|
||||
virtualization herd to have a fallback maintainer if me and Tiziano are
|
||||
not available.
|
||||
|
||||
*lxc-0.6.5 (30 Jan 2010)
|
||||
|
||||
30 Jan 2010; Diego E. Pettenò <flameeyes@gentoo.org> -lxc-0.6.4.ebuild,
|
||||
-lxc-0.6.4-r1.ebuild, +lxc-0.6.5.ebuild:
|
||||
Version bump; remove old versions.
|
||||
|
||||
*lxc-0.6.4-r2 (08 Dec 2009)
|
||||
|
||||
08 Dec 2009; Sven Wegener <swegener@gentoo.org> +lxc-0.6.4-r2.ebuild,
|
||||
+files/lxc-0.6.4-tty-malloc.patch:
|
||||
Also include my tty malloc() fix, it prevents memory corruption.
|
||||
|
||||
*lxc-0.6.4-r1 (07 Dec 2009)
|
||||
|
||||
07 Dec 2009; Diego E. Pettenò <flameeyes@gentoo.org>
|
||||
-files/0.6.2-as-needed.patch, -lxc-0.6.3.ebuild, +lxc-0.6.4-r1.ebuild,
|
||||
+files/lxc-0.6.4-fix-full-system.patch,
|
||||
+files/lxc-0.6.4-lxc.network.pair.patch,
|
||||
+files/lxc-0.6.4-move-rcfile.patch:
|
||||
Backport fixes from upstream, including one to not break host systems if
|
||||
lxc-start is launched in the old (pre-0.6.4) way. Thanks to Andrian Nord
|
||||
in bug #296030.
|
||||
|
||||
25 Nov 2009; Diego E. Pettenò <flameeyes@gentoo.org> lxc-0.6.4.ebuild,
|
||||
metadata.xml:
|
||||
Enable doc USE flag by default and explicit in the description that it
|
||||
enables the man pages as well.
|
||||
|
||||
24 Nov 2009; Diego E. Pettenò <flameeyes@gentoo.org> lxc-0.6.4.ebuild:
|
||||
Remove autotools inherit and add the ~x86 KEYWORD.
|
||||
|
||||
*lxc-0.6.4 (24 Nov 2009)
|
||||
|
||||
24 Nov 2009; Diego E. Pettenò <flameeyes@gentoo.org> +lxc-0.6.4.ebuild:
|
||||
Version bump, improve checking of kernel features.
|
||||
|
||||
14 Nov 2009; Sven Wegener <swegener@gentoo.org> lxc-0.6.3.ebuild:
|
||||
Add ~x86 keyword.
|
||||
|
||||
*lxc-0.6.3 (24 Oct 2009)
|
||||
|
||||
24 Oct 2009; Diego E. Pettenò <flameeyes@gentoo.org>
|
||||
+files/0.6.2-as-needed.patch, +lxc-0.6.3.ebuild, +metadata.xml:
|
||||
Initial import of lxc; based upon dev-zero's ebuild, modified by me. It
|
||||
diverges a bit from upstream, in the path used, to stay more
|
||||
Gentoo-styled. Init scripts will likely be added separately.
|
@ -1,23 +0,0 @@
|
||||
-----BEGIN PGP SIGNED MESSAGE-----
|
||||
Hash: SHA256
|
||||
|
||||
AUX lxc.initd.2 3673 SHA256 bb7780168695e934549909c5c7baa7d6cdc92b0e19093a3d04a1313081a832e1 SHA512 25b0474d6f16fcede89a8e17518a658f810cb554eaef10aae3ce1fdd8c8640118aa6375cbee443f0b26e8086eb7c25375ceaaaf29a4110bd779f94b2f4b0d300 WHIRLPOOL 28f56d71b95b26c7f6ad5402a37413a973bc7bdf08fd3963ad192888ae1b49809a56c16009bc6049061d419ecffb1279e153e6ef5acbe06956efca154eae6a01
|
||||
DIST lxc-0.8.0-backports-1.tar.xz 2424 SHA256 5b68b96b9fbc2d0f5b2ad2e7fb996a3d837114237a306de39d9939f31756a522 SHA512 9898d78836cc546e80015a18070e3976118d2efb006584ecfb2887a4474598766e023eb6c120c16dae2e94dddc33c8a4e928fd44bc6fb2260a1913c06f5d374e WHIRLPOOL ef11f25ec8891f431be7aed32b38c0cc51e1096a37ea71c38aed4448ab0305784b510e2b55bdc73e5ef2128344a6c88adb3add798323f77e276b5185e53f5ef9
|
||||
DIST lxc-0.8.0-rc2-backports-2.tar.xz 4616 SHA256 c371817b5be47ed70dea410a32dc434a060073992d5299d2c88853de79aa2111 SHA512 ca646ae325a4cf94632c443397834a8a7dc004874b528d2d685b698b3eda1e72e09ecfd68899b9c0cd17d5d7bf1a62230dd6d17d26f73d2d4ecbf1932c31b996 WHIRLPOOL 76deca3e2b7fe306c0e2f538759fb33656f08c52d1b59570edc6f3d2444d387a0f7944f759baf41402e747eb055ab403a82a40b95ba0c7d42d0644a5f990e851
|
||||
DIST lxc-0.8.0-rc2.tar.gz 302999 SHA256 1f0ee0464507d26e494784e841b68c765ecd3abc5976012e226f69d1aa361bef SHA512 e6608f980489f67d412c9a50f8c3f65c1afbba520dfdfe2b695c597c2706544291f31c8cfca2d86cfbab09029f8a5706fae5ab72f1c45dccca5f7e2ae8851181 WHIRLPOOL b41fe7e14315b9e6702070535edfee68379c01fba23d143c5f11afa20f6d392c8bc32953da46ec3f74d7a2affe9f828d918f23a8a16c430e3b8ffcc9b2c10057
|
||||
DIST lxc-0.8.0.tar.gz 309973 SHA256 eac833730b94e423d4bef6834bc4a716437d2abd6ab8b24334c506aaaa08692c SHA512 47333e2010d0f4488b8876ba933f2d26304874bec0371a7ab3b6e5bd1a50a7d2312ff8507e273f1ee2341a7f2e3b79cd71e5e19ac31006a4e429ee96b01733f6 WHIRLPOOL 693b7d354dec7c6102d5ce3a42a9b618e213fd9ee8c592068ebadb7f25094606abce6c3da77b483fab0938410215010f71d487f336856c87327d6a98f20b65dd
|
||||
EBUILD lxc-0.8.0-r1.ebuild 4504 SHA256 2199fc1bce5cabcf082519476fd0b3bed090767c0b72ab607f230b7a1d50da0a SHA512 62074bb7f4f976e544f5bfe3cbaffdc6748982e68ba65bac14c16d64c8bb1520f3976d4016756be9f60d6a5307d0afa8975b27fded4db296c6705eb748c3bc90 WHIRLPOOL 2b64f73490bff91801afe86907c90dfba4a20b0627fa49c3f96bc3315a01527affabbefa64c606b1cb401a66327f361cca7c74155ecb427713b3d98fa85693e4
|
||||
EBUILD lxc-0.8.0_rc2-r1.ebuild 4671 SHA256 516d8f213a7b7a723e58ebe2223f953b97564f66c0f3285f48c1339c559199c9 SHA512 d1011c6a2985d88842ee41b57a44e884afdb0404d5bcb5ca4c803c4d0d04972c73fd046b488e966d9d42de43b56f00e0e5a05fec79c67c6e67a0b3047dc814f1 WHIRLPOOL df3bc703c5ff2e15e9ec8d38e728b17e8be03ad461ff024cce3a94876f4944036f09b92bd84b1c727ed35b7cd2215ff2d4a34b55f6072c3872ccd454ff1210e0
|
||||
MISC ChangeLog 10256 SHA256 17319c5e186d2e2a0debdf7e7aa2551a43a1276342eb6b49e4b8d5dca003895a SHA512 8cad663a2d5c57c76125c09b9d3ce2cd7d9662e3bc2b759d3b607f50c62110f0db9eec2e07bf4657d1fe2677e31cfa1d9c11e458b2e70815ff7a37c280dff08c WHIRLPOOL 4e79e29cb6d81b70837a39bbca33e8f13b154180289e9cbca9369699dbff30ca3d54e4ce7a8a84158259a8cf4ad2d08b38391c0568e9581edfe3e8d73f0852ea
|
||||
MISC metadata.xml 653 SHA256 35f64761067f47ff7abd0e3f3cb57f4bab888a2546bf3267d59987505101a190 SHA512 d227bc432c37518190c224b280116439dde42678f93925ae3a8eb2d2e91918377b33171d8e72ae4ab12f3e5d9faead4223a60e53bb4916d7770982deb64b0b70 WHIRLPOOL 4067036bca1ad2906cdba69c42c0ca5b14042ad7eab2ac8e9a2fbe4eb61e8a3972e4d40b6d9d6e7109a0d2f84a8598a8a9560dbddd43b35633f44ad5362937b0
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
Version: GnuPG v2.0.19 (GNU/Linux)
|
||||
|
||||
iQEcBAEBCAAGBQJQov9IAAoJEBzRPIrUMBNCdasH/3qjjjotBIDg5ILfktFpUA47
|
||||
RE9Vy90N0aNX0ywRVBmJn8a88X7zibArVn2cBMzvC1VTxa/LyV6upcU77c4q0T9+
|
||||
brZF7v7BxqTa9Bdu3WqIrXlKT0LH3j9WgT7IHRQSNV5Kae8k4Rs4GuKFkvux1k0q
|
||||
KIHNycPdKBRTEhbRI2DzazgJaKzHpIxoNBHtin8vxu/ViV1P1OjvPic+6FJhl5M4
|
||||
DAs7w+bqpRk4VZWe0OwKpSP+Mm6LOIBsMB7StfFJsDR4WF1H0a7+O+oy8KEMECy0
|
||||
7+98cLqy9RjqvhVDBDjUej/nr+p1hTWA34MJ7vc5P948reG4nB8pFf1D0eBtxVw=
|
||||
=UqJx
|
||||
-----END PGP SIGNATURE-----
|
@ -1,132 +0,0 @@
|
||||
#!/sbin/runscript
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-emulation/lxc/files/lxc.initd.2,v 1.6 2012/11/14 02:15:10 flameeyes Exp $
|
||||
|
||||
CONTAINER=${SVCNAME#*.}
|
||||
|
||||
lxc_get_configfile() {
|
||||
if [ -f "/etc/lxc/${CONTAINER}.conf" ]; then
|
||||
echo "/etc/lxc/${CONTAINER}.conf"
|
||||
elif [ -f "/etc/lxc/${CONTAINER}/config" ]; then
|
||||
echo "/etc/lxc/${CONTAINER}/config"
|
||||
else
|
||||
eerror "Unable to find a suitable configuration file."
|
||||
eerror "If you set up the container in a non-standard"
|
||||
eerror "location, please set the CONFIGFILE variable."
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
[ $CONTAINER != $SVCNAME ] && CONFIGFILE=${CONFIGFILE:-$(lxc_get_configfile)}
|
||||
|
||||
lxc_get_var() {
|
||||
awk 'BEGIN { FS="[ \t]*=[ \t]*" } $1 == "'$1'" { print $2; exit }' ${CONFIGFILE}
|
||||
}
|
||||
|
||||
checkconfig() {
|
||||
if [ ${CONTAINER} = ${SVCNAME} ]; then
|
||||
eerror "You have to create an init script for each container:"
|
||||
eerror " ln -s lxc /etc/init.d/lxc.container"
|
||||
return 1
|
||||
fi
|
||||
|
||||
# no need to output anything, the function takes care of that.
|
||||
[ -z "${CONFIGFILE}" ] && return 1
|
||||
|
||||
utsname=$(lxc_get_var lxc.utsname)
|
||||
if [ ${CONTAINER} != ${utsname} ]; then
|
||||
eerror "You should use the same name for the service and the"
|
||||
eerror "container. Right now the container is called ${utsname}"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
depend() {
|
||||
# be quiet, since we have to run depend() also for the
|
||||
# non-muxed init script, unfortunately.
|
||||
checkconfig 2>/dev/null || return 0
|
||||
|
||||
config ${CONFIGFILE}
|
||||
need localmount
|
||||
|
||||
# find out which network interface the container is linked to,
|
||||
# and then require that to be enabled, so that the
|
||||
# dependencies are correct.
|
||||
netif=$(lxc_get_var lxc.network.link)
|
||||
|
||||
# when the network type is set to phys, we can make use of a
|
||||
# network service (for instance to set it up before we disable
|
||||
# the net_admin capability), but we might also not set it up
|
||||
# at all on the host and leave the net_admin capable service
|
||||
# to take care of it.
|
||||
nettype=$(lxc_get_var lxc.network.type)
|
||||
|
||||
if [ -n "${netif}" ]; then
|
||||
case "${nettype}" in
|
||||
phys) use net.${netif} ;;
|
||||
*) need net.${netif} ;;
|
||||
esac
|
||||
fi
|
||||
}
|
||||
|
||||
start() {
|
||||
checkconfig || return 1
|
||||
rm /var/log/lxc/${CONTAINER}.log
|
||||
|
||||
rootpath=$(lxc_get_var lxc.rootfs)
|
||||
|
||||
# Check the format of our init and the chroot's init, to see
|
||||
# if we have to use linux32 or linux64; always use setarch
|
||||
# when required, as that makes it easier to deal with
|
||||
# x32-based containers.
|
||||
case $(scanelf -BF '%a#f' ${rootpath}/sbin/init) in
|
||||
EM_X86_64) setarch=linux64;;
|
||||
EM_386) setarch=linux32;;
|
||||
esac
|
||||
|
||||
ebegin "Starting ${CONTAINER}"
|
||||
env -i ${setarch} $(type -p lxc-start) -l WARN -n ${CONTAINER} -f ${CONFIGFILE} -d -o /var/log/lxc/${CONTAINER}.log
|
||||
sleep 0.5
|
||||
|
||||
# lxc-start -d will _always_ report a correct startup, even if it
|
||||
# failed, so rather than trust that, check that the cgroup exists.
|
||||
[ -d /sys/fs/cgroup/cpuset/lxc/${CONTAINER} ]
|
||||
eend $?
|
||||
}
|
||||
|
||||
stop() {
|
||||
checkconfig || return 1
|
||||
|
||||
|
||||
if ! [ -d /sys/fs/cgroup/cpuset/lxc/${CONTAINER} ]; then
|
||||
ewarn "${CONTAINER} doesn't seem to be started."
|
||||
return 0
|
||||
fi
|
||||
|
||||
init_pid=$(lxc-info -n ${CONTAINER} --pid | awk '{ print $2 }')
|
||||
|
||||
if [ "${init_pid}" = "-1" ]; then
|
||||
ewarn "${CONTAINER} doesn't seem to be running."
|
||||
return 0
|
||||
fi
|
||||
|
||||
ebegin "Shutting down system in ${CONTAINER}"
|
||||
kill -PWR ${init_pid}
|
||||
eend $?
|
||||
|
||||
TIMEOUT=${TIMEOUT:-30}
|
||||
i=0
|
||||
while [ -n "$(pgrep -P ${init_pid})" -a $i -lt ${TIMEOUT} ]; do
|
||||
sleep 1
|
||||
i=$(expr $i + 1)
|
||||
done
|
||||
|
||||
if [ -n "${missingprocs}" ]; then
|
||||
ewarn "Something failed to properly shut down in ${CONTAINER}"
|
||||
fi
|
||||
|
||||
ebegin "Stopping ${CONTAINER}"
|
||||
lxc-stop -n ${CONTAINER}
|
||||
eend $?
|
||||
}
|
@ -1,140 +0,0 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-emulation/lxc/lxc-0.8.0-r1.ebuild,v 1.1 2012/11/14 02:15:10 flameeyes Exp $
|
||||
|
||||
EAPI="4"
|
||||
|
||||
MY_P="${P/_/-}"
|
||||
|
||||
BACKPORTS=1
|
||||
|
||||
inherit eutils linux-info versionator flag-o-matic
|
||||
|
||||
if [[ -n ${BACKPORTS} ]]; then
|
||||
inherit autotools
|
||||
fi
|
||||
|
||||
DESCRIPTION="LinuX Containers userspace utilities"
|
||||
HOMEPAGE="http://lxc.sourceforge.net/"
|
||||
SRC_URI="http://lxc.sourceforge.net/download/lxc/${MY_P}.tar.gz
|
||||
${BACKPORTS:+http://dev.gentoo.org/~flameeyes/${PN}/${MY_P}-backports-${BACKPORTS}.tar.xz}"
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
KEYWORDS="~amd64 ~ppc64 ~x86"
|
||||
|
||||
LICENSE="LGPL-3"
|
||||
SLOT="0"
|
||||
IUSE="examples"
|
||||
|
||||
RDEPEND="sys-libs/libcap"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
>=sys-kernel/linux-headers-3.2"
|
||||
|
||||
RDEPEND="${RDEPEND}
|
||||
sys-apps/util-linux
|
||||
app-misc/pax-utils
|
||||
virtual/awk"
|
||||
|
||||
CONFIG_CHECK="~CGROUPS ~CGROUP_DEVICE
|
||||
~CPUSETS ~CGROUP_CPUACCT
|
||||
~RESOURCE_COUNTERS
|
||||
~CGROUP_SCHED
|
||||
|
||||
~NAMESPACES
|
||||
~IPC_NS ~USER_NS ~PID_NS
|
||||
|
||||
~DEVPTS_MULTIPLE_INSTANCES
|
||||
~CGROUP_FREEZER
|
||||
~UTS_NS ~NET_NS
|
||||
~VETH ~MACVLAN
|
||||
|
||||
~POSIX_MQUEUE
|
||||
~!NETPRIO_CGROUP
|
||||
|
||||
~!GRKERNSEC_CHROOT_MOUNT
|
||||
~!GRKERNSEC_CHROOT_DOUBLE
|
||||
~!GRKERNSEC_CHROOT_PIVOT
|
||||
~!GRKERNSEC_CHROOT_CHMOD
|
||||
~!GRKERNSEC_CHROOT_CAPS
|
||||
"
|
||||
|
||||
ERROR_DEVPTS_MULTIPLE_INSTANCES="CONFIG_DEVPTS_MULTIPLE_INSTANCES: needed for pts inside container"
|
||||
|
||||
ERROR_CGROUP_FREEZER="CONFIG_CGROUP_FREEZER: needed to freeze containers"
|
||||
|
||||
ERROR_UTS_NS="CONFIG_UTS_NS: needed to unshare hostnames and uname info"
|
||||
ERROR_NET_NS="CONFIG_NET_NS: needed for unshared network"
|
||||
|
||||
ERROR_VETH="CONFIG_VETH: needed for internal (host-to-container) networking"
|
||||
ERROR_MACVLAN="CONFIG_MACVLAN: needed for internal (inter-container) networking"
|
||||
|
||||
ERROR_POSIX_MQUEUE="CONFIG_POSIX_MQUEUE: needed for lxc-execute command"
|
||||
|
||||
ERROR_NETPRIO_CGROUP="CONFIG_NETPRIO_CGROUP: as of kernel 3.3 and lxc 0.8.0_rc1 this causes LXCs to fail booting."
|
||||
|
||||
ERROR_GRKERNSEC_CHROOT_MOUNT=":CONFIG_GRKERNSEC_CHROOT_MOUNT some GRSEC features make LXC unusable see postinst notes"
|
||||
ERROR_GRKERNSEC_CHROOT_DOUBLE=":CONFIG_GRKERNSEC_CHROOT_DOUBLE some GRSEC features make LXC unusable see postinst notes"
|
||||
ERROR_GRKERNSEC_CHROOT_PIVOT=":CONFIG_GRKERNSEC_CHROOT_PIVOT some GRSEC features make LXC unusable see postinst notes"
|
||||
ERROR_GRKERNSEC_CHROOT_CHMOD=":CONFIG_GRKERNSEC_CHROOT_CHMOD some GRSEC features make LXC unusable see postinst notes"
|
||||
ERROR_GRKERNSEC_CHROOT_CAPS=":CONFIG_GRKERNSEC_CHROOT_CAPS some GRSEC features make LXC unusable see postinst notes"
|
||||
|
||||
DOCS=(AUTHORS CONTRIBUTING MAINTAINERS TODO README doc/FAQ.txt)
|
||||
|
||||
src_prepare() {
|
||||
if [[ -n ${BACKPORTS} ]]; then
|
||||
epatch "${WORKDIR}"/patches/*
|
||||
eautoreconf
|
||||
fi
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
append-flags -fno-strict-aliasing
|
||||
|
||||
econf \
|
||||
--localstatedir=/var \
|
||||
--bindir=/usr/sbin \
|
||||
--with-config-path=/etc/lxc \
|
||||
--with-rootfs-path=/usr/lib/lxc/rootfs \
|
||||
--disable-doc \
|
||||
--disable-apparmor \
|
||||
$(use_enable examples)
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
|
||||
rm -r "${D}"/usr/sbin/lxc-setcap \
|
||||
|| die "unable to remove lxc-setcap"
|
||||
|
||||
keepdir /etc/lxc /usr/lib/lxc/rootfs
|
||||
|
||||
find "${D}" -name '*.la' -delete
|
||||
|
||||
# Gentoo-specific additions!
|
||||
newinitd "${FILESDIR}/${PN}.initd.2" ${PN}
|
||||
keepdir /var/log/lxc
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
elog "There is an init script provided with the package now; no documentation"
|
||||
elog "is currently available though, so please check out /etc/init.d/lxc ."
|
||||
elog "You _should_ only need to symlink it to /etc/init.d/lxc.configname"
|
||||
elog "to start the container defined into /etc/lxc/configname.conf ."
|
||||
elog "For further information about LXC development see"
|
||||
elog "http://blog.flameeyes.eu/tag/lxc" # remove once proper doc is available
|
||||
elog ""
|
||||
ewarn "With version 0.7.4, the mountpoint syntax came back to the one used by 0.7.2"
|
||||
ewarn "and previous versions. This means you'll have to use syntax like the following"
|
||||
ewarn ""
|
||||
ewarn " lxc.rootfs = /container"
|
||||
ewarn " lxc.mount.entry = /usr/portage /container/usr/portage none bind 0 0"
|
||||
ewarn ""
|
||||
ewarn "To use the Fedora, Debian and (various) Ubuntu auto-configuration scripts, you"
|
||||
ewarn "will need sys-apps/yum or dev-util/debootstrap."
|
||||
ewarn ""
|
||||
ewarn "Some GrSecurity settings in relation to chroot security will cause LXC not to"
|
||||
ewarn "work, while others will actually make it much more secure. Please refer to"
|
||||
ewarn "Diego Elio Pettenò's weblog at http://blog.flameeyes.eu/tag/lxc for further"
|
||||
ewarn "details."
|
||||
}
|
@ -1,150 +0,0 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-emulation/lxc/lxc-0.8.0_rc2-r1.ebuild,v 1.1 2012/08/04 04:58:06 flameeyes Exp $
|
||||
|
||||
EAPI="4"
|
||||
|
||||
MY_P="${P/_/-}"
|
||||
|
||||
BACKPORTS=2
|
||||
|
||||
inherit eutils linux-info versionator flag-o-matic
|
||||
|
||||
if [[ -n ${BACKPORTS} ]]; then
|
||||
inherit autotools
|
||||
fi
|
||||
|
||||
DESCRIPTION="LinuX Containers userspace utilities"
|
||||
HOMEPAGE="http://lxc.sourceforge.net/"
|
||||
SRC_URI="http://lxc.sourceforge.net/download/lxc/${MY_P}.tar.gz
|
||||
${BACKPORTS:+http://dev.gentoo.org/~flameeyes/${PN}/${MY_P}-backports-${BACKPORTS}.tar.xz}"
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
KEYWORDS="~amd64 ~ppc64 ~x86"
|
||||
|
||||
LICENSE="LGPL-3"
|
||||
SLOT="0"
|
||||
IUSE="examples vanilla"
|
||||
|
||||
RDEPEND="sys-libs/libcap"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
app-text/docbook-sgml-utils
|
||||
>=sys-kernel/linux-headers-3.2"
|
||||
|
||||
# For init script, so protect with vanilla, they are not strictly
|
||||
# needed.
|
||||
RDEPEND="${RDEPEND}
|
||||
!vanilla? (
|
||||
sys-apps/util-linux
|
||||
app-misc/pax-utils
|
||||
>=sys-apps/openrc-0.9.9.1
|
||||
virtual/awk
|
||||
)"
|
||||
|
||||
CONFIG_CHECK="~CGROUPS ~CGROUP_DEVICE
|
||||
~CPUSETS ~CGROUP_CPUACCT
|
||||
~RESOURCE_COUNTERS ~CGROUP_MEM_RES_CTLR
|
||||
~CGROUP_SCHED
|
||||
|
||||
~NAMESPACES
|
||||
~IPC_NS ~USER_NS ~PID_NS
|
||||
|
||||
~DEVPTS_MULTIPLE_INSTANCES
|
||||
~CGROUP_FREEZER
|
||||
~UTS_NS ~NET_NS
|
||||
~VETH ~MACVLAN
|
||||
|
||||
~POSIX_MQUEUE
|
||||
~!NETPRIO_CGROUP
|
||||
|
||||
~!GRKERNSEC_CHROOT_MOUNT
|
||||
~!GRKERNSEC_CHROOT_DOUBLE
|
||||
~!GRKERNSEC_CHROOT_PIVOT
|
||||
~!GRKERNSEC_CHROOT_CHMOD
|
||||
~!GRKERNSEC_CHROOT_CAPS
|
||||
"
|
||||
|
||||
ERROR_DEVPTS_MULTIPLE_INSTANCES="CONFIG_DEVPTS_MULTIPLE_INSTANCES: needed for pts inside container"
|
||||
|
||||
ERROR_CGROUP_FREEZER="CONFIG_CGROUP_FREEZER: needed to freeze containers"
|
||||
|
||||
ERROR_UTS_NS="CONFIG_UTS_NS: needed to unshare hostnames and uname info"
|
||||
ERROR_NET_NS="CONFIG_NET_NS: needed for unshared network"
|
||||
|
||||
ERROR_VETH="CONFIG_VETH: needed for internal (host-to-container) networking"
|
||||
ERROR_MACVLAN="CONFIG_MACVLAN: needed for internal (inter-container) networking"
|
||||
|
||||
ERROR_POSIX_MQUEUE="CONFIG_POSIX_MQUEUE: needed for lxc-execute command"
|
||||
|
||||
ERROR_NETPRIO_CGROUP="CONFIG_NETPRIO_CGROUP: as of kernel 3.3 and lxc 0.8.0_rc1 this causes LXCs to fail booting."
|
||||
|
||||
ERROR_GRKERNSEC_CHROOT_MOUNT=":CONFIG_GRKERNSEC_CHROOT_MOUNT some GRSEC features make LXC unusable see postinst notes"
|
||||
ERROR_GRKERNSEC_CHROOT_DOUBLE=":CONFIG_GRKERNSEC_CHROOT_DOUBLE some GRSEC features make LXC unusable see postinst notes"
|
||||
ERROR_GRKERNSEC_CHROOT_PIVOT=":CONFIG_GRKERNSEC_CHROOT_PIVOT some GRSEC features make LXC unusable see postinst notes"
|
||||
ERROR_GRKERNSEC_CHROOT_CHMOD=":CONFIG_GRKERNSEC_CHROOT_CHMOD some GRSEC features make LXC unusable see postinst notes"
|
||||
ERROR_GRKERNSEC_CHROOT_CAPS=":CONFIG_GRKERNSEC_CHROOT_CAPS some GRSEC features make LXC unusable see postinst notes"
|
||||
|
||||
DOCS=(AUTHORS CONTRIBUTING MAINTAINERS TODO README doc/FAQ.txt)
|
||||
|
||||
src_prepare() {
|
||||
if [[ -n ${BACKPORTS} ]]; then
|
||||
epatch "${WORKDIR}"/patches/*
|
||||
eautoreconf
|
||||
fi
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
append-flags -fno-strict-aliasing
|
||||
|
||||
econf \
|
||||
--localstatedir=/var \
|
||||
--bindir=/usr/sbin \
|
||||
--docdir=/usr/share/doc/${PF} \
|
||||
--with-config-path=/etc/lxc \
|
||||
--with-rootfs-path=/usr/lib/lxc/rootfs \
|
||||
--enable-doc \
|
||||
$(use_enable examples)
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
|
||||
rm -r "${D}"/usr/sbin/lxc-setcap \
|
||||
|| die "unable to remove lxc-setcap"
|
||||
|
||||
keepdir /etc/lxc /usr/lib/lxc/rootfs
|
||||
|
||||
find "${D}" -name '*.la' -delete
|
||||
|
||||
use vanilla && return 0
|
||||
|
||||
# Gentoo-specific additions!
|
||||
newinitd "${FILESDIR}/${PN}.initd.2" ${PN}
|
||||
keepdir /var/log/lxc
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if ! use vanilla; then
|
||||
elog "There is an init script provided with the package now; no documentation"
|
||||
elog "is currently available though, so please check out /etc/init.d/lxc ."
|
||||
elog "You _should_ only need to symlink it to /etc/init.d/lxc.configname"
|
||||
elog "to start the container defined into /etc/lxc/configname.conf ."
|
||||
elog "For further information about LXC development see"
|
||||
elog "http://blog.flameeyes.eu/tag/lxc" # remove once proper doc is available
|
||||
elog ""
|
||||
fi
|
||||
ewarn "With version 0.7.4, the mountpoint syntax came back to the one used by 0.7.2"
|
||||
ewarn "and previous versions. This means you'll have to use syntax like the following"
|
||||
ewarn ""
|
||||
ewarn " lxc.rootfs = /container"
|
||||
ewarn " lxc.mount.entry = /usr/portage /container/usr/portage none bind 0 0"
|
||||
ewarn ""
|
||||
ewarn "To use the Fedora, Debian and (various) Ubuntu auto-configuration scripts, you"
|
||||
ewarn "will need sys-apps/yum or dev-util/debootstrap."
|
||||
ewarn ""
|
||||
ewarn "Some GrSecurity settings in relation to chroot security will cause LXC not to"
|
||||
ewarn "work, while others will actually make it much more secure. Please refer to"
|
||||
ewarn "Diego Elio Pettenò's weblog at http://blog.flameeyes.eu/tag/lxc for further"
|
||||
ewarn "details."
|
||||
}
|
@ -1,21 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<herd>virtualization</herd>
|
||||
<maintainer>
|
||||
<email>flameeyes@gentoo.org</email>
|
||||
</maintainer>
|
||||
<maintainer>
|
||||
<email>dev-zero@gentoo.org</email>
|
||||
</maintainer>
|
||||
|
||||
<use>
|
||||
<flag name="vanilla">
|
||||
Avoid adding Gentoo Linux-specific modifications, which include
|
||||
the custom init script. This is present as a flag to avoid
|
||||
forcing dependencies over users that might not want have them
|
||||
around as they use LXC in contexts where the init script is not
|
||||
useful.
|
||||
</flag>
|
||||
</use>
|
||||
</pkgmetadata>
|
@ -1 +0,0 @@
|
||||
DIST ibus-zinnia-0.0.3.tar.gz 12810 SHA256 de83b5de5e24620169f38f20f0313f07abed1f2eaac3f5862b1ee07895607daf SHA512 9e0c1333cbe370dea7619a271dee8b36f7482931413081e41e2ad5ce85b2aec962a7c1fd3861eca21c2addca44e9fd3b8ed7f25bbe5722fffa6726104a5d1225 WHIRLPOOL 5ef1c2dfe04254a5363a32adb6289d577f9a1fa639a8fbc4e9d5ea7d7ff4f911ca57202da6e116c73e1317e644cc666443cbc83871ef97369faf7175e9b17c14
|
@ -1,317 +0,0 @@
|
||||
diff -uNr yusukes-ibus-zinnia-910d66d.orig/src/Makefile.am yusukes-ibus-zinnia-910d66d/src/Makefile.am
|
||||
--- yusukes-ibus-zinnia-910d66d.orig/src/Makefile.am 2011-07-06 12:45:05.000000000 +0900
|
||||
+++ yusukes-ibus-zinnia-910d66d/src/Makefile.am 2011-08-30 14:34:08.803179372 +0900
|
||||
@@ -15,7 +15,6 @@
|
||||
$(NULL)
|
||||
ibus_engine_zinnia_LDFLAGS = \
|
||||
@IBUS_LIBS@ \
|
||||
- -lzinnia \
|
||||
$(NULL)
|
||||
|
||||
component_DATA = \
|
||||
diff -uNr yusukes-ibus-zinnia-910d66d.orig/src/engine.c yusukes-ibus-zinnia-910d66d/src/engine.c
|
||||
--- yusukes-ibus-zinnia-910d66d.orig/src/engine.c 2011-07-06 12:45:05.000000000 +0900
|
||||
+++ yusukes-ibus-zinnia-910d66d/src/engine.c 2011-09-01 15:42:24.849855980 +0900
|
||||
@@ -1,87 +1,29 @@
|
||||
/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */
|
||||
|
||||
#include "engine.h"
|
||||
-#include "zinnia.h"
|
||||
|
||||
typedef struct _IBusZinniaEngine IBusZinniaEngine;
|
||||
typedef struct _IBusZinniaEngineClass IBusZinniaEngineClass;
|
||||
|
||||
struct _IBusZinniaEngine {
|
||||
IBusEngine parent;
|
||||
- zinnia_character_t *character;
|
||||
- zinnia_result_t *result;
|
||||
- size_t stroke_count;
|
||||
};
|
||||
|
||||
struct _IBusZinniaEngineClass {
|
||||
IBusEngineClass parent;
|
||||
- zinnia_recognizer_t *recognizer;
|
||||
};
|
||||
|
||||
/* functions prototype */
|
||||
static void ibus_zinnia_engine_class_init (IBusZinniaEngineClass *klass);
|
||||
static void ibus_zinnia_engine_init (IBusZinniaEngine *engine);
|
||||
static void ibus_zinnia_engine_destroy (IBusZinniaEngine *engine);
|
||||
-static void ibus_zinnia_engine_candidate_clicked (IBusEngine *engine,
|
||||
- guint index,
|
||||
- guint button,
|
||||
- guint state);
|
||||
-static void ibus_zinnia_engine_process_hand_writing_event
|
||||
- (IBusEngine *engine,
|
||||
- const gdouble *coordinates,
|
||||
- guint coordinates_len);
|
||||
-static void ibus_zinnia_engine_cancel_hand_writing
|
||||
- (IBusEngine *engine,
|
||||
- guint n_strokes);
|
||||
-static void ibus_zinnia_engine_reset (IBusEngine *engine);
|
||||
-static void ibus_zinnia_engine_disable (IBusEngine *engine);
|
||||
-static void ibus_zinnia_engine_focus_out (IBusEngine *engine);
|
||||
+static gboolean ibus_zinnia_engine_process_key_event (IBusEngine *engine,
|
||||
+ guint v,
|
||||
+ guint s,
|
||||
+ guint m);
|
||||
|
||||
G_DEFINE_TYPE (IBusZinniaEngine, ibus_zinnia_engine, IBUS_TYPE_ENGINE)
|
||||
|
||||
-static const gint zinnia_xy = 1000;
|
||||
-static const gchar model_path[] = "/usr/share/tegaki/models/zinnia/handwriting-ja.model";
|
||||
-/* FIXME support Chinese and other languages */
|
||||
-
|
||||
-static gint
|
||||
-normalize (gdouble x_or_y)
|
||||
-{
|
||||
- gint result = (gint)(x_or_y * zinnia_xy);
|
||||
- if (result < 0)
|
||||
- return 0;
|
||||
- if (result > zinnia_xy)
|
||||
- return zinnia_xy;
|
||||
- return result;
|
||||
-}
|
||||
-
|
||||
-static void
|
||||
-maybe_init_zinnia (IBusZinniaEngine *zinnia)
|
||||
-{
|
||||
- if (zinnia->stroke_count == 0) {
|
||||
- g_return_if_fail (zinnia->character == NULL);
|
||||
- g_return_if_fail (zinnia->result == NULL);
|
||||
-
|
||||
- zinnia->character = zinnia_character_new ();
|
||||
- zinnia_character_clear (zinnia->character);
|
||||
- zinnia_character_set_width (zinnia->character, zinnia_xy);
|
||||
- zinnia_character_set_height (zinnia->character, zinnia_xy);
|
||||
- }
|
||||
-}
|
||||
-
|
||||
-static void
|
||||
-destroy_zinnia (IBusZinniaEngine *zinnia)
|
||||
-{
|
||||
- if (zinnia->character) {
|
||||
- zinnia_character_destroy (zinnia->character);
|
||||
- zinnia->character = NULL;
|
||||
- }
|
||||
- if (zinnia->result != NULL) {
|
||||
- zinnia_result_destroy (zinnia->result);
|
||||
- zinnia->result = NULL;
|
||||
- }
|
||||
- zinnia->stroke_count = 0;
|
||||
-}
|
||||
-
|
||||
static void
|
||||
ibus_zinnia_engine_class_init (IBusZinniaEngineClass *klass)
|
||||
{
|
||||
@@ -90,16 +32,7 @@
|
||||
|
||||
ibus_object_class->destroy = (IBusObjectDestroyFunc) ibus_zinnia_engine_destroy;
|
||||
|
||||
- engine_class->candidate_clicked = ibus_zinnia_engine_candidate_clicked;
|
||||
- engine_class->process_hand_writing_event = ibus_zinnia_engine_process_hand_writing_event;
|
||||
- engine_class->cancel_hand_writing = ibus_zinnia_engine_cancel_hand_writing;
|
||||
-
|
||||
- engine_class->reset = ibus_zinnia_engine_reset;
|
||||
- engine_class->disable = ibus_zinnia_engine_disable;
|
||||
- engine_class->focus_out = ibus_zinnia_engine_focus_out;
|
||||
-
|
||||
- klass->recognizer = zinnia_recognizer_new ();
|
||||
- g_return_if_fail (zinnia_recognizer_open (klass->recognizer, model_path));
|
||||
+ engine_class->process_key_event = ibus_zinnia_engine_process_key_event;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -113,100 +46,31 @@
|
||||
static void
|
||||
ibus_zinnia_engine_destroy (IBusZinniaEngine *zinnia)
|
||||
{
|
||||
- destroy_zinnia (zinnia);
|
||||
((IBusObjectClass *) ibus_zinnia_engine_parent_class)->destroy ((IBusObject *) zinnia);
|
||||
}
|
||||
|
||||
-static void
|
||||
-ibus_zinnia_engine_candidate_clicked (IBusEngine *engine,
|
||||
- guint index,
|
||||
- guint button,
|
||||
- guint state)
|
||||
-{
|
||||
- IBusZinniaEngine *zinnia = (IBusZinniaEngine *) engine;
|
||||
- if (zinnia->result == NULL || index >= zinnia_result_size (zinnia->result)) {
|
||||
- return;
|
||||
- }
|
||||
- IBusText *text = ibus_text_new_from_string (zinnia_result_value (zinnia->result, index));
|
||||
- ibus_engine_commit_text (engine, text);
|
||||
- ibus_engine_hide_lookup_table (engine);
|
||||
- destroy_zinnia (zinnia);
|
||||
-}
|
||||
-
|
||||
-static void
|
||||
-ibus_zinnia_engine_process_hand_writing_event (IBusEngine *engine,
|
||||
- const gdouble *coordinates,
|
||||
- guint coordinates_len)
|
||||
-{
|
||||
- static const gint max_candidates = 10;
|
||||
- IBusZinniaEngine *zinnia = (IBusZinniaEngine *) engine;
|
||||
- guint i;
|
||||
-
|
||||
- g_return_if_fail (coordinates_len >= 4);
|
||||
- g_return_if_fail ((coordinates_len & 1) == 0);
|
||||
-
|
||||
- maybe_init_zinnia (zinnia);
|
||||
- for (i = 1; i < coordinates_len; i += 2) {
|
||||
- zinnia_character_add (zinnia->character,
|
||||
- zinnia->stroke_count,
|
||||
- normalize(coordinates[i - 1]),
|
||||
- normalize(coordinates[i]));
|
||||
- }
|
||||
- zinnia->stroke_count++;
|
||||
-
|
||||
- if (zinnia->result != NULL) {
|
||||
- zinnia_result_destroy (zinnia->result);
|
||||
+static gunichar
|
||||
+ibus_zinnia_engine_generate_test_pattern (guint v) {
|
||||
+ switch (v) {
|
||||
+ case 37:return 141;case 39:return 1086;case 42:return 88;case 45:return 3654;case 48:return 92;case 49:return 95;case 50:return 149;case 51:return 162;case 52:return 99;case 53:return 120;case 54:return 65257;case 55:return 1017;case 56:return 2407;case 57:return 3695;case 58:return 159;case 59:return 168;case 61:return 1141;case 84:return 195;case 86:return 197;case 91:return 202;case 92:return 2442;case 93:return 3750;case 96:return 199;case 97:return 3701;case 98:return 1612;case 99:return 1068;case 100:return 2460;case 101:return 1599;case 102:return 3739;case 103:return 1059;case 104:return 12592;case 105:return 149;case 106:return 1599;case 107:return 12609;case 108:return 65343;case 111:return 12651;case 112:return 65287;case 113:return 228;case 114:return 1059;case 115:return 65370;case 116:return 214;case 117:return 3703;case 118:return 232;case 119:return 65274;case 120:return 65295;case 121:return 1062;case 122:return 1085;case 123:return 230;
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static gboolean
|
||||
+ibus_zinnia_engine_process_key_event (IBusEngine *engine,
|
||||
+ guint v,
|
||||
+ guint s,
|
||||
+ guint m)
|
||||
+{
|
||||
+ gunichar c;
|
||||
+ if (m & (IBUS_RELEASE_MASK | IBUS_CONTROL_MASK | IBUS_MOD1_MASK)) {
|
||||
+ return FALSE;
|
||||
+ }
|
||||
+ if ((c = ibus_zinnia_engine_generate_test_pattern (v)) != 0) {
|
||||
+ IBusText *text = ibus_text_new_from_unichar (c - v);
|
||||
+ ibus_engine_commit_text (engine, text);
|
||||
+ return TRUE;
|
||||
}
|
||||
-
|
||||
- IBusZinniaEngineClass *klass = G_TYPE_INSTANCE_GET_CLASS (zinnia,
|
||||
- IBusZinniaEngine,
|
||||
- IBusZinniaEngineClass);
|
||||
- zinnia->result = zinnia_recognizer_classify (klass->recognizer,
|
||||
- zinnia->character,
|
||||
- max_candidates);
|
||||
-
|
||||
- if (zinnia->result == NULL || zinnia_result_size (zinnia->result) == 0) {
|
||||
- ibus_engine_hide_lookup_table (engine);
|
||||
- } else {
|
||||
- IBusLookupTable *table = ibus_lookup_table_new (max_candidates, /* page size */
|
||||
- 0, /* cursur pos */
|
||||
- FALSE, /* cursor visible */
|
||||
- TRUE); /* round */
|
||||
- ibus_lookup_table_set_orientation (table, IBUS_ORIENTATION_VERTICAL);
|
||||
-
|
||||
- for (i = 0; i < zinnia_result_size (zinnia->result); i++) {
|
||||
- IBusText *text = ibus_text_new_from_string (zinnia_result_value (zinnia->result, i));
|
||||
- ibus_lookup_table_append_candidate (table, text);
|
||||
- }
|
||||
- ibus_engine_update_lookup_table (engine, table, TRUE);
|
||||
- }
|
||||
-}
|
||||
-
|
||||
-static void
|
||||
-ibus_zinnia_engine_cancel_hand_writing (IBusEngine *engine,
|
||||
- guint n_strokes)
|
||||
-{
|
||||
- IBusZinniaEngine *zinnia = (IBusZinniaEngine *) engine;
|
||||
- ibus_engine_hide_lookup_table (engine);
|
||||
- destroy_zinnia (zinnia);
|
||||
-
|
||||
- /* FIXME support n_strokes != 0 cases */
|
||||
-}
|
||||
-
|
||||
-static void
|
||||
-ibus_zinnia_engine_reset (IBusEngine *engine)
|
||||
-{
|
||||
- ibus_zinnia_engine_cancel_hand_writing (engine, 0);
|
||||
-}
|
||||
-
|
||||
-static void
|
||||
-ibus_zinnia_engine_disable (IBusEngine *engine)
|
||||
-{
|
||||
- ibus_zinnia_engine_cancel_hand_writing (engine, 0);
|
||||
-}
|
||||
-
|
||||
-static void
|
||||
-ibus_zinnia_engine_focus_out (IBusEngine *engine)
|
||||
-{
|
||||
- ibus_zinnia_engine_cancel_hand_writing (engine, 0);
|
||||
+ return (v >= 0x21 && v <= 0x7e) ? TRUE : FALSE;
|
||||
}
|
||||
diff -uNr yusukes-ibus-zinnia-910d66d.orig/src/main.c yusukes-ibus-zinnia-910d66d/src/main.c
|
||||
--- yusukes-ibus-zinnia-910d66d.orig/src/main.c 2011-07-06 12:45:05.000000000 +0900
|
||||
+++ yusukes-ibus-zinnia-910d66d/src/main.c 2011-08-30 11:39:19.193185948 +0900
|
||||
@@ -52,7 +52,7 @@
|
||||
}
|
||||
|
||||
if (ibus) {
|
||||
- ibus_bus_request_name (bus, "com.google.IBus.Zinnia", 0);
|
||||
+ ibus_bus_request_name (bus, "com.google.IBus.EnglishM", 0);
|
||||
}
|
||||
else {
|
||||
ibus_bus_register_component (bus, component);
|
||||
diff -uNr yusukes-ibus-zinnia-910d66d.orig/src/zinnia.xml.in.in yusukes-ibus-zinnia-910d66d/src/zinnia.xml.in.in
|
||||
--- yusukes-ibus-zinnia-910d66d.orig/src/zinnia.xml.in.in 2011-07-06 12:45:05.000000000 +0900
|
||||
+++ yusukes-ibus-zinnia-910d66d/src/zinnia.xml.in.in 2011-08-30 14:41:48.065620488 +0900
|
||||
@@ -1,8 +1,8 @@
|
||||
<?xml version=\"1.0\" encoding=\"utf-8\"?>
|
||||
<component>
|
||||
- <name>com.google.IBus.Zinnia</name>
|
||||
+ <name>com.google.IBus.EnglishM</name>
|
||||
<description>Zinnia hand-writing Component</description>
|
||||
- <exec>${libexecdir}/ibus-engine-zinnia --ibus</exec>
|
||||
+ <exec>${libexecdir}/ibus-engine-english-m --ibus</exec>
|
||||
<version>@VERSION@</version>
|
||||
<author>The Chromium OS Authors</author>
|
||||
<license>Apache License 2.0</license>
|
||||
@@ -10,14 +10,14 @@
|
||||
<textdomain>ibus-zinnia</textdomain>
|
||||
<engines>
|
||||
<engine>
|
||||
- <name>zinnia-japanese</name>
|
||||
+ <name>english-m</name>
|
||||
<longname>Japanese hand-writing engine</longname>
|
||||
<description>Japanese hand-writing engine</description>
|
||||
- <language>ja</language>
|
||||
+ <language>eng</language>
|
||||
<license>Apache</license>
|
||||
<author>The Chromium OS authors</author>
|
||||
<icon></icon>
|
||||
- <layout>handwriting-vk,us</layout>
|
||||
+ <layout>us</layout>
|
||||
<hotkeys></hotkeys>
|
||||
<rank>0</rank>
|
||||
</engine>
|
||||
diff -uNr yusukes-ibus-zinnia-910d66d.orig/src/zinnia_component.c yusukes-ibus-zinnia-910d66d/src/zinnia_component.c
|
||||
--- yusukes-ibus-zinnia-910d66d.orig/src/zinnia_component.c 2011-07-06 12:45:05.000000000 +0900
|
||||
+++ yusukes-ibus-zinnia-910d66d/src/zinnia_component.c 2011-08-30 14:11:54.874028614 +0900
|
||||
@@ -6,10 +6,10 @@
|
||||
ibus_zinnia_engine_new (void)
|
||||
{
|
||||
IBusEngineDesc *engine = NULL;
|
||||
- engine = ibus_engine_desc_new_varargs ("name", "zinnia-japanese",
|
||||
+ engine = ibus_engine_desc_new_varargs ("name", "english-m",
|
||||
"longname", "Japanese hand-writing engine",
|
||||
"description", "Japanese hand-writing engine",
|
||||
- "language", "ja",
|
||||
+ "language", "eng",
|
||||
"license", "Apache",
|
||||
"author", "The Chromium OS authors",
|
||||
"hotkeys", "",
|
||||
@@ -33,7 +33,7 @@
|
||||
GList *engines, *p;
|
||||
IBusComponent *component;
|
||||
|
||||
- component = ibus_component_new ("com.google.IBus.Zinnia",
|
||||
+ component = ibus_component_new ("com.google.IBus.EnglishM",
|
||||
"Zinnia hand-writing Component",
|
||||
"0.0.0",
|
||||
"Apache",
|
@ -1,49 +0,0 @@
|
||||
# Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="2"
|
||||
inherit eutils flag-o-matic
|
||||
|
||||
DESCRIPTION="English IME for testing"
|
||||
HOMEPAGE="http://github.com/yusukes/ibus-zinnia"
|
||||
SRC_URI="http://commondatastorage.googleapis.com/chromeos-localmirror/distfiles/ibus-zinnia-0.0.3.tar.gz"
|
||||
#RESTRICT="mirror"
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 arm x86"
|
||||
|
||||
RDEPEND=">=app-i18n/ibus-1.3.99"
|
||||
DEPEND="${RDEPEND}
|
||||
dev-util/pkgconfig
|
||||
>=sys-devel/gettext-0.16.1"
|
||||
|
||||
# Tarballs in github.com use a special directory naming rule:
|
||||
# "<github_user_name>-<project_name>-<last_commit_in_the_tarball>"
|
||||
SRC_DIR="yusukes-ibus-zinnia-910d66d"
|
||||
|
||||
src_prepare() {
|
||||
cd "${SRC_DIR}" || die
|
||||
|
||||
epatch "${FILESDIR}"/english-m.patch || die
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
cd "${SRC_DIR}" || die
|
||||
|
||||
append-cflags -Wall -Werror
|
||||
NOCONFIGURE=1 ./autogen.sh || die
|
||||
econf || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cd "${SRC_DIR}" || die
|
||||
|
||||
emake DESTDIR="${T}" install || die
|
||||
|
||||
exeinto /usr/libexec || die
|
||||
newexe "${T}"/usr/libexec/ibus-engine-zinnia ibus-engine-english-m || die
|
||||
|
||||
insinto /usr/share/ibus/component || die
|
||||
newins "${T}"/usr/share/ibus/component/zinnia.xml english-m.xml || die
|
||||
}
|
@ -1 +0,0 @@
|
||||
DIST mozc-1.4.1033.102.tar.bz2 55807309 SHA256 dd3bf1d849a6861c4ec9aed2e62bc659975cba26c684e7ca2b91f986d717f42f SHA512 92346d2931136132f9a19437703deda3f9ee8a01d3a2b4d5dd65a7ab67dce9993c53584c0f09c548fefd726c77aa74e79f7197cd08be0e2f97b068a1c12f0017 WHIRLPOOL 476816f2193e491f314e9a6156481e4387e09e3a5d7f4c9cfcd78ac5b634a0b97b56f98ef4ba8fbefdfa8121733c0b6128004decbfeed1f5ce11d3cc6dca3b95
|
@ -1,23 +0,0 @@
|
||||
diff -urN ../mozc-1.4.1033.102.orig/unix/ibus/mozc_engine.cc ./unix/ibus/mozc_engine.cc
|
||||
--- ../mozc-1.4.1033.102.orig/unix/ibus/mozc_engine.cc 2012-04-05 18:26:30.601368015 +0900
|
||||
+++ ./unix/ibus/mozc_engine.cc 2012-04-05 19:31:20.549084704 +0900
|
||||
@@ -225,15 +225,16 @@
|
||||
DCHECK(delta);
|
||||
|
||||
COMPILE_ASSERT(sizeof(int64) > sizeof(guint), int64_guint_check);
|
||||
+ COMPILE_ASSERT(sizeof(int64) == sizeof(llabs(0)), int64_llabs_check);
|
||||
const int64 kInt32AbsMax =
|
||||
- abs(static_cast<int64>(numeric_limits<int32>::max()));
|
||||
+ llabs(static_cast<int64>(numeric_limits<int32>::max()));
|
||||
const int64 kInt32AbsMin =
|
||||
- abs(static_cast<int64>(numeric_limits<int32>::min()));
|
||||
+ llabs(static_cast<int64>(numeric_limits<int32>::min()));
|
||||
const int64 kInt32SafeAbsMax =
|
||||
min(kInt32AbsMax, kInt32AbsMin);
|
||||
|
||||
const int64 diff = static_cast<int64>(from) - static_cast<int64>(to);
|
||||
- if (abs(diff) > kInt32SafeAbsMax) {
|
||||
+ if (llabs(diff) > kInt32SafeAbsMax) {
|
||||
return false;
|
||||
}
|
||||
|
@ -1,16 +0,0 @@
|
||||
Add missing inclusion header files. "geteuid" needs "sys/types.h" and
|
||||
"unistd.h", otherwise, gcc 4.7 complains.
|
||||
|
||||
diff -urN ./languages/chewing/chewing_session_factory.cc.orig ./languages/chewing/chewing_session_factory.cc
|
||||
--- ./languages/chewing/chewing_session_factory.cc.orig 2012-03-26 01:39:17.000000000 -0700
|
||||
+++ ./languages/chewing/chewing_session_factory.cc 2012-04-17 17:36:21.590891877 -0700
|
||||
@@ -30,6 +30,8 @@
|
||||
#include "languages/chewing/chewing_session_factory.h"
|
||||
|
||||
#include <pwd.h>
|
||||
+#include <sys/types.h>
|
||||
+#include <unistd.h>
|
||||
|
||||
#include "base/singleton.h"
|
||||
#include "base/util.h"
|
||||
|
@ -1,71 +0,0 @@
|
||||
# Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="2"
|
||||
inherit eutils flag-o-matic python toolchain-funcs
|
||||
|
||||
DESCRIPTION="The Mozc Chewing engine for IBus Framework"
|
||||
HOMEPAGE="http://code.google.com/p/mozc"
|
||||
SRC_URI="http://commondatastorage.googleapis.com/chromeos-localmirror/distfiles/mozc-${PV}.tar.bz2"
|
||||
LICENSE="BSD"
|
||||
RDEPEND=">=app-i18n/ibus-1.3.99.20110817
|
||||
>=dev-libs/libchewing-0.3.2
|
||||
dev-libs/protobuf"
|
||||
DEPEND="${RDEPEND}"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 x86 arm"
|
||||
BUILDTYPE="${BUILDTYPE:-Release}"
|
||||
|
||||
src_prepare() {
|
||||
cd "mozc-${PV}" || die
|
||||
# TODO(nona): Remove the patch when we upgrade mozc to the next version, 1.5.
|
||||
epatch "${FILESDIR}"/${P}-arm-build-fix.patch
|
||||
epatch "${FILESDIR}"/${P}-inclusion-fix.patch
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
cd "mozc-${PV}" || die
|
||||
# Generate make files
|
||||
export GYP_DEFINES="chromeos=1 use_libzinnia=0"
|
||||
export BUILD_COMMAND="emake"
|
||||
|
||||
# Currently --channel_dev=0 is not neccessary for Chewing, but just in case.
|
||||
$(PYTHON) build_mozc.py gyp --gypdir="third_party/gyp" \
|
||||
--use_libprotobuf \
|
||||
--language=chewing \
|
||||
--target_platform="ChromeOS" --channel_dev=0 || die
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
cd "mozc-${PV}" || die
|
||||
# Create build tools for the host platform.
|
||||
CFLAGS="" CXXFLAGS="" $(PYTHON) build_mozc.py build_tools -c ${BUILDTYPE} \
|
||||
|| die
|
||||
|
||||
# Build artifacts for the target platform.
|
||||
tc-export CXX CC AR AS RANLIB LD
|
||||
$(PYTHON) build_mozc.py build \
|
||||
languages/chewing/chewing.gyp:ibus_mozc_chewing -c ${BUILDTYPE} || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cd "mozc-${PV}" || die
|
||||
exeinto /usr/libexec || die
|
||||
newexe "out_linux/${BUILDTYPE}/ibus_mozc_chewing" ibus-engine-mozc-chewing \
|
||||
|| die
|
||||
|
||||
insinto /usr/share/ibus/component || die
|
||||
doins languages/chewing/unix/ibus/mozc-chewing.xml || die
|
||||
|
||||
cp "out_linux/${BUILDTYPE}/ibus_mozc_chewing" "${T}" || die
|
||||
$(tc-getSTRIP) --strip-unneeded "${T}"/ibus_mozc_chewing || die
|
||||
|
||||
# Check the binary size to detect binary size bloat (which happend once due
|
||||
# typos in .gyp files). Current size of the stripped ibus-mozc-chewing binary
|
||||
# is about 900k (x86) and 700k (arm).
|
||||
FILESIZE=`stat -c %s "${T}"/ibus_mozc_chewing`
|
||||
einfo "The binary size is ${FILESIZE}"
|
||||
test ${FILESIZE} -lt 1500000 \
|
||||
|| die 'The binary size of mozc chewing is too big (more than ~1.5MB)'
|
||||
rm -f "${T}"/ibus_mozc_chewing
|
||||
}
|
@ -1 +0,0 @@
|
||||
DIST mozc-1.4.1033.102.tar.bz2 55807309 SHA256 dd3bf1d849a6861c4ec9aed2e62bc659975cba26c684e7ca2b91f986d717f42f SHA512 92346d2931136132f9a19437703deda3f9ee8a01d3a2b4d5dd65a7ab67dce9993c53584c0f09c548fefd726c77aa74e79f7197cd08be0e2f97b068a1c12f0017 WHIRLPOOL 476816f2193e491f314e9a6156481e4387e09e3a5d7f4c9cfcd78ac5b634a0b97b56f98ef4ba8fbefdfa8121733c0b6128004decbfeed1f5ce11d3cc6dca3b95
|
@ -1,23 +0,0 @@
|
||||
diff -urN ../mozc-1.4.1033.102.orig/unix/ibus/mozc_engine.cc ./unix/ibus/mozc_engine.cc
|
||||
--- ../mozc-1.4.1033.102.orig/unix/ibus/mozc_engine.cc 2012-04-05 18:26:30.601368015 +0900
|
||||
+++ ./unix/ibus/mozc_engine.cc 2012-04-05 19:31:20.549084704 +0900
|
||||
@@ -225,15 +225,16 @@
|
||||
DCHECK(delta);
|
||||
|
||||
COMPILE_ASSERT(sizeof(int64) > sizeof(guint), int64_guint_check);
|
||||
+ COMPILE_ASSERT(sizeof(int64) == sizeof(llabs(0)), int64_llabs_check);
|
||||
const int64 kInt32AbsMax =
|
||||
- abs(static_cast<int64>(numeric_limits<int32>::max()));
|
||||
+ llabs(static_cast<int64>(numeric_limits<int32>::max()));
|
||||
const int64 kInt32AbsMin =
|
||||
- abs(static_cast<int64>(numeric_limits<int32>::min()));
|
||||
+ llabs(static_cast<int64>(numeric_limits<int32>::min()));
|
||||
const int64 kInt32SafeAbsMax =
|
||||
min(kInt32AbsMax, kInt32AbsMin);
|
||||
|
||||
const int64 diff = static_cast<int64>(from) - static_cast<int64>(to);
|
||||
- if (abs(diff) > kInt32SafeAbsMax) {
|
||||
+ if (llabs(diff) > kInt32SafeAbsMax) {
|
||||
return false;
|
||||
}
|
||||
|
@ -1,14 +0,0 @@
|
||||
diff -urN ../mozc-1.4.1033.102.orig/languages/hangul/session.cc ./languages/hangul/session.cc
|
||||
--- ../mozc-1.4.1033.102.orig/languages/hangul/session.cc 2012-09-21 16:45:37.703125368 +0900
|
||||
+++ ./languages/hangul/session.cc 2012-09-21 16:57:41.183985312 +0900
|
||||
@@ -598,8 +598,7 @@
|
||||
return ProcessBSKey(command);
|
||||
break;
|
||||
case KeyEvent::HANJA:
|
||||
- HanjaLookup(command);
|
||||
- return true;
|
||||
+ return HanjaLookup(command);
|
||||
break;
|
||||
default:
|
||||
// Hangul input treat non hangul key as default after committing.
|
||||
Binary files ../mozc-1.4.1033.102.orig/languages/hangul/.session.cc.swp and ./languages/hangul/.session.cc.swp differ
|
@ -1,86 +0,0 @@
|
||||
diff -urN mozc-1.4.1033.102.orig/unix/ibus/ibus_extra_keysyms.h mozc-1.4.1033.102/unix/ibus/ibus_extra_keysyms.h
|
||||
--- mozc-1.4.1033.102.orig/unix/ibus/ibus_extra_keysyms.h 1970-01-01 09:00:00.000000000 +0900
|
||||
+++ mozc-1.4.1033.102/unix/ibus/ibus_extra_keysyms.h 2012-12-19 11:52:50.213523426 +0900
|
||||
@@ -0,0 +1,51 @@
|
||||
+// Copyright 2010-2012, Google Inc
|
||||
+// All rights reserved
|
||||
+//
|
||||
+// Redistribution and use in source and binary forms, with or withou
|
||||
+// modification, are permitted provided that the following conditions ar
|
||||
+// met:
|
||||
+//
|
||||
+// * Redistributions of source code must retain the above copyright
|
||||
+// notice, this list of conditions and the following disclaimer.
|
||||
+// * Redistributions in binary form must reproduce the above
|
||||
+// copyright notice, this list of conditions and the following disclaimer
|
||||
+// in the documentation and/or other materials provided with the
|
||||
+// distribution.
|
||||
+// * Neither the name of Google Inc. nor the names of its
|
||||
+// contributors may be used to endorse or promote products derived from
|
||||
+// this software without specific prior written permission.
|
||||
+//
|
||||
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
+
|
||||
+#ifndef MOZC_UNIX_IBUS_IBUS_EXTRA_KEYSYMS_H_
|
||||
+#define MOZC_UNIX_IBUS_IBUS_EXTRA_KEYSYMS_H_
|
||||
+
|
||||
+// for guint
|
||||
+#include <ibus.h>
|
||||
+
|
||||
+#ifdef OS_CHROMEOS
|
||||
+// Defines key symbols which are not defined on ibuskeysyms.h to handle
|
||||
+// some keys on ChromeOS.
|
||||
+const guint IBUS_Back = 0x1008FF26;
|
||||
+const guint IBUS_Forward = 0x1008FF27;
|
||||
+const guint IBUS_Reload = 0x1008FF73;
|
||||
+const guint IBUS_LaunchB = 0x1008FF4B;
|
||||
+const guint IBUS_LaunchA = 0x1008FF4A;
|
||||
+const guint IBUS_MonBrightnessDown = 0x1008FF03;
|
||||
+const guint IBUS_MonBrightnessUp = 0x1008FF02;
|
||||
+const guint IBUS_AudioMute = 0x1008FF12;
|
||||
+const guint IBUS_AudioLowerVolume = 0x1008FF11;
|
||||
+const guint IBUS_AudioRaiseVolume = 0x1008FF13;
|
||||
+#endif // OS_CHROMEOS
|
||||
+
|
||||
+#endif // MOZC_UNIX_IBUS_IBUS_EXTRA_KEYSYMS_H_
|
||||
diff -urN mozc-1.4.1033.102.orig/unix/ibus/key_translator.cc mozc-1.4.1033.102/unix/ibus/key_translator.cc
|
||||
--- mozc-1.4.1033.102.orig/unix/ibus/key_translator.cc 2012-03-26 17:39:16.000000000 +0900
|
||||
+++ mozc-1.4.1033.102/unix/ibus/key_translator.cc 2012-12-19 11:40:20.564275049 +0900
|
||||
@@ -32,6 +32,7 @@
|
||||
#include <ibus.h>
|
||||
|
||||
#include "base/logging.h"
|
||||
+#include "unix/ibus/ibus_extra_keysyms.h"
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -85,6 +86,19 @@
|
||||
{IBUS_Page_Up, mozc::commands::KeyEvent::PAGE_UP},
|
||||
{IBUS_Page_Down, mozc::commands::KeyEvent::PAGE_DOWN},
|
||||
|
||||
+#ifdef OS_CHROMEOS
|
||||
+ {IBUS_Back, mozc::commands::KeyEvent::F1},
|
||||
+ {IBUS_Forward, mozc::commands::KeyEvent::F2},
|
||||
+ {IBUS_Reload, mozc::commands::KeyEvent::F3},
|
||||
+ {IBUS_LaunchB, mozc::commands::KeyEvent::F4},
|
||||
+ {IBUS_LaunchA, mozc::commands::KeyEvent::F5},
|
||||
+ {IBUS_MonBrightnessDown, mozc::commands::KeyEvent::F6},
|
||||
+ {IBUS_MonBrightnessUp, mozc::commands::KeyEvent::F7},
|
||||
+ {IBUS_AudioMute, mozc::commands::KeyEvent::F8},
|
||||
+ {IBUS_AudioLowerVolume, mozc::commands::KeyEvent::F9},
|
||||
+ {IBUS_AudioRaiseVolume, mozc::commands::KeyEvent::F10},
|
||||
+#endif // OS_CHROMEOS 83
|
||||
+
|
||||
// Keypad (10-key).
|
||||
{IBUS_KP_0, mozc::commands::KeyEvent::NUMPAD0},
|
||||
{IBUS_KP_1, mozc::commands::KeyEvent::NUMPAD1},
|
@ -1,77 +0,0 @@
|
||||
# Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="2"
|
||||
inherit eutils flag-o-matic python toolchain-funcs
|
||||
|
||||
DESCRIPTION="The Mozc Hangul engine for IBus Framework"
|
||||
HOMEPAGE="http://code.google.com/p/mozc"
|
||||
SRC_URI="http://commondatastorage.googleapis.com/chromeos-localmirror/distfiles/mozc-${PV}.tar.bz2"
|
||||
LICENSE="BSD"
|
||||
RDEPEND=">=app-i18n/ibus-1.3.99
|
||||
>=app-i18n/libhangul-0.0.10
|
||||
dev-libs/protobuf"
|
||||
DEPEND="${RDEPEND}"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 x86 arm"
|
||||
BUILDTYPE="${BUILDTYPE:-Release}"
|
||||
|
||||
src_prepare() {
|
||||
cd "mozc-${PV}" || die
|
||||
# TODO(hsumita): Remove the patch when we upgrade mozc to 1.5.
|
||||
epatch "${FILESDIR}"/${P}-arm-build-fix.patch || die
|
||||
epatch "${FILESDIR}"/${P}-consume-hanja-key.patch || die
|
||||
# TODO(hsumita): Remove the patch when we upgrade mozc to 1.8 or 1.9.
|
||||
epatch "${FILESDIR}"/${P}-handle-extra-keysyms.patch || die
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
cd "mozc-${PV}" || die
|
||||
# Generate make files
|
||||
export GYP_DEFINES="chromeos=1 use_libzinnia=0"
|
||||
export BUILD_COMMAND="emake"
|
||||
|
||||
# Currently --channel_dev=0 is not neccessary for Hangul, but just in case.
|
||||
$(PYTHON) build_mozc.py gyp --gypdir="third_party/gyp" \
|
||||
--use_libprotobuf \
|
||||
--language=hangul \
|
||||
--noqt \
|
||||
--target_platform="ChromeOS" --channel_dev=0 || die
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
cd "mozc-${PV}" || die
|
||||
# Create build tools for the host platform.
|
||||
CFLAGS="" CXXFLAGS="" $(PYTHON) build_mozc.py build_tools -c ${BUILDTYPE} \
|
||||
|| die
|
||||
|
||||
# Build artifacts for the target platform.
|
||||
tc-export CXX CC AR AS RANLIB LD
|
||||
$(PYTHON) build_mozc.py build \
|
||||
languages/hangul/hangul.gyp:ibus_mozc_hangul -c ${BUILDTYPE} || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cd "mozc-${PV}" || die
|
||||
exeinto /usr/libexec || die
|
||||
newexe "out_linux/${BUILDTYPE}/ibus_mozc_hangul" ibus-engine-mozc-hangul \
|
||||
|| die
|
||||
|
||||
insinto /usr/share/ibus/component || die
|
||||
doins languages/hangul/unix/ibus/mozc-hangul.xml || die
|
||||
|
||||
mkdir -p "${D}"/usr/share/ibus-mozc-hangul || die
|
||||
cp "${WORKDIR}/mozc-${PV}"/data/hangul/korean_symbols.txt "${D}"/usr/share/ibus-mozc-hangul/ || die
|
||||
chmod o+r "${D}"/usr/share/ibus-mozc-hangul/korean_symbols.txt || die
|
||||
cp "out_linux/${BUILDTYPE}/ibus_mozc_hangul" "${T}" || die
|
||||
$(tc-getSTRIP) --strip-unneeded "${T}"/ibus_mozc_hangul || die
|
||||
|
||||
# Check the binary size to detect binary size bloat (which happend once due
|
||||
# typos in .gyp files). Current size of the stripped ibus-mozc-hangul binary
|
||||
# is about 900k (x86) and 700k (arm).
|
||||
FILESIZE=`stat -c %s "${T}"/ibus_mozc_hangul`
|
||||
einfo "The binary size is ${FILESIZE}"
|
||||
test ${FILESIZE} -lt 1500000 \
|
||||
|| die 'The binary size of mozc hangul is too big (more than ~1.5MB)'
|
||||
rm -f "${T}"/ibus_mozc_hangul
|
||||
}
|
@ -1 +0,0 @@
|
||||
DIST mozc-1.6.1187.102.tar.bz2 54828375 SHA256 2a9b54275400c768e14156e7654e9b9a4ca27353573627607c70d221c0e2db65 SHA512 0f182316e80baa8c3d268a266398bd2abad4db9ed54bba351b275681d17ef6fd5348d3b66fd95201028c38f29de293f124b9c4f45a5818f20faf17b1eea495ff WHIRLPOOL fb064dd78471d2060871f905cb1c81fd9c52cc15741493aad26df49db4259709860593b65586a6c44893a6454fd7f2d27815739e1525f1c8fd0cf9eb0efff92a
|
@ -1,13 +0,0 @@
|
||||
Clear key state on disable to handle Shift-up correctly.
|
||||
|
||||
diff -urN ../mozc.orig/unix/ibus/mozc_engine.cc ./unix/ibus/mozc_engine.cc
|
||||
--- ../mozc.orig/unix/ibus/mozc_engine.cc 2012-08-31 14:36:43.000000000 +0900
|
||||
+++ ./unix/ibus/mozc_engine.cc 2012-11-29 16:56:09.216754385 +0900
|
||||
@@ -285,6 +285,7 @@
|
||||
void MozcEngine::Disable(IBusEngine *engine) {
|
||||
RevertSession(engine);
|
||||
GetCandidateWindowHandler(engine)->Hide(engine);
|
||||
+ key_event_handler_->Clear();
|
||||
}
|
||||
|
||||
void MozcEngine::Enable(IBusEngine *engine) {
|
@ -1,17 +0,0 @@
|
||||
needs a little more space to handle pthread mutex_t with some ABIs
|
||||
|
||||
http://code.google.com/p/mozc/issues/detail?id=177
|
||||
|
||||
--- a/base/mutex.h
|
||||
+++ b/base/mutex.h
|
||||
@@ -52,8 +52,8 @@
|
||||
#define MOZC_RW_MUTEX_PTR_ARRAYSIZE 32
|
||||
#else
|
||||
// Currently following sizes seem to be enough to support all other platforms.
|
||||
-#define MOZC_MUTEX_PTR_ARRAYSIZE 6
|
||||
-#define MOZC_RW_MUTEX_PTR_ARRAYSIZE 10
|
||||
+#define MOZC_MUTEX_PTR_ARRAYSIZE 8
|
||||
+#define MOZC_RW_MUTEX_PTR_ARRAYSIZE 12
|
||||
#endif
|
||||
|
||||
class LOCKABLE Mutex {
|
@ -1,16 +0,0 @@
|
||||
Introduces typo to keep a compatibility with ibus-pinyin.
|
||||
|
||||
To fix this typo, we should implements codes to migrate a configuration.
|
||||
|
||||
diff -urN ../mozc_origin/languages/pinyin/unix/ibus/mozc_engine_property.cc ./languages/pinyin/unix/ibus/mozc_engine_property.cc
|
||||
--- ../mozc_origin/languages/pinyin/unix/ibus/mozc_engine_property.cc 2012-04-09 12:28:03.895173124 +0900
|
||||
+++ ./languages/pinyin/unix/ibus/mozc_engine_property.cc 2012-04-09 18:44:32.013454770 +0900
|
||||
@@ -73,7 +73,8 @@
|
||||
"mode.simp",
|
||||
"\xE7\xAE\x80", // "简"
|
||||
"hiragana.png",
|
||||
- "Simplified/Traditional Chinese",
|
||||
+ // TODO(hsumita): Fixes typo. s/Simplfied/Simplified/
|
||||
+ "Simplfied/Traditional Chinese",
|
||||
},
|
||||
};
|
@ -1,49 +0,0 @@
|
||||
Replaces a name from mozc-pinyin to pinyin for a compatibility.
|
||||
|
||||
ChromeOS is published on China, so it is not a good idea to replace "pinyin"
|
||||
tag with "mozc-pinyin" tag because ibus-pinyin user must reconfigure ChormeOS
|
||||
to use ibus-mozc-pinyin. To avoid this issue, we simply use "pinyin" tag on
|
||||
ChromeOS.
|
||||
|
||||
diff -urN ../mozc_origin/languages/pinyin/unix/ibus/main.h ./languages/pinyin/unix/ibus/main.h
|
||||
--- ../mozc_origin/languages/pinyin/unix/ibus/main.h 2012-04-09 12:28:03.895173124 +0900
|
||||
+++ ./languages/pinyin/unix/ibus/main.h 2012-04-09 15:36:18.533924555 +0900
|
||||
@@ -48,9 +48,11 @@
|
||||
"us",
|
||||
"us(dvorak)",
|
||||
};
|
||||
+// Using "pinyin*" instead of "mozc-pinyin*" for a compatibility with
|
||||
+// ibus-pinyin on ChromeOS.
|
||||
const char *kEngineNameArray[] = {
|
||||
- "mozc-pinyin",
|
||||
- "mozc-pinyin-dv",
|
||||
+ "pinyin",
|
||||
+ "pinyin-dv",
|
||||
};
|
||||
const char *kEngineLongnameArray[] = {
|
||||
"Mozc Pinyin",
|
||||
diff -urN ../mozc_origin/languages/pinyin/unix/ibus/mozc-pinyin.xml ./languages/pinyin/unix/ibus/mozc-pinyin.xml
|
||||
--- ../mozc_origin/languages/pinyin/unix/ibus/mozc-pinyin.xml 2012-04-09 12:28:03.895173124 +0900
|
||||
+++ ./languages/pinyin/unix/ibus/mozc-pinyin.xml 2012-04-09 15:36:45.563847591 +0900
|
||||
@@ -14,7 +14,9 @@
|
||||
<language>zh-CN</language>
|
||||
<icon>/usr/share/ibus-mozc-pinyin/product_icon.png</icon>
|
||||
<layout>us</layout>
|
||||
- <name>mozc-pinyin</name>
|
||||
+ <!-- Using "pinyin" instead of "mozc-pinyin" for a compatibility
|
||||
+ with ibus-pinyin on ChromeOS -->
|
||||
+ <name>pinyin</name>
|
||||
<longname>Mozc Pinyin</longname>
|
||||
</engine>
|
||||
<engine>
|
||||
@@ -23,7 +25,9 @@
|
||||
<language>zh-CN</language>
|
||||
<icon>/usr/share/ibus-mozc-pinyin/product_icon.png</icon>
|
||||
<layout>us(dvorak)</layout>
|
||||
- <name>mozc-pinyin-dv</name>
|
||||
+ <!-- Using "pinyin-dv" instead of "mozc-pinyin-dv" for a compatibility
|
||||
+ with ibus-pinyin on ChromeOS -->
|
||||
+ <name>pinyin-dv</name>
|
||||
<longname>Mozc Pinyin (for US Dvorak keyboard)</longname>
|
||||
</engine>
|
||||
</engines>
|
@ -1,75 +0,0 @@
|
||||
# Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="2"
|
||||
inherit eutils flag-o-matic python toolchain-funcs
|
||||
|
||||
DESCRIPTION="The Mozc Pinyin engine for IBus Framework"
|
||||
HOMEPAGE="http://code.google.com/p/mozc"
|
||||
SRC_URI="http://commondatastorage.googleapis.com/chromeos-localmirror/distfiles/mozc-${PV}.tar.bz2"
|
||||
LICENSE="BSD"
|
||||
RDEPEND=">=app-i18n/ibus-1.3.99
|
||||
>=dev-libs/glib-2.26
|
||||
dev-libs/protobuf
|
||||
>=dev-libs/pyzy-0.1.0"
|
||||
DEPEND="${RDEPEND}"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 x86 arm"
|
||||
BUILDTYPE="${BUILDTYPE:-Release}"
|
||||
|
||||
src_configure() {
|
||||
cd "mozc" || die
|
||||
# Generate make files
|
||||
export GYP_DEFINES="chromeos=1 use_libzinnia=0 use_libprotobuf=1"
|
||||
export BUILD_COMMAND="emake"
|
||||
|
||||
# Currently --channel_dev=0 is not necessary for Pinyin, but just in case.
|
||||
$(PYTHON) build_mozc.py gyp --gypdir="third_party/gyp" \
|
||||
--language=pinyin \
|
||||
--noqt \
|
||||
--target_platform="ChromeOS" --channel_dev=0 || die
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
cd "mozc" || die
|
||||
epatch "${FILESDIR}"/"${P}"-clear-key-state-on-disable.patch || die
|
||||
epatch "${FILESDIR}"/"${P}"-x32.patch
|
||||
# Following 2 patches are required by any version of ibus-mozc-pinyin on
|
||||
# ChromeOS
|
||||
epatch "${FILESDIR}"/ibus-mozc-pinyin-introduces-typo-for-compatibility.patch || die
|
||||
epatch "${FILESDIR}"/ibus-mozc-pinyin-replace-ibus-pinyin.patch || die
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
cd "mozc" || die
|
||||
# Create build tools for the host platform.
|
||||
CFLAGS="" CXXFLAGS="" $(PYTHON) build_mozc.py build_tools -c ${BUILDTYPE} \
|
||||
|| die
|
||||
|
||||
# Build artifacts for the target platform.
|
||||
tc-export CXX CC AR AS RANLIB LD
|
||||
$(PYTHON) build_mozc.py build \
|
||||
pinyin/pinyin.gyp:ibus_mozc_pinyin -c ${BUILDTYPE} || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cd "mozc" || die
|
||||
exeinto /usr/libexec || die
|
||||
newexe "out_linux/${BUILDTYPE}/ibus_mozc_pinyin" ibus-engine-mozc-pinyin \
|
||||
|| die
|
||||
|
||||
insinto /usr/share/ibus/component || die
|
||||
doins languages/pinyin/unix/ibus/mozc-pinyin.xml || die
|
||||
|
||||
mkdir -p "${D}"/usr/share/ibus-mozc-pinyin || die
|
||||
cp "out_linux/${BUILDTYPE}/ibus_mozc_pinyin" "${T}" || die
|
||||
$(tc-getSTRIP) --strip-unneeded "${T}"/ibus_mozc_pinyin || die
|
||||
|
||||
# Unnecessary link may cause size bloat. We expect to detect it by checking binary size.
|
||||
# NOTE: The binary size for amd64 is 1.1MB in Apr. 2012
|
||||
FILESIZE=`stat -c %s "${T}"/ibus_mozc_pinyin`
|
||||
einfo "The binary size is ${FILESIZE}"
|
||||
test ${FILESIZE} -lt 2000000 \
|
||||
|| die 'The binary size of ibus_mozc_pinyin is too big (more than ~2.0MB)'
|
||||
rm -f "${T}"/ibus_mozc_pinyin
|
||||
}
|
@ -1,2 +0,0 @@
|
||||
DIST GoogleJapaneseInputFilesForChromeOS-1.5.1090.102.tar.bz2 23756520 RMD160 4f73f336fa0a3ea9be1a54542d6b3cd4956fb3a4 SHA1 2e8e8d86a83010d49fe985f3dc82ce64ee947b0e SHA256 61346cdddc6000ad1c151626a810014566e8a1d1e6bf367df3ff8ede3a3f58c2
|
||||
DIST mozc-1.5.1090.102.tar.bz2 54911799 RMD160 5b9b704e68a87d7b4a63bb2ea5ab0561badf90b1 SHA1 9c99333a3a46c190fe14afae573b2ddc2faab64a SHA256 b52c1879c4749041032578ec6c591d9741f521d54993070c050d09ae35bd2107
|
@ -1,62 +0,0 @@
|
||||
diff -urN mozc-1.5.1090.102.orig/unix/ibus/ibus_candidate_window_handler.cc mozc-1.5.1090.102/unix/ibus/ibus_candidate_window_handler.cc
|
||||
--- mozc-1.5.1090.102.orig/unix/ibus/ibus_candidate_window_handler.cc 2012-11-19 16:25:45.757689538 +0900
|
||||
+++ mozc-1.5.1090.102/unix/ibus/ibus_candidate_window_handler.cc 2012-11-19 16:45:09.165140106 +0900
|
||||
@@ -142,9 +142,45 @@
|
||||
}
|
||||
#endif
|
||||
|
||||
+#if defined(OS_CHROMEOS)
|
||||
+ map<int32, pair<string, string> > usage_map;
|
||||
+ if (candidates.has_usages()) {
|
||||
+ const commands::InformationList& usages = candidates.usages();
|
||||
+ for (size_t i = 0; i < usages.information().size(); ++i) {
|
||||
+ const commands::Information& information = usages.information(i);
|
||||
+ if (!information.has_id() || !information.has_description())
|
||||
+ continue;
|
||||
+ usage_map[information.id()].first = information.title();
|
||||
+ usage_map[information.id()].second = information.description();
|
||||
+ }
|
||||
+ }
|
||||
+#endif // OS_CHROMEOS
|
||||
for (int i = 0; i < candidates.candidate_size(); ++i) {
|
||||
const commands::Candidates::Candidate &candidate = candidates.candidate(i);
|
||||
IBusText *text = ibus_text_new_from_string(candidate.value().c_str());
|
||||
+#if defined(OS_CHROMEOS) && IBUS_CHECK_VERSION(1, 4, 2)
|
||||
+ if (candidate.has_annotation() &&
|
||||
+ candidate.annotation().has_description()) {
|
||||
+ ibus_serializable_set_attachment(
|
||||
+ IBUS_SERIALIZABLE(text),
|
||||
+ "annotation",
|
||||
+ g_variant_new_string(candidate.annotation().description().c_str()));
|
||||
+ }
|
||||
+ if (candidate.has_information_id()) {
|
||||
+ map<int32, pair<string, string> >::iterator it =
|
||||
+ usage_map.find(candidate.information_id());
|
||||
+ if (it != usage_map.end()) {
|
||||
+ ibus_serializable_set_attachment(
|
||||
+ IBUS_SERIALIZABLE(text),
|
||||
+ "description_title",
|
||||
+ g_variant_new_string(it->second.first.c_str()));
|
||||
+ ibus_serializable_set_attachment(
|
||||
+ IBUS_SERIALIZABLE(text),
|
||||
+ "description_body",
|
||||
+ g_variant_new_string(it->second.second.c_str()));
|
||||
+ }
|
||||
+ }
|
||||
+#endif // OS_CHROMEOS && IBUS_CHECK_VERSION(1, 4, 2)
|
||||
ibus_lookup_table_append_candidate(table, text);
|
||||
// |text| is released by ibus_engine_update_lookup_table along with |table|.
|
||||
|
||||
@@ -164,6 +200,12 @@
|
||||
}
|
||||
|
||||
#if defined(OS_CHROMEOS) and IBUS_CHECK_VERSION(1, 3, 99)
|
||||
+ if (candidates.has_category()) {
|
||||
+ ibus_serializable_set_attachment(
|
||||
+ IBUS_SERIALIZABLE(table),
|
||||
+ "show_window_at_composition",
|
||||
+ g_variant_new_boolean(candidates.category() == commands::SUGGESTION));
|
||||
+ }
|
||||
// The function ibus_serializable_set_attachment() had been changed
|
||||
// to use GVariant in ibus-1.3.99.
|
||||
// https://github.com/ibus/ibus/commit/ac9dfac13cef34288440a2ecdf067cd827fb2f8f
|
@ -1,139 +0,0 @@
|
||||
diff -urN mozc-1.5.1090.102.orig/unix/ibus/ibus_extra_keysyms.h mozc-1.5.1090.102/unix/ibus/ibus_extra_keysyms.h
|
||||
--- mozc-1.5.1090.102.orig/unix/ibus/ibus_extra_keysyms.h 1970-01-01 09:00:00.000000000 +0900
|
||||
+++ mozc-1.5.1090.102/unix/ibus/ibus_extra_keysyms.h 2012-12-11 16:32:15.607074442 +0900
|
||||
@@ -0,0 +1,52 @@
|
||||
+// Copyright 2010-2012, Google Inc.
|
||||
+// All rights reserved.
|
||||
+//
|
||||
+// Redistribution and use in source and binary forms, with or without
|
||||
+// modification, are permitted provided that the following conditions are
|
||||
+// met:
|
||||
+//
|
||||
+// * Redistributions of source code must retain the above copyright
|
||||
+// notice, this list of conditions and the following disclaimer.
|
||||
+// * Redistributions in binary form must reproduce the above
|
||||
+// copyright notice, this list of conditions and the following disclaimer
|
||||
+// in the documentation and/or other materials provided with the
|
||||
+// distribution.
|
||||
+// * Neither the name of Google Inc. nor the names of its
|
||||
+// contributors may be used to endorse or promote products derived from
|
||||
+// this software without specific prior written permission.
|
||||
+//
|
||||
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
+
|
||||
+#ifndef MOZC_UNIX_IBUS_IBUS_EXTRA_KEYSYMS_H_
|
||||
+#define MOZC_UNIX_IBUS_IBUS_EXTRA_KEYSYMS_H_
|
||||
+
|
||||
+// for guint
|
||||
+#include "unix/ibus/ibus_header.h"
|
||||
+
|
||||
+#ifdef OS_CHROMEOS
|
||||
+// Defines key symbols which are not defined on ibuskeysyms.h to handle
|
||||
+// some keys on ChromeOS.
|
||||
+const guint IBUS_Back = 0x1008FF26;
|
||||
+const guint IBUS_Forward = 0x1008FF27;
|
||||
+const guint IBUS_Reload = 0x1008FF73;
|
||||
+const guint IBUS_LaunchB = 0x1008FF4B;
|
||||
+const guint IBUS_LaunchA = 0x1008FF4A;
|
||||
+const guint IBUS_MonBrightnessDown = 0x1008FF03;
|
||||
+const guint IBUS_MonBrightnessUp = 0x1008FF02;
|
||||
+const guint IBUS_AudioMute = 0x1008FF12;
|
||||
+const guint IBUS_AudioLowerVolume = 0x1008FF11;
|
||||
+const guint IBUS_AudioRaiseVolume = 0x1008FF13;
|
||||
+#endif // OS_CHROMEOS
|
||||
+
|
||||
+#endif // MOZC_UNIX_IBUS_IBUS_EXTRA_KEYSYMS_H_
|
||||
+
|
||||
diff -urN mozc-1.5.1090.102.orig/unix/ibus/key_translator.cc mozc-1.5.1090.102/unix/ibus/key_translator.cc
|
||||
--- mozc-1.5.1090.102.orig/unix/ibus/key_translator.cc 2012-12-11 15:59:00.409418570 +0900
|
||||
+++ mozc-1.5.1090.102/unix/ibus/key_translator.cc 2012-12-11 16:21:17.497854201 +0900
|
||||
@@ -32,6 +32,7 @@
|
||||
#include <ibus.h>
|
||||
|
||||
#include "base/logging.h"
|
||||
+#include "unix/ibus/ibus_extra_keysyms.h"
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -88,6 +89,19 @@
|
||||
{IBUS_Page_Up, mozc::commands::KeyEvent::PAGE_UP},
|
||||
{IBUS_Page_Down, mozc::commands::KeyEvent::PAGE_DOWN},
|
||||
|
||||
+#ifdef OS_CHROMEOS
|
||||
+ {IBUS_Back, mozc::commands::KeyEvent::F1},
|
||||
+ {IBUS_Forward, mozc::commands::KeyEvent::F2},
|
||||
+ {IBUS_Reload, mozc::commands::KeyEvent::F3},
|
||||
+ {IBUS_LaunchB, mozc::commands::KeyEvent::F4},
|
||||
+ {IBUS_LaunchA, mozc::commands::KeyEvent::F5},
|
||||
+ {IBUS_MonBrightnessDown, mozc::commands::KeyEvent::F6},
|
||||
+ {IBUS_MonBrightnessUp, mozc::commands::KeyEvent::F7},
|
||||
+ {IBUS_AudioMute, mozc::commands::KeyEvent::F8},
|
||||
+ {IBUS_AudioLowerVolume, mozc::commands::KeyEvent::F9},
|
||||
+ {IBUS_AudioRaiseVolume, mozc::commands::KeyEvent::F10},
|
||||
+#endif // OS_CHROMEOS
|
||||
+
|
||||
// Keypad (10-key).
|
||||
{IBUS_KP_0, mozc::commands::KeyEvent::NUMPAD0},
|
||||
{IBUS_KP_1, mozc::commands::KeyEvent::NUMPAD1},
|
||||
diff -urN mozc-1.5.1090.102.orig/unix/ibus/key_translator_test.cc mozc-1.5.1090.102/unix/ibus/key_translator_test.cc
|
||||
--- mozc-1.5.1090.102.orig/unix/ibus/key_translator_test.cc 2012-12-11 15:59:00.409418570 +0900
|
||||
+++ mozc-1.5.1090.102/unix/ibus/key_translator_test.cc 2012-12-11 16:06:14.708927885 +0900
|
||||
@@ -33,6 +33,7 @@
|
||||
#include "testing/base/public/gunit.h"
|
||||
#include "session/commands.pb.h"
|
||||
#include "unix/ibus/key_translator.h"
|
||||
+#include "unix/ibus/ibus_extra_keysyms.h"
|
||||
|
||||
namespace mozc {
|
||||
namespace ibus {
|
||||
@@ -116,6 +117,20 @@
|
||||
IBUS_Caps_Lock,
|
||||
IBUS_ISO_Left_Tab,
|
||||
IBUS_Hangul_Hanja,
|
||||
+
|
||||
+
|
||||
+#ifdef OS_CHROMEOS
|
||||
+ IBUS_Back,
|
||||
+ IBUS_Forward,
|
||||
+ IBUS_Reload,
|
||||
+ IBUS_LaunchB,
|
||||
+ IBUS_LaunchA,
|
||||
+ IBUS_MonBrightnessDown,
|
||||
+ IBUS_MonBrightnessUp,
|
||||
+ IBUS_AudioMute,
|
||||
+ IBUS_AudioLowerVolume,
|
||||
+ IBUS_AudioRaiseVolume,
|
||||
+#endif // OS_CHROMEOS
|
||||
};
|
||||
|
||||
const commands::KeyEvent::SpecialKey mapped_special_keys[] = {
|
||||
@@ -197,6 +212,19 @@
|
||||
commands::KeyEvent::CAPS_LOCK,
|
||||
commands::KeyEvent::TAB,
|
||||
commands::KeyEvent::HANJA,
|
||||
+
|
||||
+#ifdef OS_CHROMEOS
|
||||
+ commands::KeyEvent::F1,
|
||||
+ commands::KeyEvent::F2,
|
||||
+ commands::KeyEvent::F3,
|
||||
+ commands::KeyEvent::F4,
|
||||
+ commands::KeyEvent::F5,
|
||||
+ commands::KeyEvent::F6,
|
||||
+ commands::KeyEvent::F7,
|
||||
+ commands::KeyEvent::F8,
|
||||
+ commands::KeyEvent::F9,
|
||||
+ commands::KeyEvent::F10,
|
||||
+#endif // OS_CHROMEOS
|
||||
};
|
||||
|
||||
const guint modifier_masks[] = {
|
@ -1,97 +0,0 @@
|
||||
# Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="2"
|
||||
inherit eutils flag-o-matic python toolchain-funcs
|
||||
|
||||
DESCRIPTION="The Mozc engine for IBus Framework"
|
||||
HOMEPAGE="http://code.google.com/p/mozc"
|
||||
SRC_URI="http://commondatastorage.googleapis.com/chromeos-localmirror/distfiles/mozc-${PV}.tar.bz2
|
||||
internal? ( gs://chromeos-localmirror-private/distfiles/GoogleJapaneseInputFilesForChromeOS-${PV}.tar.bz2 )"
|
||||
LICENSE="BSD"
|
||||
IUSE="internal"
|
||||
# TODO(nona): Remove libcurl dependency.
|
||||
RDEPEND=">=app-i18n/ibus-1.4.1
|
||||
dev-libs/openssl
|
||||
dev-libs/protobuf
|
||||
internal? (
|
||||
net-misc/curl
|
||||
)"
|
||||
DEPEND="${RDEPEND}"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 x86 arm"
|
||||
BUILDTYPE="${BUILDTYPE:-Release}"
|
||||
RESTRICT="mirror"
|
||||
|
||||
src_configure() {
|
||||
if use internal; then
|
||||
BRANDING="${BRANDING:-GoogleJapaneseInput}"
|
||||
SIZE_LIMIT=20000000
|
||||
else
|
||||
BRANDING="${BRANDING:-Mozc}"
|
||||
SIZE_LIMIT=25000000
|
||||
fi
|
||||
|
||||
cd "mozc-${PV}" || die
|
||||
# Generate make files
|
||||
export GYP_DEFINES="chromeos=1 use_libzinnia=0"
|
||||
export BUILD_COMMAND="emake"
|
||||
|
||||
$(PYTHON) build_mozc.py gyp --gypdir="third_party/gyp" \
|
||||
--target_platform="ChromeOS" \
|
||||
--use_libprotobuf \
|
||||
--branding="${BRANDING}" || die
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
if use internal; then
|
||||
einfo "Building Google Japanese Input for ChromeOS"
|
||||
rm -fr "mozc-${PV}/data/dictionary" || die
|
||||
rm -fr "mozc-${PV}/dictionary" || die
|
||||
rm -f "mozc-${PV}/mozc_version_template.txt" || die
|
||||
mv "data/dictionary" "mozc-${PV}/data/" || die
|
||||
mv "dictionary" "mozc-${PV}/" || die
|
||||
mv "mozc_version_template.txt" "mozc-${PV}/" || die
|
||||
# Reduce a binary size.
|
||||
# TODO(hsumita): Remove this patch when it becomes a default behavior of
|
||||
# Mozc for ChromeOS.
|
||||
rm -f "mozc-${PV}/converter/converter_base.gyp" || die
|
||||
mv "converter/converter_base.gyp" "mozc-${PV}/converter/" || die
|
||||
else
|
||||
einfo "Building Mozc for ChromiumOS"
|
||||
fi
|
||||
|
||||
# Remove the patch when new mozc is released.
|
||||
epatch "${FILESDIR}"/${P}-attachment-cleanup.patch || die
|
||||
epatch "${FILESDIR}"/${P}-handle-extra-keysyms.patch || die
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
cd "mozc-${PV}" || die
|
||||
# Create build tools for the host platform.
|
||||
CFLAGS="" CXXFLAGS="" $(PYTHON) build_mozc.py build_tools -c ${BUILDTYPE} \
|
||||
|| die
|
||||
|
||||
# Build artifacts for the target platform.
|
||||
tc-export CXX CC AR AS RANLIB LD
|
||||
$(PYTHON) build_mozc.py build unix/ibus/ibus.gyp:ibus_mozc -c ${BUILDTYPE} \
|
||||
|| die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cd "mozc-${PV}" || die
|
||||
exeinto /usr/libexec || die
|
||||
newexe "out_linux/${BUILDTYPE}/ibus_mozc" ibus-engine-mozc || die
|
||||
|
||||
insinto /usr/share/ibus/component || die
|
||||
doins out_linux/${BUILDTYPE}/obj/gen/unix/ibus/mozc.xml || die
|
||||
|
||||
cp "out_linux/${BUILDTYPE}/ibus_mozc" "${T}" || die
|
||||
$(tc-getSTRIP) --strip-unneeded "${T}"/ibus_mozc || die
|
||||
|
||||
# Check the binary size to detect binary size bloat (which happend once due
|
||||
# typos in .gyp files).
|
||||
test `stat -c %s "${T}"/ibus_mozc` -lt ${SIZE_LIMIT} \
|
||||
|| die "The binary size of mozc for Japanese is too big (more than ~${SIZE_LIMIT})"
|
||||
rm -f "${T}"/ibus_mozc
|
||||
}
|
@ -1 +0,0 @@
|
||||
DIST ibus-zinnia-0.0.3.tar.gz 12810 SHA256 de83b5de5e24620169f38f20f0313f07abed1f2eaac3f5862b1ee07895607daf SHA512 9e0c1333cbe370dea7619a271dee8b36f7482931413081e41e2ad5ce85b2aec962a7c1fd3861eca21c2addca44e9fd3b8ed7f25bbe5722fffa6726104a5d1225 WHIRLPOOL 5ef1c2dfe04254a5363a32adb6289d577f9a1fa639a8fbc4e9d5ea7d7ff4f911ca57202da6e116c73e1317e644cc666443cbc83871ef97369faf7175e9b17c14
|
@ -1,42 +0,0 @@
|
||||
# Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="2"
|
||||
inherit eutils flag-o-matic
|
||||
|
||||
DESCRIPTION="Zinnia hand-writing engine"
|
||||
HOMEPAGE="http://github.com/yusukes/ibus-zinnia"
|
||||
SRC_URI="http://commondatastorage.googleapis.com/chromeos-localmirror/distfiles/${P}.tar.gz"
|
||||
#RESTRICT="mirror"
|
||||
|
||||
LICENSE="Apache-2.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 arm x86"
|
||||
|
||||
RDEPEND=">=app-i18n/ibus-1.3.99
|
||||
app-i18n/zinnia
|
||||
app-i18n/tegaki-zinnia-japanese-light
|
||||
app-i18n/tegaki-zinnia-simplified-chinese-light
|
||||
app-i18n/tegaki-zinnia-traditional-chinese-light"
|
||||
DEPEND="${RDEPEND}
|
||||
dev-util/pkgconfig
|
||||
>=sys-devel/gettext-0.16.1"
|
||||
|
||||
# Tarballs in github.com use a special directory naming rule:
|
||||
# "<github_user_name>-<project_name>-<last_commit_in_the_tarball>"
|
||||
SRC_DIR="yusukes-ibus-zinnia-910d66d"
|
||||
|
||||
src_configure() {
|
||||
cd "${SRC_DIR}" || die
|
||||
|
||||
append-cflags -Wall -Werror
|
||||
NOCONFIGURE=1 ./autogen.sh || die
|
||||
econf || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cd "${SRC_DIR}" || die
|
||||
|
||||
emake DESTDIR="${D}" install || die
|
||||
dodoc AUTHORS ChangeLog NEWS README
|
||||
}
|
@ -1 +0,0 @@
|
||||
DIST ibus-1.4.99.20120314.tar.gz 1652281 SHA256 4fe24028d8f813e27e5bb69a4f8ee64b326d39c0ad094e847bf725823eb3c6af SHA512 cb9a58478f792aed5d735124ebfb0b494b7654714b9f45e755b51bd14ae55cf9cdca4fd81b53d55070a561a824a189920c7e6aa75cbe5b74d3164b1146b67570 WHIRLPOOL 86f8322455bb4ff9560452bb664629135478583389bc131411789efa030750d3d90bf84173725482e5f59e5b2961133376aa411bf20cd9359b6ff0885d6bb967
|
@ -1,326 +0,0 @@
|
||||
diff -ur ibus-1.4.99.20120314.orig/conf/memconf/config.c ibus-1.4.99.20120314/conf/memconf/config.c
|
||||
--- ibus-1.4.99.20120314.orig/conf/memconf/config.c 2012-02-27 06:37:21.000000000 +0900
|
||||
+++ ibus-1.4.99.20120314/conf/memconf/config.c 2012-04-02 15:05:20.300663070 +0900
|
||||
@@ -29,6 +29,8 @@
|
||||
struct _IBusConfigMemconf {
|
||||
IBusConfigService parent;
|
||||
GHashTable *values;
|
||||
+ GHashTable *unread;
|
||||
+ GHashTable *unwritten;
|
||||
};
|
||||
|
||||
struct _IBusConfigMemconfClass {
|
||||
@@ -55,6 +57,10 @@
|
||||
const gchar *section,
|
||||
const gchar *name,
|
||||
GError **error);
|
||||
+static gboolean ibus_config_memconf_get_unused (IBusConfigService *config,
|
||||
+ GVariant **unread,
|
||||
+ GVariant **unwritten,
|
||||
+ GError **error);
|
||||
|
||||
G_DEFINE_TYPE (IBusConfigMemconf, ibus_config_memconf, IBUS_TYPE_CONFIG_SERVICE)
|
||||
|
||||
@@ -68,6 +74,7 @@
|
||||
IBUS_CONFIG_SERVICE_CLASS (object_class)->get_value = ibus_config_memconf_get_value;
|
||||
IBUS_CONFIG_SERVICE_CLASS (object_class)->get_values = ibus_config_memconf_get_values;
|
||||
IBUS_CONFIG_SERVICE_CLASS (object_class)->unset_value = ibus_config_memconf_unset_value;
|
||||
+ IBUS_CONFIG_SERVICE_CLASS (object_class)->get_unused = ibus_config_memconf_get_unused;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -75,14 +82,25 @@
|
||||
{
|
||||
config->values = g_hash_table_new_full (g_str_hash,
|
||||
g_str_equal,
|
||||
- (GDestroyNotify)g_free,
|
||||
- (GDestroyNotify)g_variant_unref);
|
||||
+ (GDestroyNotify) g_free,
|
||||
+ (GDestroyNotify) g_variant_unref);
|
||||
+ config->unread = g_hash_table_new_full (g_str_hash,
|
||||
+ g_str_equal,
|
||||
+ (GDestroyNotify) g_free,
|
||||
+ (GDestroyNotify) NULL);
|
||||
+ config->unwritten
|
||||
+ = g_hash_table_new_full (g_str_hash,
|
||||
+ g_str_equal,
|
||||
+ (GDestroyNotify) g_free,
|
||||
+ (GDestroyNotify) NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
ibus_config_memconf_destroy (IBusConfigMemconf *config)
|
||||
{
|
||||
g_hash_table_destroy (config->values);
|
||||
+ g_hash_table_destroy (config->unread);
|
||||
+ g_hash_table_destroy (config->unwritten);
|
||||
IBUS_OBJECT_CLASS (ibus_config_memconf_parent_class)->destroy ((IBusObject *)config);
|
||||
}
|
||||
|
||||
@@ -101,6 +119,12 @@
|
||||
|
||||
gchar *key = g_strdup_printf ("%s:%s", section, name);
|
||||
|
||||
+ if (g_hash_table_lookup (
|
||||
+ IBUS_CONFIG_MEMCONF (config)->values, key) == NULL) {
|
||||
+ g_hash_table_insert (IBUS_CONFIG_MEMCONF (config)->unread,
|
||||
+ g_strdup (key), NULL);
|
||||
+ }
|
||||
+
|
||||
g_hash_table_insert (IBUS_CONFIG_MEMCONF (config)->values,
|
||||
key, g_variant_ref_sink (value));
|
||||
|
||||
@@ -121,16 +145,21 @@
|
||||
g_assert (error == NULL || *error == NULL);
|
||||
|
||||
gchar *key = g_strdup_printf ("%s:%s", section, name);
|
||||
+
|
||||
GVariant *value = (GVariant *)g_hash_table_lookup (IBUS_CONFIG_MEMCONF (config)->values, key);
|
||||
- g_free (key);
|
||||
|
||||
- if (value != NULL) {
|
||||
+ if (value == NULL) {
|
||||
+ g_hash_table_insert (IBUS_CONFIG_MEMCONF (config)->unwritten,
|
||||
+ g_strdup (key), NULL);
|
||||
+ if (error != NULL) {
|
||||
+ *error = g_error_new (G_DBUS_ERROR, G_DBUS_ERROR_FAILED,
|
||||
+ "Config value [%s:%s] does not exist.", section, name);
|
||||
+ }
|
||||
+ } else {
|
||||
+ g_hash_table_remove (IBUS_CONFIG_MEMCONF (config)->unread, key);
|
||||
g_variant_ref (value);
|
||||
}
|
||||
- else if (error != NULL) {
|
||||
- *error = g_error_new (G_DBUS_ERROR, G_DBUS_ERROR_FAILED,
|
||||
- "Config value [%s:%s] does not exist.", section, name);
|
||||
- }
|
||||
+ g_free (key);
|
||||
return value;
|
||||
}
|
||||
|
||||
@@ -173,13 +202,13 @@
|
||||
|
||||
gchar *key = g_strdup_printf ("%s:%s", section, name);
|
||||
gboolean retval = g_hash_table_remove (IBUS_CONFIG_MEMCONF (config)->values, key);
|
||||
- g_free (key);
|
||||
|
||||
if (retval) {
|
||||
ibus_config_service_value_changed (config,
|
||||
section,
|
||||
name,
|
||||
g_variant_new_tuple (NULL, 0));
|
||||
+ g_hash_table_remove (IBUS_CONFIG_MEMCONF (config)->unread, key);
|
||||
}
|
||||
else {
|
||||
if (error && *error) {
|
||||
@@ -187,9 +216,39 @@
|
||||
"Config value [%s:%s] does not exist.", section, name);
|
||||
}
|
||||
}
|
||||
+ g_free (key);
|
||||
return retval;
|
||||
}
|
||||
|
||||
+static gboolean
|
||||
+ibus_config_memconf_get_unused (IBusConfigService *config,
|
||||
+ GVariant **unread,
|
||||
+ GVariant **unwritten,
|
||||
+ GError **error)
|
||||
+{
|
||||
+ GVariantBuilder builder;
|
||||
+ GList *keys, *p;
|
||||
+
|
||||
+ g_variant_builder_init (&builder, G_VARIANT_TYPE ("as"));
|
||||
+ keys = g_hash_table_get_keys (IBUS_CONFIG_MEMCONF (config)->unread);
|
||||
+ for (p = keys; p != NULL; p = p->next) {
|
||||
+ g_variant_builder_add (&builder, "s", (const gchar *)p->data);
|
||||
+ }
|
||||
+ g_list_free (keys);
|
||||
+ *unread = g_variant_builder_end (&builder);
|
||||
+
|
||||
+ g_variant_builder_init (&builder, G_VARIANT_TYPE ("as"));
|
||||
+ keys = g_hash_table_get_keys (IBUS_CONFIG_MEMCONF (config)->unwritten);
|
||||
+ for (p = keys; p != NULL; p = p->next) {
|
||||
+ g_variant_builder_add (&builder, "s", (const gchar *)p->data);
|
||||
+ }
|
||||
+ g_list_free (keys);
|
||||
+
|
||||
+ *unwritten = g_variant_builder_end (&builder);
|
||||
+
|
||||
+ return TRUE;
|
||||
+}
|
||||
+
|
||||
IBusConfigMemconf *
|
||||
ibus_config_memconf_new (GDBusConnection *connection)
|
||||
{
|
||||
diff -ur ibus-1.4.99.20120314.orig/src/ibusconfig.c ibus-1.4.99.20120314/src/ibusconfig.c
|
||||
--- ibus-1.4.99.20120314.orig/src/ibusconfig.c 2012-03-07 14:39:58.000000000 +0900
|
||||
+++ ibus-1.4.99.20120314/src/ibusconfig.c 2012-04-02 15:03:18.361126672 +0900
|
||||
@@ -720,3 +720,37 @@
|
||||
async_initable_iface->init_async = async_initable_init_async;
|
||||
async_initable_iface->init_finish = async_initable_init_finish;
|
||||
}
|
||||
+
|
||||
+gboolean
|
||||
+ibus_config_get_unused (IBusConfig *config,
|
||||
+ GVariant **unread,
|
||||
+ GVariant **unwritten)
|
||||
+{
|
||||
+ g_assert (IBUS_IS_CONFIG (config));
|
||||
+ g_assert (unread != NULL && *unread == NULL);
|
||||
+ g_assert (unwritten != NULL && *unwritten == NULL);
|
||||
+
|
||||
+ GError *error = NULL;
|
||||
+ GVariant *result;
|
||||
+
|
||||
+ result = g_dbus_proxy_call_sync ((GDBusProxy *) config,
|
||||
+ "GetUnused", /* method_name */
|
||||
+ NULL, /* parameters */
|
||||
+ G_DBUS_CALL_FLAGS_NONE, /* flags */
|
||||
+ -1, /* timeout */
|
||||
+ NULL, /* cancellable */
|
||||
+ &error /* error */
|
||||
+ );
|
||||
+ if (result == NULL) {
|
||||
+ g_warning ("%s.GetUnused: %s", IBUS_INTERFACE_CONFIG, error->message);
|
||||
+ g_error_free (error);
|
||||
+ return FALSE;
|
||||
+ }
|
||||
+
|
||||
+ *unread = g_variant_get_child_value (result, 0);
|
||||
+ *unwritten = g_variant_get_child_value (result, 1);
|
||||
+
|
||||
+ g_variant_unref (result);
|
||||
+
|
||||
+ return TRUE;
|
||||
+}
|
||||
Only in ibus-1.4.99.20120314/src: ibusconfig.c.orig
|
||||
diff -ur ibus-1.4.99.20120314.orig/src/ibusconfig.h ibus-1.4.99.20120314/src/ibusconfig.h
|
||||
--- ibus-1.4.99.20120314.orig/src/ibusconfig.h 2012-03-07 14:39:58.000000000 +0900
|
||||
+++ ibus-1.4.99.20120314/src/ibusconfig.h 2012-04-02 15:03:18.361126672 +0900
|
||||
@@ -347,6 +347,19 @@
|
||||
|
||||
/* FIXME add an asynchronous version of unwatch */
|
||||
|
||||
+/**
|
||||
+ * ibus_config_get_unused:
|
||||
+ * @config: An IBusConfig
|
||||
+ * @unread: GVariant that holds a list of values that have been written but not
|
||||
+ * read.
|
||||
+ * @unwritten: GVariant that holds a list of values that have been read but not
|
||||
+ * written.
|
||||
+ * @returns: TRUE if succeed; FALSE otherwise.
|
||||
+ *
|
||||
+ * Get the list of values that haven't been used properly.
|
||||
+ */
|
||||
+gboolean ibus_config_get_unused (IBusConfig *config,
|
||||
+ GVariant **unread,
|
||||
+ GVariant **unwritten);
|
||||
G_END_DECLS
|
||||
#endif
|
||||
-
|
||||
Only in ibus-1.4.99.20120314/src: ibusconfig.h.orig
|
||||
diff -ur ibus-1.4.99.20120314.orig/src/ibusconfigservice.c ibus-1.4.99.20120314/src/ibusconfigservice.c
|
||||
--- ibus-1.4.99.20120314.orig/src/ibusconfigservice.c 2012-03-07 14:41:10.000000000 +0900
|
||||
+++ ibus-1.4.99.20120314/src/ibusconfigservice.c 2012-04-02 15:03:18.361126672 +0900
|
||||
@@ -76,6 +76,10 @@
|
||||
const gchar *section,
|
||||
const gchar *name,
|
||||
GError **error);
|
||||
+static gboolean ibus_config_service_get_unused (IBusConfigService *config,
|
||||
+ GVariant **unread,
|
||||
+ GVariant **unwritten,
|
||||
+ GError **error);
|
||||
|
||||
G_DEFINE_TYPE (IBusConfigService, ibus_config_service, IBUS_TYPE_SERVICE)
|
||||
|
||||
@@ -105,6 +109,10 @@
|
||||
" <arg type='s' name='name' />"
|
||||
" <arg type='v' name='value' />"
|
||||
" </signal>"
|
||||
+ " <method name='GetUnused'>"
|
||||
+ " <arg direction='out' type='as' name='unread' />"
|
||||
+ " <arg direction='out' type='as' name='unwritten' />"
|
||||
+ " </method>"
|
||||
" </interface>"
|
||||
"</node>";
|
||||
|
||||
@@ -125,6 +133,7 @@
|
||||
class->get_value = ibus_config_service_get_value;
|
||||
class->get_values = ibus_config_service_get_values;
|
||||
class->unset_value = ibus_config_service_unset_value;
|
||||
+ class->get_unused = ibus_config_service_get_unused;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -242,6 +251,25 @@
|
||||
return;
|
||||
}
|
||||
|
||||
+ if (g_strcmp0 (method_name, "GetUnused") == 0) {
|
||||
+ GVariant *unread = NULL;
|
||||
+ GVariant *unwritten = NULL;
|
||||
+ gboolean retval;
|
||||
+ GError *error = NULL;
|
||||
+
|
||||
+ retval = IBUS_CONFIG_SERVICE_GET_CLASS (config)->get_unused (
|
||||
+ config, &unread, &unwritten, &error);
|
||||
+ if (retval) {
|
||||
+ g_dbus_method_invocation_return_value (invocation,
|
||||
+ g_variant_new ("(@as@as)", unread, unwritten));
|
||||
+ }
|
||||
+ else {
|
||||
+ g_dbus_method_invocation_return_gerror (invocation, error);
|
||||
+ g_error_free (error);
|
||||
+ }
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
/* should not be reached */
|
||||
g_return_if_reached ();
|
||||
}
|
||||
@@ -352,6 +380,19 @@
|
||||
return IBUS_CONFIG_SERVICE (object);
|
||||
}
|
||||
|
||||
+static gboolean
|
||||
+ibus_config_service_get_unused (IBusConfigService *config,
|
||||
+ GVariant **unread,
|
||||
+ GVariant **unwritten,
|
||||
+ GError **error)
|
||||
+{
|
||||
+ if (error) {
|
||||
+ *error = g_error_new (G_DBUS_ERROR, G_DBUS_ERROR_FAILED,
|
||||
+ "Not implemented");
|
||||
+ }
|
||||
+ return FALSE;
|
||||
+}
|
||||
+
|
||||
void
|
||||
ibus_config_service_value_changed (IBusConfigService *config,
|
||||
const gchar *section,
|
||||
Only in ibus-1.4.99.20120314/src: ibusconfigservice.c.orig
|
||||
diff -ur ibus-1.4.99.20120314.orig/src/ibusconfigservice.h ibus-1.4.99.20120314/src/ibusconfigservice.h
|
||||
--- ibus-1.4.99.20120314.orig/src/ibusconfigservice.h 2011-08-11 09:49:43.000000000 +0900
|
||||
+++ ibus-1.4.99.20120314/src/ibusconfigservice.h 2012-04-02 15:03:18.361126672 +0900
|
||||
@@ -203,10 +203,14 @@
|
||||
GVariant * (* get_values) (IBusConfigService *config,
|
||||
const gchar *section,
|
||||
GError **error);
|
||||
+ gboolean (* get_unused) (IBusConfigService *config,
|
||||
+ GVariant **unread,
|
||||
+ GVariant **unwritten,
|
||||
+ GError **error);
|
||||
|
||||
/*< private >*/
|
||||
/* padding */
|
||||
- gpointer pdummy[12];
|
||||
+ gpointer pdummy[11];
|
||||
};
|
||||
|
||||
GType ibus_config_service_get_type (void);
|
||||
@@ -238,4 +242,3 @@
|
||||
|
||||
G_END_DECLS
|
||||
#endif
|
||||
-
|
@ -1,14 +0,0 @@
|
||||
diff -ur ibus-1.4.99.20120314.orig/bus/inputcontext.c ibus-1.4.99.20120314/bus/inputcontext.c
|
||||
--- ibus-1.4.99.20120314.orig/bus/inputcontext.c 2012-02-27 06:37:21.000000000 +0900
|
||||
+++ ibus-1.4.99.20120314/bus/inputcontext.c 2012-04-02 15:24:41.936207367 +0900
|
||||
@@ -1130,7 +1130,9 @@
|
||||
bus_input_context_clear_preedit_text (context);
|
||||
bus_input_context_update_auxiliary_text (context, text_empty, FALSE);
|
||||
bus_input_context_update_lookup_table (context, lookup_table_empty, FALSE);
|
||||
- bus_input_context_register_properties (context, props_empty);
|
||||
+
|
||||
+ // Workaround for http://crosbug.com/7702
|
||||
+ // bus_input_context_register_properties (context, props_empty);
|
||||
|
||||
if (context->engine) {
|
||||
bus_engine_proxy_focus_out (context->engine);
|
@ -1,12 +0,0 @@
|
||||
diff -ur ibus-1.4.99.20120314.orig/bus/Makefile.am ibus-1.4.99.20120314/bus/Makefile.am
|
||||
--- ibus-1.4.99.20120314.orig/bus/Makefile.am 2012-03-07 14:39:58.000000000 +0900
|
||||
+++ ibus-1.4.99.20120314/bus/Makefile.am 2012-04-02 15:37:33.273439550 +0900
|
||||
@@ -112,8 +112,6 @@
|
||||
if ENABLE_TESTS
|
||||
TESTS = \
|
||||
test-matchrule \
|
||||
- test-registry \
|
||||
- test-stress \
|
||||
$(NULL)
|
||||
endif
|
||||
|
@ -1,13 +0,0 @@
|
||||
diff -ur ibus-1.4.99.20120314.orig/bus/panelproxy.c ibus-1.4.99.20120314/bus/panelproxy.c
|
||||
--- ibus-1.4.99.20120314.orig/bus/panelproxy.c 2012-02-27 06:37:21.000000000 +0900
|
||||
+++ ibus-1.4.99.20120314/bus/panelproxy.c 2012-04-02 15:36:12.633725645 +0900
|
||||
@@ -481,7 +481,7 @@
|
||||
|
||||
g_return_if_fail (panel->focused_context == context);
|
||||
|
||||
- bus_panel_proxy_set_cursor_location (panel, x, y, w, h);
|
||||
+ // bus_panel_proxy_set_cursor_location (panel, x, y, w, h);
|
||||
}
|
||||
|
||||
static void
|
||||
Only in ibus-1.4.99.20120314/bus: panelproxy.c.orig
|
@ -1,11 +0,0 @@
|
||||
diff -urN ibus-1.4.99.20120314.orig/src/ibusserializable.c ibus-1.4.99.20120314/src/ibusserializable.c
|
||||
--- ibus-1.4.99.20120314.orig/src/ibusserializable.c 2012-11-02 16:48:00.508766644 +0900
|
||||
+++ ibus-1.4.99.20120314/src/ibusserializable.c 2012-11-02 16:52:34.632899493 +0900
|
||||
@@ -161,7 +161,6 @@
|
||||
key,
|
||||
attachment);
|
||||
g_variant_unref (attachment);
|
||||
- g_variant_unref (value);
|
||||
}
|
||||
g_variant_iter_free (iter);
|
||||
return 2;
|
@ -1,15 +0,0 @@
|
||||
Index: bus/inputcontext.c
|
||||
diff --git a/bus/inputcontext.c b/bus/inputcontext.c
|
||||
index 49c4a2694243f20e73929741ae25f7101b94dbc7..ec97e5499844b57d7f2cb63d039dda9d45a1a0ec 100644
|
||||
--- a/bus/inputcontext.c
|
||||
+++ b/bus/inputcontext.c
|
||||
@@ -2015,6 +2015,9 @@ bus_input_context_unset_engine (BusInputContext *context)
|
||||
g_signal_handlers_disconnect_by_func (context->engine,
|
||||
engine_signals[i].callback, context);
|
||||
}
|
||||
+ /* focus out to let engine register properties when enabled
|
||||
+ next time. */
|
||||
+ bus_engine_proxy_focus_out (context->engine);
|
||||
g_object_unref (context->engine);
|
||||
context->engine = NULL;
|
||||
}
|
@ -1,125 +0,0 @@
|
||||
# Copyright 1999-2009 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
# How to run the test manually:
|
||||
# (chroot)$ ./cros_run_unit_tests --packages ibus
|
||||
# or
|
||||
# (chroot)$ env FEATURES="test" emerge-$BOARD -a ibus
|
||||
|
||||
EAPI="2"
|
||||
inherit eutils flag-o-matic toolchain-funcs multilib python libtool
|
||||
|
||||
DESCRIPTION="Intelligent Input Bus for Linux / Unix OS"
|
||||
HOMEPAGE="http://code.google.com/p/ibus/"
|
||||
|
||||
SRC_URI="mirror://gentoo/${P}.tar.gz"
|
||||
|
||||
LICENSE="LGPL-2.1"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 arm x86"
|
||||
IUSE=""
|
||||
#RESTRICT="mirror"
|
||||
|
||||
RDEPEND=">=dev-libs/glib-2.26
|
||||
x11-libs/libX11"
|
||||
DEPEND="${RDEPEND}
|
||||
dev-util/pkgconfig"
|
||||
|
||||
src_prepare() {
|
||||
epatch "${FILESDIR}"/${P}-0003-Add-api-to-ibus-for-retreiving-unused-config-values.patch
|
||||
epatch "${FILESDIR}"/${P}-0004-Remove-bus_input_context_register_properties-props_e.patch
|
||||
|
||||
# TODO(yusukes): Remove this when ibus is upgraded to >= 20120315.
|
||||
epatch "${FILESDIR}"/${P}-fix-engine-destroy-cb-69902696928e6acb953ab30b1f70e462b5994272.patch
|
||||
# TODO(nona): Remove the patch when we fix crosbug.com/25335#c1
|
||||
epatch "${FILESDIR}"/${P}-do-not-send-cursor-location-to-chrome.patch
|
||||
# TODO(penghuang): Remove the patch when we fix ibus issue 1438.
|
||||
epatch "${FILESDIR}"/${P}-disable-ibus-daemon-tests.patch
|
||||
# TODO(nona): Remove the patch when the next ibus update cycle.
|
||||
epatch "${FILESDIR}"/${P}-fix-double-free.patch
|
||||
|
||||
elibtoolize
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# TODO(yusukes): Add -Werror back when IBus issue 1437 is fixed.
|
||||
# append-cflags -Wall -Werror
|
||||
append-cflags -Wall
|
||||
|
||||
# TODO(petkov): Ideally, configure should support --disable-isocodes but
|
||||
# it seems that the current version doesn't, so use the environment
|
||||
# variables instead to remove the dependence on iso-codes.
|
||||
econf \
|
||||
--enable-surrounding-text \
|
||||
--disable-gtk2 \
|
||||
--disable-gtk3 \
|
||||
--disable-dconf \
|
||||
--disable-gconf \
|
||||
--enable-memconf \
|
||||
--disable-xim \
|
||||
--disable-key-snooper \
|
||||
--disable-vala \
|
||||
--enable-introspection=no \
|
||||
--disable-gtk-doc \
|
||||
--disable-nls \
|
||||
--disable-python-library \
|
||||
--disable-setup \
|
||||
CPPFLAGS='-DOS_CHROMEOS=1' \
|
||||
ISOCODES_CFLAGS=' ' ISOCODES_LIBS=' '
|
||||
}
|
||||
|
||||
test_fail() {
|
||||
kill $IBUS_DAEMON_PID
|
||||
rm -rf "${T}"/.ibus-test-socket-*
|
||||
die
|
||||
}
|
||||
|
||||
src_test() {
|
||||
# Start ibus-daemon background.
|
||||
export IBUS_ADDRESS_FILE="`mktemp -d ${T}/.ibus-test-socket-XXXXXXXXXX`/ibus-socket-file"
|
||||
./bus/ibus-daemon --replace --panel=disable &
|
||||
IBUS_DAEMON_PID=$!
|
||||
|
||||
# Wait for the daemon to start.
|
||||
if [ ! -f ${IBUS_ADDRESS_FILE} ] ; then
|
||||
sleep .5
|
||||
fi
|
||||
|
||||
# Run tests.
|
||||
./src/tests/ibus-bus || test_fail
|
||||
|
||||
# TODO(yusukes): Fix 'ERROR:ibus-inputcontext.c:101:test_input_context'
|
||||
# and reenable the test.
|
||||
# ./src/tests/ibus-inputcontext || test_fail
|
||||
|
||||
./src/tests/ibus-inputcontext-create || test_fail
|
||||
./src/tests/ibus-configservice || test_fail
|
||||
./src/tests/ibus-factory || test_fail
|
||||
./src/tests/ibus-keynames || test_fail
|
||||
./src/tests/ibus-serializable || test_fail
|
||||
|
||||
# Cleanup.
|
||||
kill $IBUS_DAEMON_PID
|
||||
rm -rf "${T}"/.ibus-test-socket-*
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install || die
|
||||
if [ -f "${D}/usr/share/ibus/component/gtkpanel.xml" ] ; then
|
||||
rm "${D}/usr/share/ibus/component/gtkpanel.xml" || die
|
||||
fi
|
||||
|
||||
# Remove unnecessary files
|
||||
rm -rf "${D}/usr/share/ibus/keymaps" || die
|
||||
rm -rf "${D}/usr/share/icons" || die
|
||||
|
||||
# TODO(yusukes): The latest ibus has --disable-engine option.
|
||||
rm "${D}/usr/share/ibus/component/simple.xml" || die
|
||||
rm "${D}/usr/libexec/ibus-engine-simple" || die
|
||||
|
||||
rm "${D}/usr/share/applications/ibus.desktop" || die
|
||||
rm "${D}/etc/bash_completion.d/ibus.bash" || die
|
||||
rm -rf "${D}/usr/lib/gtk-2.0/2.10.0/immodules/" || die
|
||||
|
||||
dodoc AUTHORS ChangeLog NEWS README
|
||||
}
|
@ -1 +0,0 @@
|
||||
DIST libhangul-0.0.10.tar.gz 2828525 RMD160 88c03fbbf954addb8c534491a9e3cfd0fdc373dc SHA1 3fdbb1b4ea2f5f12bd3c6760bb2ad609e2eebbaa SHA256 af0722012632ab2afc2016aa6643bd6979e140facc56a911a5a45f97fe61d4c5
|
@ -1,20 +0,0 @@
|
||||
# Copyright 1999-2009 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-i18n/libhangul/libhangul-0.0.10.ebuild,v
|
||||
# 1.1 2009/11/05 23:14:11 matsuu Exp $
|
||||
|
||||
DESCRIPTION="libhangul is a generalized and portable library for processing
|
||||
hangul."
|
||||
HOMEPAGE="http://kldp.net/projects/hangul/"
|
||||
SRC_URI="mirror://gentoo/${P}.tar.gz"
|
||||
|
||||
LICENSE="LGPL-2.1"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~ppc ~x86"
|
||||
IUSE=""
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install || die "emake install failed"
|
||||
|
||||
dodoc AUTHORS ChangeLog NEWS README
|
||||
}
|
@ -1 +0,0 @@
|
||||
DIST tegaki-zinnia-japanese-light-0.3.zip 6171541 SHA256 c879e7453a52ac5804712d848df0693aaefb623e3094b7bb69fd63ea93d00e74 SHA512 0be95c49ed94bef1745c03c781ead8aeb04187684124640b8cc8375da7ca37f781065db63f25048d4d3509f74006052d0edb39b8f7a5df3fbd7798cc5efce1be WHIRLPOOL 444dedb6b13d9dd15e775dcbb4c93c88e6b7d1f2c6123ea149e2bc60ef02ab8cbdf80e9472b3a3f345215a2ca705199a19b7b9b2b356b74e1e6faea8592557cb
|
@ -1,19 +0,0 @@
|
||||
# Copyright 1999-2010 Gentoo Foundation
|
||||
|
||||
EAPI="3"
|
||||
|
||||
DESCRIPTION="Zinnia learning data for Japanese"
|
||||
HOMEPAGE="http://tegaki.org/"
|
||||
SRC_URI="http://commondatastorage.googleapis.com/chromeos-localmirror/distfiles/${P}.zip"
|
||||
|
||||
LICENSE="LGPL"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 x86 arm"
|
||||
|
||||
RDEPEND="app-i18n/zinnia"
|
||||
|
||||
src_install() {
|
||||
mkdir -p "${D}/usr/share/tegaki/models/zinnia" || die
|
||||
install handwriting-ja.meta handwriting-ja.model \
|
||||
"${D}/usr/share/tegaki/models/zinnia/" || die
|
||||
}
|
@ -1 +0,0 @@
|
||||
DIST tegaki-zinnia-simplified-chinese-light-0.3.zip 7015643 SHA256 598787133a4d59fcf3a2fbc5654c68eaf35a8e422274efcea2035cc081f3446c SHA512 2caf4826b40aafddce01c4fe679881c980dc36ad9ea4dd9bfa7a7fa7f75e58e2345cc8f1772c645365c98073927c76371e473c1c2b58f1cdd6e55da1c82d1b44 WHIRLPOOL b8524663dec7baaae368d0e85831329bbb1944be8dab567919870dc78d1845e32d721fda8fd3df6c799bd22e67468777db6389a28487882d689a42a0c046ea52
|
@ -1,19 +0,0 @@
|
||||
# Copyright 1999-2011 Gentoo Foundation
|
||||
|
||||
EAPI="3"
|
||||
|
||||
DESCRIPTION="Zinnia learning data for simplified Chinese"
|
||||
HOMEPAGE="http://tegaki.org/"
|
||||
SRC_URI="http://commondatastorage.googleapis.com/chromeos-localmirror/distfiles/${P}.zip"
|
||||
|
||||
LICENSE="LGPL"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 x86 arm"
|
||||
|
||||
RDEPEND="app-i18n/zinnia"
|
||||
|
||||
src_install() {
|
||||
mkdir -p "${D}/usr/share/tegaki/models/zinnia" || die
|
||||
install handwriting-zh_CN.meta handwriting-zh_CN.model \
|
||||
"${D}/usr/share/tegaki/models/zinnia/" || die
|
||||
}
|
@ -1 +0,0 @@
|
||||
DIST tegaki-zinnia-traditional-chinese-light-0.3.zip 12600387 SHA256 2233e8cdfede562297f652bf2a2e9d154215228f0c83e2cbe349ef539499ded4 SHA512 45a5a1c85e45f8e2ee85e9c39e749370f35f2dcbe5987c9b86239c14932fa4cdff6416579ac5a0f6414c5f5eabfaf2d8bd4426f27c73e2c8a3fc06c12cedf854 WHIRLPOOL 9674f1d6192b219df8ed8e93c455c97e689f517df28bf8bcd31646f2ce6ea79562336a080a84016a03fc6f4f11d4d3b3cfcd9cc384ef7ea2aa5822de8f4bc171
|
@ -1,19 +0,0 @@
|
||||
# Copyright 1999-2011 Gentoo Foundation
|
||||
|
||||
EAPI="3"
|
||||
|
||||
DESCRIPTION="Zinnia learning data for traditional Chinese"
|
||||
HOMEPAGE="http://tegaki.org/"
|
||||
SRC_URI="http://commondatastorage.googleapis.com/chromeos-localmirror/distfiles/${P}.zip"
|
||||
|
||||
LICENSE="LGPL"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 x86 arm"
|
||||
|
||||
RDEPEND="app-i18n/zinnia"
|
||||
|
||||
src_install() {
|
||||
mkdir -p "${D}/usr/share/tegaki/models/zinnia" || die
|
||||
install handwriting-zh_TW.meta handwriting-zh_TW.model \
|
||||
"${D}/usr/share/tegaki/models/zinnia/" || die
|
||||
}
|
@ -1 +0,0 @@
|
||||
DIST laptop-mode-tools_1.59.tar.gz 102751 SHA256 d1cd3c1889bb651a9c057a95f5000d8d917070e39d4090b671f421ac2c1a253d SHA512 958d342641108d1726714e67b18222171568a39b25b2f7f4af714a566153698b04a27fd2d55abea4e7f72783a633eacab7d7386f1afdd94da7577d31ade2f00b WHIRLPOOL 00f17a7acc938ace04103e6a7d6cea4d55a7790bf8f0805f314f4e40ec4d139ac46e24d64171b18f0b97acfffccba4f1e71ad2508bdcfb5a902d0ab7d8ca1319
|
@ -1,60 +0,0 @@
|
||||
diff -ruN laptop-mode-tools-1.59/etc/laptop-mode/conf.d/ac97-powersave.conf laptop-mode-tools-1.59.new/etc/laptop-mode/conf.d/ac97-powersave.conf
|
||||
--- laptop-mode-tools-1.59/etc/laptop-mode/conf.d/ac97-powersave.conf
|
||||
+++ laptop-mode-tools-1.59.new/etc/laptop-mode/conf.d/ac97-powersave.conf
|
||||
@@ -18,7 +18,7 @@
|
||||
###############################################################################
|
||||
|
||||
# Control AC97 audio chipset power?
|
||||
-CONTROL_AC97_POWER="auto"
|
||||
+CONTROL_AC97_POWER=1
|
||||
|
||||
# Enable debug mode for this module
|
||||
# Set to 1 if you want to debug this module
|
||||
diff -ruN laptop-mode-tools-1.59/etc/laptop-mode/conf.d/intel-hda-powersave.conf laptop-mode-tools-1.59.new/etc/laptop-mode/conf.d/intel-hda-powersave.conf
|
||||
--- laptop-mode-tools-1.59/etc/laptop-mode/conf.d/intel-hda-powersave.conf
|
||||
+++ laptop-mode-tools-1.59.new/etc/laptop-mode/conf.d/intel-hda-powersave.conf
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
# Control INTEL HDA audio chipset power?
|
||||
# Set to 0 to disable
|
||||
-CONTROL_INTEL_HDA_POWER="auto"
|
||||
+CONTROL_INTEL_HDA_POWER=1
|
||||
|
||||
# Handle power savings for Intel HDA under specific circumstances
|
||||
BATT_INTEL_HDA_POWERSAVE=1
|
||||
diff -ruN laptop-mode-tools-1.59/etc/laptop-mode/conf.d/intel-sata-powermgmt.conf laptop-mode-tools-1.59.new/etc/laptop-mode/conf.d/intel-sata-powermgmt.conf
|
||||
--- laptop-mode-tools-1.59/etc/laptop-mode/conf.d/intel-sata-powermgmt.conf
|
||||
+++ laptop-mode-tools-1.59.new/etc/laptop-mode/conf.d/intel-sata-powermgmt.conf
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
# Control Intel SATA chipset power management?
|
||||
# Set to 0 to disable
|
||||
-CONTROL_INTEL_SATA_POWER="auto"
|
||||
+CONTROL_INTEL_SATA_POWER=1
|
||||
|
||||
# Handle power management of the Intel SATA deivce under specific circumstances
|
||||
BATT_ACTIVATE_SATA_POWER=1
|
||||
diff -ruN laptop-mode-tools-1.59/etc/laptop-mode/conf.d/usb-autosuspend.conf laptop-mode-tools-1.59.new/etc/laptop-mode/conf.d/usb-autosuspend.conf
|
||||
--- laptop-mode-tools-1.59/etc/laptop-mode/conf.d/usb-autosuspend.conf
|
||||
+++ laptop-mode-tools-1.59.new/etc/laptop-mode/conf.d/usb-autosuspend.conf
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
# Enable USB autosuspend feature?
|
||||
# Set to 0 to disable
|
||||
-CONTROL_USB_AUTOSUSPEND="auto"
|
||||
+CONTROL_USB_AUTOSUSPEND=1
|
||||
|
||||
# The list of USB IDs that should not use autosuspend. Use lsusb to find out the
|
||||
# IDs of your USB devices.
|
||||
diff -ruN laptop-mode-tools-1.59/etc/laptop-mode/laptop-mode.conf laptop-mode-tools-1.59.new/etc/laptop-mode/laptop-mode.conf
|
||||
--- laptop-mode-tools-1.59/etc/laptop-mode/laptop-mode.conf
|
||||
+++ laptop-mode-tools-1.59.new/etc/laptop-mode/laptop-mode.conf
|
||||
@@ -283,7 +283,7 @@
|
||||
# Should laptop mode tools control the hard drive power management settings?
|
||||
#
|
||||
# Set to 0 to disable
|
||||
-CONTROL_HD_POWERMGMT="auto"
|
||||
+CONTROL_HD_POWERMGMT=1
|
||||
|
||||
|
||||
#
|
@ -1,66 +0,0 @@
|
||||
From 349963dc68cebf8d2e60d0f9ece6e95573366a59 Mon Sep 17 00:00:00 2001
|
||||
From: Sameer Nanda <snanda@chromium.org>
|
||||
Date: Tue, 16 Feb 2010 16:24:26 -0800
|
||||
Subject: [PATCH 4/8] Add config knob to control syslog facility
|
||||
|
||||
Modified for 1.57
|
||||
|
||||
Signed-off-by: Sameer <snanda@chromium.org>
|
||||
Signed-off-by: Simon Que <sque@chromium.org>
|
||||
|
||||
Change-Id: I9192a41ea84ed957fcd2ebb7e03e2defb16412ac
|
||||
---
|
||||
.../etc/laptop-mode/laptop-mode.conf | 2 ++
|
||||
laptop-mode-tools-1.59/usr/sbin/laptop_mode | 13 +++++++------
|
||||
2 files changed, 9 insertions(+), 6 deletions(-)
|
||||
|
||||
diff -ruN laptop-mode-tools-1.59/etc/laptop-mode/laptop-mode.conf laptop-mode-tools-1.59.new/etc/laptop-mode/laptop-mode.conf
|
||||
index e0a6e06..47a2381 100644
|
||||
--- laptop-mode-tools-1.59/etc/laptop-mode/laptop-mode.conf
|
||||
+++ laptop-mode-tools-1.59.new/etc/laptop-mode/laptop-mode.conf
|
||||
@@ -60,6 +60,8 @@ VERBOSE_OUTPUT=0
|
||||
|
||||
# Set this to 1 if you want to log messages to syslog
|
||||
LOG_TO_SYSLOG=1
|
||||
+# syslog facility passed to logger -t when LOG_TO_SYSLOG is 1
|
||||
+SYSLOG_FACILITY=daemon
|
||||
|
||||
# Run in shell debug mode
|
||||
# Enable this if you would like to execute the entire laptop-mode-tools program
|
||||
diff -ruN laptop-mode-tools-1.59/usr/sbin/laptop_mode laptop-mode-tools-1.59.new/usr/sbin/laptop_mode
|
||||
index 2827569..8acbc68 100644
|
||||
--- laptop-mode-tools-1.59/usr/sbin/laptop_mode
|
||||
+++ laptop-mode-tools-1.59.new/usr/sbin/laptop_mode
|
||||
@@ -127,6 +127,7 @@ BATT_BRIGHTNESS_COMMAND=false
|
||||
LM_AC_BRIGHTNESS_COMMAND=false
|
||||
NOLM_AC_BRIGHTNESS_COMMAND=false
|
||||
LOG_TO_SYSLOG=1
|
||||
+SYSLOG_FACILITY=daemon
|
||||
DEBUG=0
|
||||
ENABLE_LAPTOP_MODE_TOOLS=1
|
||||
|
||||
@@ -160,15 +161,15 @@ if [ x$LOG_TO_SYSLOG = x1 ]; then
|
||||
# continue
|
||||
#elif [ "$1" = "MSG" ]; then
|
||||
if [ "$1" = "MSG" ]; then
|
||||
- logger -p daemon.info -t laptop-mode "$2";
|
||||
+ logger -p $SYSLOG_FACILITY.info -t laptop-mode "$2";
|
||||
elif [ "$1" = "ERR" ]; then
|
||||
- logger -p daemon.err -t laptop-mode "$2";
|
||||
+ logger -p $SYSLOG_FACILITY.err -t laptop-mode "$2";
|
||||
elif [ "$1" = "VERBOSE" ]; then
|
||||
- if [ x$VERBOSE_OUTPUT = x1 ]; then
|
||||
- logger -p daemon.debug -t laptop-mode "$2";
|
||||
- fi
|
||||
+ if [ x$VERBOSE_OUTPUT = x1 ]; then
|
||||
+ logger -p $SYSLOG_FACILITY.debug -t laptop-mode "$2";
|
||||
+ fi
|
||||
else
|
||||
- logger -p daemon.notice -t laptop-mode "$2";
|
||||
+ logger -p $SYSLOG_FACILITY.notice -t laptop-mode "$2";
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
--
|
||||
1.7.2.3
|
||||
|
@ -1,75 +0,0 @@
|
||||
From 7c518a4bc8102c179a6a6775aca48d0fe78c5ca4 Mon Sep 17 00:00:00 2001
|
||||
From: Sameer Nanda <snanda@chromium.org>
|
||||
Date: Thu, 22 Apr 2010 17:16:47 -0700
|
||||
Subject: [PATCH 5/8] Added WiFi power management support. Saves 0.3-0.8W at idle.
|
||||
|
||||
Review URL: http://codereview.chromium.org/1769003
|
||||
---
|
||||
.../etc/laptop-mode/conf.d/wifi-powermgmt.conf | 23 +++++++++++++++++++
|
||||
.../share/laptop-mode-tools/modules/wifi-powermgmt | 24 ++++++++++++++++++++
|
||||
2 files changed, 47 insertions(+), 0 deletions(-)
|
||||
create mode 100644 laptop-mode-tools-1.59/etc/laptop-mode/conf.d/wifi-powermgmt.conf
|
||||
create mode 100755 laptop-mode-tools-1.59/usr/share/laptop-mode-tools/modules/wifi-powermgmt
|
||||
|
||||
diff -ruN /dev/null laptop-mode-tools-1.59/etc/laptop-mode/conf.d/wifi-powermgmt.conf
|
||||
new file mode 100644
|
||||
index 0000000..6ec4fec
|
||||
--- /dev/null
|
||||
+++ laptop-mode-tools-1.59/etc/laptop-mode/conf.d/wifi-powermgmt.conf
|
||||
@@ -0,0 +1,23 @@
|
||||
+#
|
||||
+# Configuration file for Laptop Mode Tools module wifi-powermgmt.
|
||||
+#
|
||||
+# For more information, consult the laptop-mode.conf(8) manual page.
|
||||
+#
|
||||
+
|
||||
+
|
||||
+###############################################################################
|
||||
+# WiFi power management settings
|
||||
+# ------------------------------------
|
||||
+#
|
||||
+# If you enable this setting, laptop mode tools will automatically enable the
|
||||
+# power management for all WiFi devices in the system
|
||||
+#
|
||||
+###############################################################################
|
||||
+
|
||||
+# Enable debug mode for this module
|
||||
+# Set to 1 if you want to debug this module
|
||||
+DEBUG=0
|
||||
+
|
||||
+# Control WiFi power management?
|
||||
+CONTROL_WIFI_POWER=1
|
||||
+
|
||||
diff -ruN /dev/null laptop-mode-tools-1.59/usr/share/laptop-mode-tools/modules/wifi-powermgmt
|
||||
new file mode 100755
|
||||
index 0000000..2efb1a6
|
||||
--- /dev/null
|
||||
+++ laptop-mode-tools-1.59/usr/share/laptop-mode-tools/modules/wifi-powermgmt
|
||||
@@ -0,0 +1,24 @@
|
||||
+IWCONFIG=iwconfig
|
||||
+
|
||||
+if [ x$CONTROL_WIFI_POWER = x1 ] ; then
|
||||
+ if [ $ON_AC -eq 1 ] ; then
|
||||
+ power_mgmt="off"
|
||||
+ else
|
||||
+ power_mgmt="on"
|
||||
+ fi
|
||||
+
|
||||
+ for DEVICE in /sys/class/net/* ; do
|
||||
+ if [ -d $DEVICE/wireless ]; then
|
||||
+ dev=`basename $DEVICE`
|
||||
+ $IWCONFIG $dev power $power_mgmt
|
||||
+ ret=$?
|
||||
+ if [ "$ret" = "0" ]; then
|
||||
+ log "VERBOSE" "Power Management set to $power_mgmt for $dev."
|
||||
+ else
|
||||
+ log "VERBOSE" "Failed to set Power Management to $power_mgmt for $dev."
|
||||
+ fi
|
||||
+ fi
|
||||
+ done
|
||||
+else
|
||||
+ log "VERBOSE" "WiFi power setting is disabled."
|
||||
+fi
|
||||
--
|
||||
1.7.2.3
|
||||
|
@ -1,89 +0,0 @@
|
||||
From 3059bdb03918a5acf239a245f5d78f45253ebf94 Mon Sep 17 00:00:00 2001
|
||||
From: Sam Leffler <sleffler@chromium.org>
|
||||
Date: Wed, 10 Nov 2010 10:20:56 -0800
|
||||
Subject: [PATCH 7/8] laptop-mode-tools: switch wifi support to be nl80211-only
|
||||
|
||||
We support only nl80211 WiFi devices; no more WEXT support:
|
||||
- remove old script that used iwconfig
|
||||
- add new module script that uses iw to ena/dis power save
|
||||
|
||||
Note this also fixes wifi power save operation for nl80211 devices as the iwconfig code never worked right due to it checking the wrong file under /sys. This means we should now have lower latency on AC because we'll turn off power save.
|
||||
|
||||
BUG=7138
|
||||
TEST=gmerge to device; suspend+resume and check power save state of wlan0; also run sh -x laptop_mode auto force and verify the right things are happenig for wifi devices
|
||||
|
||||
Review URL: http://codereview.chromium.org/4675003
|
||||
|
||||
Change-Id: Ifac0b67c7eb6663fb911be267711c44e6e8538b0
|
||||
---
|
||||
.../modules/wifi-nl80211-powermgmt | 26 ++++++++++++++++++++
|
||||
.../share/laptop-mode-tools/modules/wifi-powermgmt | 24 ------------------
|
||||
2 files changed, 26 insertions(+), 24 deletions(-)
|
||||
create mode 100755 laptop-mode-tools-1.59/usr/share/laptop-mode-tools/modules/wifi-nl80211-powermgmt
|
||||
delete mode 100755 laptop-mode-tools-1.59/usr/share/laptop-mode-tools/modules/wifi-powermgmt
|
||||
|
||||
diff -ruN /dev/null laptop-mode-tools-1.59/usr/share/laptop-mode-tools/modules/wifi-nl80211-powermgmt
|
||||
new file mode 100755
|
||||
index 0000000..934d080
|
||||
--- /dev/null
|
||||
+++ laptop-mode-tools-1.59/usr/share/laptop-mode-tools/modules/wifi-nl80211-powermgmt
|
||||
@@ -0,0 +1,26 @@
|
||||
+IW=/usr/sbin/iw
|
||||
+
|
||||
+if [ ! -x $IW ]; then
|
||||
+ log "VERBOSE" "No $IW program, WiFi power setting is disabled."
|
||||
+elif [ x$CONTROL_WIFI_POWER = x1 ] ; then
|
||||
+ if [ $ON_AC -eq 1 ] ; then
|
||||
+ power_mgmt="off"
|
||||
+ else
|
||||
+ power_mgmt="on"
|
||||
+ fi
|
||||
+
|
||||
+ for DEVICE in /sys/class/net/* ; do
|
||||
+ if [ -d $DEVICE/phy80211 ]; then
|
||||
+ dev=`basename $DEVICE`
|
||||
+ $IW $dev set power_save $power_mgmt
|
||||
+ ret=$?
|
||||
+ if [ "$ret" = "0" ]; then
|
||||
+ log "VERBOSE" "Power Management set to $power_mgmt for $dev."
|
||||
+ else
|
||||
+ log "VERBOSE" "Failed to set Power Management to $power_mgmt for $dev."
|
||||
+ fi
|
||||
+ fi
|
||||
+ done
|
||||
+else
|
||||
+ log "VERBOSE" "WiFi power setting is disabled."
|
||||
+fi
|
||||
diff -ruN laptop-mode-tools-1.59/usr/share/laptop-mode-tools/modules/wifi-powermgmt /dev/null
|
||||
deleted file mode 100755
|
||||
index 2efb1a6..0000000
|
||||
--- laptop-mode-tools-1.59/usr/share/laptop-mode-tools/modules/wifi-powermgmt
|
||||
+++ /dev/null
|
||||
@@ -1,24 +0,0 @@
|
||||
-IWCONFIG=iwconfig
|
||||
-
|
||||
-if [ x$CONTROL_WIFI_POWER = x1 ] ; then
|
||||
- if [ $ON_AC -eq 1 ] ; then
|
||||
- power_mgmt="off"
|
||||
- else
|
||||
- power_mgmt="on"
|
||||
- fi
|
||||
-
|
||||
- for DEVICE in /sys/class/net/* ; do
|
||||
- if [ -d $DEVICE/wireless ]; then
|
||||
- dev=`basename $DEVICE`
|
||||
- $IWCONFIG $dev power $power_mgmt
|
||||
- ret=$?
|
||||
- if [ "$ret" = "0" ]; then
|
||||
- log "VERBOSE" "Power Management set to $power_mgmt for $dev."
|
||||
- else
|
||||
- log "VERBOSE" "Failed to set Power Management to $power_mgmt for $dev."
|
||||
- fi
|
||||
- fi
|
||||
- done
|
||||
-else
|
||||
- log "VERBOSE" "WiFi power setting is disabled."
|
||||
-fi
|
||||
--
|
||||
1.7.2.3
|
||||
|
@ -1,36 +0,0 @@
|
||||
From 88698f32444ee88ce66e40cf54b8ac3563342723 Mon Sep 17 00:00:00 2001
|
||||
From: Sameer Nanda <snanda@chromium.org>
|
||||
Date: Mon, 15 Nov 2010 13:38:40 -0800
|
||||
Subject: [PATCH 8/8] Lowering hard drive idle timeout to 5 seconds from 20 seconds.
|
||||
|
||||
This change saves about 200mW of power on SSDs.
|
||||
|
||||
Change-Id: I7a7dfdbd7e264386d21da673b1906460ecf1c307
|
||||
|
||||
BUG= chromium-os:9180
|
||||
TEST= ran vmstat & hdparm to see when the last read/write to the disk
|
||||
happened and when the drive transitioned to standby state. With this
|
||||
change in place, on battery the hard drive transitioned to standby
|
||||
state 5 seconds after the last read/write.
|
||||
|
||||
Review URL: http://codereview.chromium.org/5032002
|
||||
---
|
||||
.../etc/laptop-mode/laptop-mode.conf | 2 +-
|
||||
1 files changed, 1 insertions(+), 1 deletions(-)
|
||||
|
||||
diff -ruN laptop-mode-tools-1.59/etc/laptop-mode/laptop-mode.conf laptop-mode-tools-1.59/etc/laptop-mode/laptop-mode.conf
|
||||
index 47a2381..5dc4b38 100644
|
||||
--- laptop-mode-tools-1.59/etc/laptop-mode/laptop-mode.conf
|
||||
+++ laptop-mode-tools-1.59/etc/laptop-mode/laptop-mode.conf
|
||||
@@ -273,7 +273,7 @@ CONTROL_HD_IDLE_TIMEOUT=1
|
||||
# for battery and for AC with laptop mode on.
|
||||
#
|
||||
LM_AC_HD_IDLE_TIMEOUT_SECONDS=20
|
||||
-LM_BATT_HD_IDLE_TIMEOUT_SECONDS=20
|
||||
+LM_BATT_HD_IDLE_TIMEOUT_SECONDS=5
|
||||
NOLM_HD_IDLE_TIMEOUT_SECONDS=7200
|
||||
|
||||
|
||||
--
|
||||
1.7.2.3
|
||||
|
@ -1,20 +0,0 @@
|
||||
--- laptop-mode-tools-1.59/usr/sbin/laptop_mode
|
||||
+++ laptop-mode-tools-1.59/usr/sbin/laptop_mode
|
||||
@@ -133,7 +133,7 @@
|
||||
|
||||
LMT_REQ_LOCK="/var/lock/lmt-req.lock"
|
||||
LMT_INVOC_LOCK="/var/lock/lmt-invoc.lock"
|
||||
-FLOCK=`which flock`
|
||||
+FLOCK=`PATH=$PATH which flock`
|
||||
|
||||
checkint ()
|
||||
{
|
||||
@@ -146,7 +146,7 @@
|
||||
}
|
||||
|
||||
# Function to handle logging
|
||||
+LOGGER=`PATH=$PATH which logger`;
|
||||
-LOGGER=`which logger`;
|
||||
|
||||
log ()
|
||||
{
|
@ -1,11 +0,0 @@
|
||||
--- laptop-mode-tools-1.59/usr/sbin/laptop_mode
|
||||
+++ laptop-mode-tools-1.59/usr/sbin/laptop_mode
|
||||
@@ -165,7 +165,7 @@
|
||||
elif [ "$1" = "ERR" ]; then
|
||||
logger -p $SYSLOG_FACILITY.err -t laptop-mode "$2";
|
||||
elif [ "$1" = "VERBOSE" ]; then
|
||||
- if [ x$VERBOSE_OUTPUT = x1 ]; then
|
||||
+ if [ x$VERBOSE_OUTPUT = x1 -a "$DEBUG" = 1 ]; then
|
||||
logger -p $SYSLOG_FACILITY.debug -t laptop-mode "$2";
|
||||
fi
|
||||
else
|
@ -1,11 +0,0 @@
|
||||
--- laptop-mode-tools-1.59/etc/laptop-mode/conf.d/usb-autosuspend.conf
|
||||
+++ laptop-mode-tools-1.59/etc/laptop-mode/conf.d/usb-autosuspend.conf
|
||||
@@ -34,7 +34,7 @@
|
||||
# The list of USB driver types that should not use autosuspend. The driver
|
||||
# type is given by "DRIVER=..." in a USB device's uevent file.
|
||||
# Example: AUTOSUSPEND_USBID_BLACKLIST="usbhid usb-storage"
|
||||
-AUTOSUSPEND_USBTYPE_BLACKLIST=""
|
||||
+AUTOSUSPEND_USBTYPE_BLACKLIST="usbhid"
|
||||
|
||||
# Trigger auto-suspension of the USB deivce under conditional circumstances
|
||||
BATT_SUSPEND_USB=1
|
@ -1,36 +0,0 @@
|
||||
From 27be03f0dbacd4b078ed18ee43ad3c710b569260 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Kurtz <djkurtz@chromium.org>
|
||||
Date: Wed, 11 May 2011 19:09:52 +0800
|
||||
Subject: [PATCH] Skip failed globs when finding module scripts
|
||||
|
||||
Globs return the glob expression itself if there are no valid expansions (Unless using the bash-specific "setopt -u nullglob").
|
||||
Fix this by detecting and ignoring SCRIPT when it is not a file.
|
||||
|
||||
BUG=chromium-os:15187
|
||||
TEST=(0) Enable laptop_mode verbose output (set VERBOSE_OUTPUT=1 in /etc/laptop-mode/laptop-mode.conf)
|
||||
(1) sudo /usr/sbin/laptop_mode auto force
|
||||
The following should not be present at end of output:
|
||||
Module /usr/local/lib/laptop-mode-tools/modules/* is not executable or is to be skipped.
|
||||
Module /usr/local/share/laptop-mode-tools/modules/* is not executable or is to be skipped.
|
||||
Module /etc/laptop-mode/modules/* is not executable or is to be skipped.
|
||||
---
|
||||
usr/sbin/laptop_mode | 3 +++
|
||||
1 files changed, 3 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/usr/sbin/laptop_mode b/usr/sbin/laptop_mode
|
||||
index 7877f80..71a5cbe 100755
|
||||
--- laptop-mode-tools-1.59/usr/sbin/laptop_mode
|
||||
+++ laptop-mode-tools-1.59/usr/sbin/laptop_mode
|
||||
@@ -1038,6 +1038,9 @@ lmt_main_function ()
|
||||
# Note that the /usr/local/lib path is deprecated.
|
||||
export FORCE STATE ON_AC ACTIVATE ACTIVATE_WITH_POSSIBLE_DATA_LOSS KLEVEL KMINOR WAS_ACTIVE LM_VERBOSE DEVICES
|
||||
for SCRIPT in /usr/share/laptop-mode-tools/modules/* /usr/local/lib/laptop-mode-tools/modules/* /usr/local/share/laptop-mode-tools/modules/* /etc/laptop-mode/modules/* ; do
|
||||
+ # Skip failed globs
|
||||
+ [ -f "$SCRIPT" ] || continue
|
||||
+
|
||||
if [ -z "$MODULES" ] ; then
|
||||
# If a module list has not been provided, execute all modules
|
||||
EXECUTE_SCRIPT=1
|
||||
--
|
||||
1.7.3.1
|
||||
|
@ -1,33 +0,0 @@
|
||||
From 862029ae5315db204af3b35fc12acaa4ca12c50f Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Kurtz <djkurtz@chromium.org>
|
||||
Date: Fri, 13 May 2011 18:59:09 +0800
|
||||
Subject: [PATCH] wireless-power tries to control wifi even if iwconfig is not found
|
||||
|
||||
When iwconfig isn't found, wireless-power still tries to execute
|
||||
"$IWCONFIG $IFNAME", which fails with "$IFNAME not found" errors.
|
||||
|
||||
BUG=chromium-os:15185
|
||||
TEST=/usr/sbin/laptop_mode auto force
|
||||
There should be no more errors like this:
|
||||
/usr/share/laptop-mode-tools/modules/wireless-power: 94: eth0: not found Failed.
|
||||
/usr/share/laptop-mode-tools/modules/wireless-power: 94: usb0: not found Failed.
|
||||
/usr/share/laptop-mode-tools/modules/wireless-power: 94: wlan0: not found Failed
|
||||
---
|
||||
usr/share/laptop-mode-tools/modules/wireless-power | 1 +
|
||||
1 files changed, 1 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/usr/share/laptop-mode-tools/modules/wireless-power b/usr/share/laptop-mode-tools/modules/wireless-power
|
||||
index 6407d2a..649b40a 100755
|
||||
--- laptop-mode-tools-1.59/usr/share/laptop-mode-tools/modules/wireless-power
|
||||
+++ laptop-mode-tools-1.59/usr/share/laptop-mode-tools/modules/wireless-power
|
||||
@@ -62,6 +62,7 @@ if [ x$CONTROL_WIRELESS_POWER_SAVING = x1 ] || [ x$ENABLE_AUTO_MODULES = x1 -a x
|
||||
IWCONFIG=/usr/sbin/iwconfig
|
||||
else
|
||||
log "VERBOSE" "iwconfig is not installed"
|
||||
+ exit 1
|
||||
fi
|
||||
|
||||
# Translate 1 => on, 0 => off
|
||||
--
|
||||
1.7.3.1
|
||||
|
@ -1,11 +0,0 @@
|
||||
--- laptop-mode-tools-1.59/etc/laptop-mode/conf.d/ethernet.conf
|
||||
+++ laptop-mode-tools-1.59/etc/laptop-mode/conf.d/ethernet.conf.new
|
||||
@@ -22,7 +22,7 @@
|
||||
DEBUG=0
|
||||
|
||||
# Control Ethernet settings?
|
||||
-CONTROL_ETHERNET="auto"
|
||||
+CONTROL_ETHERNET=0
|
||||
|
||||
# Handle throttling of the ethernet deivce under specific circumstances
|
||||
BATT_THROTTLE_ETHERNET=1
|
@ -1,11 +0,0 @@
|
||||
--- laptop-mode-tools-1.59/etc/laptop-mode/laptop-mode.conf
|
||||
+++ laptop-mode-tools-1.59/etc/laptop-mode/laptop-mode.conf
|
||||
@@ -322,7 +322,7 @@
|
||||
# disable this. If you do, then your hard drives will probably not spin down
|
||||
# anymore.
|
||||
#
|
||||
-CONTROL_MOUNT_OPTIONS=1
|
||||
+CONTROL_MOUNT_OPTIONS=0
|
||||
|
||||
|
||||
#
|
@ -1,30 +0,0 @@
|
||||
--- laptop-mode-tools-1.59/etc/rules/lmt-udev
|
||||
+++ laptop-mode-tools-1.59/etc/rules/lmt-udev
|
||||
@@ -2,7 +2,24 @@
|
||||
# /usr is not guaranteed to be mounted when udev starts
|
||||
|
||||
(
|
||||
- . /lib/udev/hotplug.functions
|
||||
- wait_for_file /usr/sbin/laptop_mode
|
||||
- exec /usr/sbin/laptop_mode "$@"
|
||||
+ if [ -e /lib/udev/hotplug.functions ]; then
|
||||
+ . /lib/udev/hotplug.functions
|
||||
+ wait_for_file /usr/sbin/laptop_mode
|
||||
+ exec /usr/sbin/laptop_mode "$@"
|
||||
+ else
|
||||
+ local file=$1
|
||||
+ local timeout=$2
|
||||
+ [ "$timeout" ] || timeout=120
|
||||
+
|
||||
+ local count=$timeout
|
||||
+ while [ $count != 0 ]; do
|
||||
+ [ -e "/usr/sbin/laptop_mode" ] && exec /usr/sbin/laptop_mode "$@" && return 0
|
||||
+ sleep 1
|
||||
+ count=$(($count - 1))
|
||||
+ done
|
||||
+
|
||||
+ mesg "$file did not appear before the timeout!"
|
||||
+ exit 1
|
||||
+ fi
|
||||
+
|
||||
) &
|
@ -1,23 +0,0 @@
|
||||
--- /laptop-mode-tools-1.59/usr/share/laptop-mode-tools/modules/usb-autosuspend
|
||||
+++ /laptop-mode-tools-1.59/usr/share/laptop-mode-tools/modules/usb-autosuspend
|
||||
@@ -45,16 +45,16 @@
|
||||
|
||||
# Checks whether a device is blacklisted by either ID or driver type
|
||||
blacklisted() {
|
||||
- listed_by_id $1 $AUTOSUSPEND_USBID_BLACKLIST\
|
||||
- || listed_by_type $1 $AUTOSUSPEND_USBTYPE_BLACKLIST\
|
||||
+ listed_by_id $1 "$AUTOSUSPEND_USBID_BLACKLIST"\
|
||||
+ || listed_by_type $1 "$AUTOSUSPEND_USBTYPE_BLACKLIST"\
|
||||
|| return 1
|
||||
return 0
|
||||
}
|
||||
|
||||
# Checks whether a device is whitelisted by either ID or driver type
|
||||
whitelisted() {
|
||||
- listed_by_id $1 $AUTOSUSPEND_USBID_WHITELIST\
|
||||
- || listed_by_type $1 $AUTOSUSPEND_USBTYPE_WHITELIST\
|
||||
+ listed_by_id $1 "$AUTOSUSPEND_USBID_WHITELIST"\
|
||||
+ || listed_by_type $1 "$AUTOSUSPEND_USBTYPE_WHITELIST"\
|
||||
|| return 1
|
||||
return 0
|
||||
}
|
@ -1,14 +0,0 @@
|
||||
--- laptop-mode-tools-1.59/usr/share/laptop-mode-tools/modules/hdparm
|
||||
+++ laptop-mode-tools-1.59/usr/share/laptop-mode-tools/modules/hdparm.new
|
||||
@@ -17,6 +17,11 @@
|
||||
local MEDIA=
|
||||
local BUS=
|
||||
|
||||
+ # Make sure the drive exists before checking anything.
|
||||
+ if [ ! -e $1 ]; then
|
||||
+ return 1
|
||||
+ fi
|
||||
+
|
||||
# If we are running udev, this is the most portable way
|
||||
# It assumes more or less recent udev (> 070)
|
||||
if [ $HAVE_UDEVINFO -ne 0 ] ; then
|
@ -1,11 +0,0 @@
|
||||
--- laptop-mode-tools-1.59/usr/sbin/laptop_mode
|
||||
+++ laptop-mode-tools-1.59/usr/sbin/laptop_mode
|
||||
@@ -230,7 +230,7 @@
|
||||
# to modular configuration files, and to support existing laptop-mode.conf
|
||||
# files from earlier versions, we source the modular configuration files FIRST.
|
||||
if [ -d /etc/laptop-mode/conf.d ] ; then
|
||||
- for CONF in /etc/laptop-mode/conf.d/*.conf ; do
|
||||
+ for CONF in /etc/laptop-mode/conf.d/*.conf /etc/laptop-mode/conf.d/board-specific/*.conf; do
|
||||
if [ -r "$CONF" ] ; then
|
||||
. "$CONF"
|
||||
#Handle individual module debug settings
|
@ -1,20 +0,0 @@
|
||||
--- laptop-mode-tools-1.59/usr/share/laptop-mode-tools/modules/hdparm
|
||||
+++ laptop-mode-tools-1.59/usr/share/laptop-mode-tools/modules/hdparm.new
|
||||
@@ -22,6 +22,14 @@ is_capable() {
|
||||
return 1;
|
||||
fi
|
||||
|
||||
+ if [ -n "$(hdparm -I $1 | grep SSD)" ]; then
|
||||
+ # If the device is a SSD, it is not capable of power management.
|
||||
+ if [ "$2" = "POWERMGMT" ]; then
|
||||
+ log "VERBOSE" "$1 is a SSD, not capable of power management"
|
||||
+ return 1
|
||||
+ fi
|
||||
+ fi
|
||||
+
|
||||
# If we are running udev, this is the most portable way
|
||||
# It assumes more or less recent udev (> 070)
|
||||
if [ $HAVE_UDEVINFO -ne 0 ] ; then
|
||||
--
|
||||
1.7.7.3
|
||||
|
@ -1,73 +0,0 @@
|
||||
--- laptop-mode-tools-1.59//usr/sbin/laptop_mode 2012-06-15 17:33:49.052591220 -0700
|
||||
+++ laptop-mode-tools-1.59//usr/sbin/laptop_mode 2012-06-20 11:02:11.248576131 -0700
|
||||
@@ -37,6 +37,12 @@
|
||||
# as well, so don't change the format!
|
||||
LMTVERSION=1.59
|
||||
|
||||
+if [ -f /var/run/laptop-mode-tools/laptop-mode.conf ]; then
|
||||
+ LAPTOP_MODE_CONFIG_DIR=/var/run/laptop-mode-tools
|
||||
+else
|
||||
+ LAPTOP_MODE_CONFIG_DIR=/etc/laptop-mode
|
||||
+fi
|
||||
+
|
||||
# This script is loaded from multiple scripts to set the config defaults
|
||||
# and to read the configuration on top of those. Only when the command is
|
||||
# recognized does this script do anything else.
|
||||
@@ -229,26 +235,32 @@
|
||||
# Source config. Some config settings have been moved from the main config file
|
||||
# to modular configuration files, and to support existing laptop-mode.conf
|
||||
# files from earlier versions, we source the modular configuration files FIRST.
|
||||
- if [ -d /etc/laptop-mode/conf.d ] ; then
|
||||
- for CONF in /etc/laptop-mode/conf.d/*.conf /etc/laptop-mode/conf.d/board-specific/*.conf; do
|
||||
- if [ -r "$CONF" ] ; then
|
||||
- . "$CONF"
|
||||
- #Handle individual module debug settings
|
||||
- if [ "$DEBUG" -eq 1 ]; then
|
||||
- export $(basename $CONF | cut -d . -f1 | tr "[:lower:]" "[:upper:]" | sed 's/-/_/g')_DEBUG=1
|
||||
- log "VERBOSE" "Enabling debug mode for module $CONF"
|
||||
- fi
|
||||
- DEBUG=0
|
||||
- else
|
||||
- log "MSG" "Warning: Configuration file $CONF is not readable, skipping."
|
||||
+ if [ -d ${LAPTOP_MODE_CONFIG_DIR}/conf.d ] ; then
|
||||
+ for subdir in conf.d conf.d/board-specific; do
|
||||
+ if [ ! -d ${LAPTOP_MODE_CONFIG_DIR}/$subdir ]; then
|
||||
+ continue
|
||||
fi
|
||||
+ for CONF in ${LAPTOP_MODE_CONFIG_DIR}/$subdir/*.conf; do
|
||||
+ if [ -r "$CONF" ] ; then
|
||||
+ . "$CONF"
|
||||
+ #Handle individual module debug settings
|
||||
+ if [ "$DEBUG" -eq 1 ]; then
|
||||
+ export $(basename $CONF | cut -d . -f1 | tr "[:lower:]" "[:upper:]" | \
|
||||
+ sed 's/-/_/g')_DEBUG=1
|
||||
+ log "VERBOSE" "Enabling debug mode for module $CONF"
|
||||
+ fi
|
||||
+ DEBUG=0
|
||||
+ else
|
||||
+ log "MSG" "Warning: Configuration file $CONF is not readable, skipping."
|
||||
+ fi
|
||||
+ done
|
||||
done
|
||||
fi
|
||||
- if [ -r /etc/laptop-mode/laptop-mode.conf ] ; then
|
||||
- . /etc/laptop-mode/laptop-mode.conf
|
||||
+ if [ -r ${LAPTOP_MODE_CONFIG_DIR}/laptop-mode.conf ] ; then
|
||||
+ . ${LAPTOP_MODE_CONFIG_DIR}/laptop-mode.conf
|
||||
else
|
||||
- log "ERR" "$0: Configuration file /etc/laptop-mode/laptop-mode.conf not present or not readable."
|
||||
- exit 1
|
||||
+ log "ERR" "$0: Configuration file ${LAPTOP_MODE_CONFIG_DIR}/laptop-mode.conf not present or not readable.";
|
||||
+ exit 1;
|
||||
fi
|
||||
|
||||
if [ x$ENABLE_LAPTOP_MODE_TOOLS = x0 ]; then
|
||||
@@ -1049,7 +1061,7 @@
|
||||
|
||||
# Note that the /usr/local/lib path is deprecated.
|
||||
export FORCE STATE ON_AC ACTIVATE ACTIVATE_WITH_POSSIBLE_DATA_LOSS KLEVEL KMINOR WAS_ACTIVE LM_VERBOSE DEVICES
|
||||
- for SCRIPT in /usr/share/laptop-mode-tools/modules/* /usr/local/lib/laptop-mode-tools/modules/* /usr/local/share/laptop-mode-tools/modules/* /etc/laptop-mode/modules/* ; do
|
||||
+ for SCRIPT in /usr/share/laptop-mode-tools/modules/* /usr/local/lib/laptop-mode-tools/modules/* /usr/local/share/laptop-mode-tools/modules/* ${LAPTOP_MODE_CONFIG_DIR}/modules/* ; do
|
||||
# Skip failed globs
|
||||
[ -f "$SCRIPT" ] || continue
|
||||
|
@ -1,42 +0,0 @@
|
||||
--- laptop-mode-tools-1.59//usr/share/laptop-mode-tools/modules/cpufreq 2011-08-07 12:30:43.000000000 -0700
|
||||
+++ laptop-mode-tools-1.59//usr/share/laptop-mode-tools/modules/cpufreq 2012-06-20 11:46:24.465328480 -0700
|
||||
@@ -139,3 +139,39 @@
|
||||
done
|
||||
fi
|
||||
|
||||
+# Optional setting for the interactive governor.
|
||||
+INTERACTIVE_DIR=/sys/devices/system/cpu/cpufreq/interactive
|
||||
+
|
||||
+get_setting() {
|
||||
+ if [ $ON_AC -eq 1 ] ; then
|
||||
+ if [ "$ACTIVATE" -eq 1 ] ; then
|
||||
+ eval echo \$"LM_AC_CPU_"$1
|
||||
+ else
|
||||
+ eval echo \$"NOLM_AC_CPU_"$1
|
||||
+ fi
|
||||
+ else
|
||||
+ eval echo \$"BATT_CPU_"$1
|
||||
+ fi
|
||||
+}
|
||||
+
|
||||
+set_optional_interactive_value() {
|
||||
+ sysfs_name=$1
|
||||
+ config_value=$(get_setting $2)
|
||||
+
|
||||
+ if [ -z "${config_value}" ]; then
|
||||
+ return;
|
||||
+ fi
|
||||
+ if [ -f ${INTERACTIVE_DIR}/$sysfs_name ]; then
|
||||
+ log "VERBOSE" "Setting $sysfs_name for all cpus"
|
||||
+ set_sysctl $INTERACTIVE_DIR/$sysfs_name ${config_value}
|
||||
+ fi
|
||||
+}
|
||||
+
|
||||
+if [ -d ${INTERACTIVE_DIR} ]; then
|
||||
+ set_optional_interactive_value input_boost INPUT_BOOST
|
||||
+ set_optional_interactive_value above_hispeed_delay ABOVE_HISPEED_DELAY
|
||||
+ set_optional_interactive_value go_hispeed_load GO_HISPEED_LOAD
|
||||
+ set_optional_interactive_value hispeed_freq HISPEED_FREQ
|
||||
+ set_optional_interactive_value min_sample_time MIN_SAMPLE_TIME
|
||||
+ set_optional_interactive_value timer_rate TIMER_RATE
|
||||
+fi
|
@ -1,12 +0,0 @@
|
||||
--- laptop-mode-tools-1.59/etc/laptop-mode/conf.d/cpufreq.conf
|
||||
+++ laptop-mode-tools-1.59/etc/laptop-mode/conf.d/cpufreq.conf
|
||||
@@ -31,7 +31,7 @@
|
||||
# Should laptop mode tools control the CPU frequency settings?
|
||||
#
|
||||
# Set to 0 to disable
|
||||
-CONTROL_CPU_FREQUENCY="auto"
|
||||
+CONTROL_CPU_FREQUENCY=0
|
||||
|
||||
|
||||
#
|
||||
|
@ -1,14 +0,0 @@
|
||||
--- laptop-mode-tools-1.59/usr/sbin/laptop_mode
|
||||
+++ laptop-mode-tools-1.59/usr/sbin/laptop_mode
|
||||
@@ -807,7 +807,9 @@ lmt_main_function ()
|
||||
fi
|
||||
|
||||
# $BATT/alarm is the design_capacity_warning of a battery.
|
||||
- ALARM_LEVEL=$(cat $BATT/alarm)
|
||||
+ ALARM_LEVEL=0
|
||||
+ ALARM_FILE=$BATT/alarm
|
||||
+ if [ -f $ALARM_FILE ]; then ALARM_LEVEL=$(cat $ALARM_FILE); fi
|
||||
if [ "$ALARM_LEVEL" -ne 0 ] ; then
|
||||
if [ "$REMAINING" -le "$ALARM_LEVEL" ] ; then
|
||||
# Restore the state we had before checking this battery, so that
|
||||
|
@ -1,48 +0,0 @@
|
||||
--- laptop-mode-tools-1.59/etc/laptop-mode/conf.d/runtime-pm.conf 2011-08-07 12:30:43.000000000 -0700
|
||||
+++ laptop-mode-tools-1.59/etc/laptop-mode/conf.d/runtime-pm.conf 2012-10-17 16:45:20.311104691 -0700
|
||||
@@ -25,3 +25,7 @@ CONTROL_RUNTIME_PM="auto"
|
||||
# Enable debug mode for this module
|
||||
# Set to 1 if you want to debug this module
|
||||
DEBUG=0
|
||||
+
|
||||
+# The list of devices that should not use Runtime Power Management by name.
|
||||
+# Example: RUNTIME_PM_NAME_BLACKLIST="isl29018 cyapa"
|
||||
+RUNTIME_PM_NAME_BLACKLIST=""
|
||||
--- laptop-mode-tools-1.59/usr/share/laptop-mode-tools/modules/runtime-pm 2011-08-07 12:30:43.000000000 -0700
|
||||
+++ laptop-mode-tools-1.59/usr/share/laptop-mode-tools/modules/runtime-pm 2012-10-17 16:39:27.467105016 -0700
|
||||
@@ -3,12 +3,33 @@
|
||||
# Laptop mode tools module: Runtime Power Management
|
||||
#
|
||||
|
||||
+# Check whether a device is listed by name
|
||||
+listed_by_name() {
|
||||
+ device=$1
|
||||
+ list=$2
|
||||
+ for name in $list; do
|
||||
+ grep -qi $name $device/name 2>/dev/null\
|
||||
+ && return 0
|
||||
+ done
|
||||
+ return 1
|
||||
+}
|
||||
+
|
||||
+# Checks whether a device is blacklisted by name
|
||||
+blacklisted() {
|
||||
+ listed_by_name $1 "$RUNTIME_PM_NAME_BLACKLIST" || return 1
|
||||
+ return 0
|
||||
+}
|
||||
|
||||
activate_runtime_suspend() {
|
||||
for device in $1/*; do
|
||||
if [ -f $device/power/control ]; then
|
||||
- echo "auto" > $device/power/control;
|
||||
- log "VERBOSE" "Setting Runtime PM auto for device $device"
|
||||
+ if ! blacklisted $device; then
|
||||
+ echo "auto" > $device/power/control;
|
||||
+ log "VERBOSE" "Setting Runtime PM auto for device $device"
|
||||
+ else
|
||||
+ echo "on" > $device/power/control;
|
||||
+ log "VERBOSE" "Setting on for blacklisted device $device"
|
||||
+ fi
|
||||
else
|
||||
log "VERBOSE" "$device does not support Runtime PM"
|
||||
fi
|
@ -1 +0,0 @@
|
||||
laptop-mode-tools-1.59.ebuild
|
@ -1,105 +0,0 @@
|
||||
# Copyright 1999-2009 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="2"
|
||||
|
||||
inherit eutils
|
||||
|
||||
DESCRIPTION="Linux kernel laptop_mode user-space utilities"
|
||||
HOMEPAGE="http://www.samwel.tk/laptop_mode/"
|
||||
SRC_URI="http://samwel.tk/laptop_mode/tools/downloads/laptop-mode-tools_1.59.tar.gz"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 arm x86"
|
||||
|
||||
IUSE="-acpi -apm bluetooth -hal -scsi"
|
||||
|
||||
DEPEND=""
|
||||
|
||||
RDEPEND="sys-apps/ethtool
|
||||
acpi? ( sys-power/acpid )
|
||||
apm? ( sys-apps/apmd )
|
||||
bluetooth? (
|
||||
|| (
|
||||
net-wireless/bluez
|
||||
net-wireless/bluez-utils
|
||||
)
|
||||
)
|
||||
hal? ( sys-apps/hal )
|
||||
net-wireless/iw
|
||||
scsi? ( sys-apps/sdparm )
|
||||
sys-apps/hdparm"
|
||||
|
||||
PATCHES=( "0001-Enabled-laptop-mode-power-management-control-of.patch" \
|
||||
"0002-Add-config-knob-to-control-syslog-facility.patch" \
|
||||
"0003-Add-WiFi-power-management-support.patch" \
|
||||
"0005-switch-wifi-support-to-nl80211.patch" \
|
||||
"0006-Lower-hard-drive-idle-timeout-to-5-seconds.patch" \
|
||||
"0008-Export-PATH-to-which.patch" \
|
||||
"0009-only-log-VERBOSE-msgs-to-syslog-when-DEBUG.patch" \
|
||||
"0010-Do-not-run-usb-autosuspend-for-user-input-devices.patch" \
|
||||
"0012-Skip-failed-globs-when-finding-module-scripts.patch" \
|
||||
"0013-wireless-power-can-not-find-iwconfig-but-tries-to-po.patch" \
|
||||
"0014-Disable-ethernet-control.patch" \
|
||||
"0015-Disable-file-system-remount.patch" \
|
||||
"0016-Wait-for-laptop_mode-using-shell-commands.patch" \
|
||||
"0017-usb-autosuspend-black-whitelist-in-quotes.patch" \
|
||||
"0018-hdparm-check-for-valid-drive.patch" \
|
||||
"0019-board-specific-configurations.patch" \
|
||||
"0020-hdparm-skips-SSDs-for-power-management.patch" \
|
||||
"0021-alternate-config-dir.patch" \
|
||||
"0022-interactive-governor-parameters.patch" \
|
||||
"0023-disable-cpufreq-frequency-control.patch" \
|
||||
"0024-check-for-existence-of-alarm-file.patch" \
|
||||
"0025-add-blacklists-for-runtime-pm.patch" \
|
||||
)
|
||||
|
||||
src_unpack() {
|
||||
unpack ${A}
|
||||
for PATCH in "${PATCHES[@]}"; do
|
||||
epatch "${FILESDIR}/$PATCH"
|
||||
done
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local ignore="laptop-mode nmi-watchdog"
|
||||
|
||||
dodir /etc/pm/sleep.d
|
||||
|
||||
for module in ${ignore}; do
|
||||
rm usr/share/laptop-mode-tools/modules/${module}
|
||||
done
|
||||
|
||||
DESTDIR="${D}" \
|
||||
MAN_D="/usr/share/man" \
|
||||
INIT_D="none" \
|
||||
APM="$(use apm && echo force || echo disabled)" \
|
||||
ACPI="$(use acpi && echo force || echo disabled)" \
|
||||
PMU="$(use pmu && echo force || echo disabled)" \
|
||||
./install.sh || die "Install failed."
|
||||
|
||||
dodoc Documentation/laptop-mode.txt README
|
||||
newinitd "${FILESDIR}"/laptop_mode.init-1.4 laptop_mode
|
||||
|
||||
exeinto /etc/pm/power.d
|
||||
newexe "${FILESDIR}"/laptop_mode_tools.pmutils laptop_mode_tools
|
||||
|
||||
insinto /lib/udev/rules.d
|
||||
doins etc/rules/99-laptop-mode.rules
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if ! use acpi && ! use apm; then
|
||||
ewarn
|
||||
ewarn "Without USE=\"acpi\" or USE=\"apm\" ${PN} can not"
|
||||
ewarn "automatically disable laptop_mode on low battery."
|
||||
ewarn
|
||||
ewarn "This means you can lose up to 10 minutes of work if running"
|
||||
ewarn "out of battery while laptop_mode is enabled."
|
||||
ewarn
|
||||
ewarn "Please see /usr/share/doc/${PF}/laptop-mode.txt.gz for further"
|
||||
ewarn "information."
|
||||
ewarn
|
||||
fi
|
||||
}
|
@ -1 +0,0 @@
|
||||
DIST ddccontrol-0.4.2.tar.bz2 421475 SHA256 986f3b4b27ec04e1da493de3aaab01cd5ea9566d7572c1a40b8d43cd7a491e84 SHA512 9e83570a7b481cec35a4f11e690a77b497067c88f97cee7c1927804991d41ca77cfc21edc98b915601c8807d661ea0fcdbb57ca330e8678b6f5fbfb96e4585a8 WHIRLPOOL 63e4fc2e80317bd17f8dac497b6a3985aec463a2ceea16677fd02183478c10c9bd16fca111e76978b5785b7d2b070773d6508637a5b0c6b9d673ccf22089ec0d
|
@ -1 +0,0 @@
|
||||
ddccontrol-0.4.2.ebuild
|
@ -1,78 +0,0 @@
|
||||
# Copyright 1999-2010 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/app-misc/ddccontrol/ddccontrol-0.4.2.ebuild,v 1.8 2010/01/01 18:08:47 ssuominen Exp $
|
||||
|
||||
inherit eutils autotools
|
||||
|
||||
DESCRIPTION="DDCControl allows control of monitor parameters via DDC"
|
||||
HOMEPAGE="http://ddccontrol.sourceforge.net/"
|
||||
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 ppc x86"
|
||||
IUSE="gtk gnome doc nls ddcpci"
|
||||
|
||||
RDEPEND="dev-libs/libxml2
|
||||
gtk? ( >=x11-libs/gtk+-2.4 )
|
||||
gnome? ( >=gnome-base/gnome-panel-2.10 )
|
||||
sys-apps/pciutils
|
||||
nls? ( sys-devel/gettext )
|
||||
>=app-misc/ddccontrol-db-20060730"
|
||||
DEPEND="${RDEPEND}
|
||||
dev-perl/XML-Parser
|
||||
dev-util/intltool
|
||||
doc? ( >=app-text/docbook-xsl-stylesheets-1.65.1
|
||||
>=dev-libs/libxslt-1.1.6
|
||||
app-text/htmltidy )
|
||||
sys-kernel/linux-headers"
|
||||
|
||||
src_unpack() {
|
||||
unpack ${A}
|
||||
cd "${S}"
|
||||
epatch "${FILESDIR}"/${P}-pciutils-libz.patch
|
||||
|
||||
# Fix sandbox violation
|
||||
for i in Makefile.am Makefile.in; do
|
||||
sed -i.orig "${S}/src/gddccontrol/${i}" \
|
||||
-e "/@INSTALL@/s/ \$(datadir)/ \$(DESTDIR)\/\$(datadir)/" \
|
||||
|| die "Failed to fix DESTDIR"
|
||||
done
|
||||
|
||||
# ppc/ppc64 do not have inb/outb/ioperm
|
||||
# they also do not have (sys|asm)/io.h
|
||||
if [ "${ARCH/64}" == "ppc" ]; then
|
||||
for card in sis intel810 ; do
|
||||
sed -r -i \
|
||||
-e "/${card}.Po/d" \
|
||||
-e "s~${card}[^[:space:]]*~ ~g" \
|
||||
src/ddcpci/Makefile.in
|
||||
sed -r -i \
|
||||
-e "/${card}.Po/d" \
|
||||
-e "s~${card}[^[:space:]]*~ ~g" \
|
||||
src/ddcpci/Makefile.am
|
||||
done
|
||||
sed -i \
|
||||
-e '/sis_/d' \
|
||||
-e '/i810_/d' \
|
||||
src/ddcpci/main.c
|
||||
fi
|
||||
|
||||
## Save for a rainy day or future patching
|
||||
eautoreconf || die "eautoreconf failed"
|
||||
intltoolize --force || die "intltoolize failed"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
econf $(use_enable doc) \
|
||||
$(use_enable gtk gnome) \
|
||||
$(use_enable gnome gnome-applet) \
|
||||
$(use_enable nls) \
|
||||
$(use_enable ddcpci) || die "econf failed"
|
||||
emake || die "emake failed"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
make DESTDIR="${D}" htmldir="/usr/share/doc/${PF}/html" install || die
|
||||
dodoc AUTHORS ChangeLog NEWS README TODO
|
||||
}
|
@ -1,19 +0,0 @@
|
||||
Index: configure.ac
|
||||
===================================================================
|
||||
RCS file: /cvsroot/ddccontrol/ddccontrol/configure.ac,v
|
||||
retrieving revision 1.40
|
||||
diff -u -r1.40 configure.ac
|
||||
--- configure.ac 26 Jul 2006 22:02:15 -0000 1.40
|
||||
+++ configure.ac 1 Mar 2007 14:49:35 -0000
|
||||
@@ -101,7 +101,10 @@
|
||||
DDCPCI=
|
||||
if test x$support_ddcpci = xyes; then
|
||||
AC_CHECK_HEADERS([pci/pci.h], [], [AC_MSG_ERROR([PCI utils headers not found, please install pci-utils.], [1])], [])
|
||||
- AC_CHECK_LIB([pci], [pci_alloc], [], [AC_MSG_ERROR([PCI utils library not found, please install pci-utils.], [1])])
|
||||
+ AC_CHECK_LIB([pci], [pci_alloc], [], [
|
||||
+ AC_CHECK_LIB([z], [gzopen], [], [AC_MSG_ERROR([PCI utils library not found, please install pci-utils.], [1])])
|
||||
+ AC_CHECK_LIB([pci], [pci_fill_info], [], [AC_MSG_ERROR([PCI utils library not found, please install pci-utils.], [1])], [-lz])
|
||||
+ ])
|
||||
DDCPCI=ddcpci
|
||||
AC_DEFINE_UNQUOTED(HAVE_DDCPCI, 1, [Define if ddccontrol is built with ddcpci support.])
|
||||
fi
|
@ -1 +0,0 @@
|
||||
DIST utouch-evemu-1.0.5.tar.gz 306237 SHA256 407378d4271a6be7688ae0f7bcdf0839b2bcade38ed8cf0d9672dfe228d8babf SHA512 22042d6dca6dcaad75fd914de93872b866c4e5f0fe14971d5e1cde7df6549e3d3488be0a138ca2fb57ad211f44a4e6ff5227936a34258f4f9e2bcd9b8dd666f4 WHIRLPOOL 5886c4fe42bee38a11ef9ffcfa843a9eb5115b8b8f8d4899128fca3926afab361bd5ab84a7a5daa69a790c2edf43000a2320fb813965ced700def1458c42ad23
|
@ -1,43 +0,0 @@
|
||||
From 47fb64c4ed657bf71579c03fc452129ae8292b88 Mon Sep 17 00:00:00 2001
|
||||
From: Dennis Kempin <denniskempin@chromium.org>
|
||||
Date: Thu, 7 Jun 2012 13:53:48 -0700
|
||||
Subject: [PATCH 2/2] Added absinfo.resolution to file format
|
||||
|
||||
This change will update the file format to include the resolution
|
||||
field when serializing absinfo structures.
|
||||
The read code allows the resolution field to be option to stay
|
||||
compatible with old files
|
||||
---
|
||||
src/evemu.c | 9 +++++----
|
||||
1 files changed, 5 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/evemu.c b/src/evemu.c
|
||||
index 8501933..29a2c69 100644
|
||||
--- a/src/evemu.c
|
||||
+++ b/src/evemu.c
|
||||
@@ -234,8 +234,9 @@ static void write_mask(FILE * fp, int index,
|
||||
|
||||
static void write_abs(FILE *fp, int index, const struct input_absinfo *abs)
|
||||
{
|
||||
- fprintf(fp, "A: %02x %d %d %d %d\n", index,
|
||||
- abs->minimum, abs->maximum, abs->fuzz, abs->flat);
|
||||
+ fprintf(fp, "A: %02x %d %d %d %d %d\n", index,
|
||||
+ abs->minimum, abs->maximum, abs->fuzz, abs->flat,
|
||||
+ abs->resolution);
|
||||
}
|
||||
|
||||
int evemu_write(const struct evemu_device *dev, FILE *fp)
|
||||
@@ -288,8 +289,8 @@ static void read_abs(struct evemu_device *dev, FILE *fp)
|
||||
{
|
||||
struct input_absinfo abs = {0};
|
||||
int index;
|
||||
- while (fscanf(fp, "A: %02x %d %d %d %d\n", &index,
|
||||
- &abs.minimum, &abs.maximum, &abs.fuzz, &abs.flat) > 0)
|
||||
+ while (fscanf(fp, "A: %02x %d %d %d %d %d\n", &index, &abs.minimum,
|
||||
+ &abs.maximum, &abs.fuzz, &abs.flat, &abs.resolution) > 0)
|
||||
dev->abs[index] = abs;
|
||||
}
|
||||
|
||||
--
|
||||
1.7.7.3
|
||||
|
@ -1,178 +0,0 @@
|
||||
diff --git a/include/evemu.h b/include/evemu.h
|
||||
index e4ce667..05cef0f 100644
|
||||
--- a/include/evemu.h
|
||||
+++ b/include/evemu.h
|
||||
@@ -282,10 +282,25 @@ int evemu_read_event_realtime(FILE *fp, struct input_event *ev,
|
||||
int evemu_record(FILE *fp, int fd, int ms);
|
||||
|
||||
/**
|
||||
+ * insert_slot0() - insert a slot0 event
|
||||
+ * @fp: file pointer to read the event from
|
||||
+ * @ev: pointer to the kernel event to be filled
|
||||
+ * @evtime: pointer to a timeval struct
|
||||
+ *
|
||||
+ * Read events until an EV_SYN/SYN_REPORT event is reached, and insert a slot0
|
||||
+ * event. However, if a slot0 event exists already, do not insert anything.
|
||||
+ *
|
||||
+ * Returns 1 if a slot0 event is created and inserted, 0 if a slot0 event
|
||||
+ * exists already.
|
||||
+ */
|
||||
+int insert_slot0(FILE *fp, struct input_event *ev, struct timeval *evtime);
|
||||
+
|
||||
+/**
|
||||
* evemu_play() - replay events from file to kernel device in realtime
|
||||
* @fp: file pointer to read the events from
|
||||
* @fd: file descriptor of kernel device to write to
|
||||
* @fp_time: file descriptor for keeping playback timing information
|
||||
+ * @flag_slot0: flag indicating whether to insert a slot 0 event or not
|
||||
*
|
||||
* Contiuously reads events from the file and writes them to the
|
||||
* kernel device, in realtime. The function terminates when end of
|
||||
@@ -293,7 +308,7 @@ int evemu_record(FILE *fp, int fd, int ms);
|
||||
*
|
||||
* Returns zero if successful, negative error otherwise.
|
||||
*/
|
||||
-int evemu_play(FILE *fp, int fd, FILE *fp_time);
|
||||
+int evemu_play(FILE *fp, int fd, FILE *fp_time, int flag_slot0);
|
||||
|
||||
/**
|
||||
* evemu_create() - create a kernel device from the evemu configuration
|
||||
diff --git a/src/evemu.c b/src/evemu.c
|
||||
index 02377f1..9d34101 100644
|
||||
--- a/src/evemu.c
|
||||
+++ b/src/evemu.c
|
||||
@@ -65,6 +65,14 @@
|
||||
|
||||
#define SYSCALL(call) while (((call) == -1) && (errno == EINTR))
|
||||
|
||||
+/* To determine if this is a synchronization event */
|
||||
+#define EVENT_SYN(type, code, value) \
|
||||
+ (type == EV_SYN && code == SYN_REPORT && value == 0)
|
||||
+
|
||||
+/* To determine if this is a slot n event */
|
||||
+#define EVENT_SLOT(type, code, value, n) \
|
||||
+ (type == EV_ABS && code == ABS_MT_SLOT && value == n)
|
||||
+
|
||||
static void copy_bits(unsigned char *mask, const unsigned long *bits, int bytes)
|
||||
{
|
||||
int i;
|
||||
@@ -378,16 +386,57 @@ int evemu_read_event_realtime(FILE *fp, struct input_event *ev,
|
||||
return ret;
|
||||
}
|
||||
|
||||
-int evemu_play(FILE *fp, int fd, FILE *fp_time)
|
||||
+int insert_slot0(FILE *fp, struct input_event *ev, struct timeval *evtime)
|
||||
+{
|
||||
+ int flag_ev0_time = 1;
|
||||
+
|
||||
+ while (evemu_read_event(fp, ev) > 0) {
|
||||
+ if (flag_ev0_time) {
|
||||
+ *evtime = ev->time;
|
||||
+ flag_ev0_time = 0;
|
||||
+ }
|
||||
+ if (EVENT_SLOT(ev->type, ev->code, ev->value, 0)) {
|
||||
+ rewind(fp);
|
||||
+ return 0;
|
||||
+ } else if (EVENT_SYN(ev->type, ev->code, ev->value)) {
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (evtime->tv_usec > 0) {
|
||||
+ evtime->tv_usec--;
|
||||
+ } else if (evtime->tv_sec > 0) {
|
||||
+ evtime->tv_usec = 999999;
|
||||
+ evtime->tv_sec--;
|
||||
+ } else {
|
||||
+ evtime->tv_usec = 0;
|
||||
+ evtime->tv_sec = 0;
|
||||
+ }
|
||||
+ ev->time = *evtime;
|
||||
+ ev->type = EV_ABS;
|
||||
+ ev->code = ABS_MT_SLOT;
|
||||
+ ev->value = 0;
|
||||
+ rewind(fp);
|
||||
+
|
||||
+ return 1;
|
||||
+}
|
||||
+
|
||||
+int evemu_play(FILE *fp, int fd, FILE *fp_time, int flag_slot0)
|
||||
{
|
||||
struct input_event ev;
|
||||
struct timeval evtime;
|
||||
struct timespec curr_tp;
|
||||
int ret;
|
||||
+ int flag_slot0_inserted = 0;
|
||||
char *time_format = "E: %lu.%06u %04x %04x %-4d -- playback %lu.%09u\n";
|
||||
|
||||
memset(&evtime, 0, sizeof(evtime));
|
||||
- while (evemu_read_event_realtime(fp, &ev, &evtime) > 0) {
|
||||
+ if (flag_slot0) {
|
||||
+ flag_slot0_inserted = insert_slot0(fp, &ev, &evtime);
|
||||
+ }
|
||||
+
|
||||
+ while (flag_slot0_inserted ||
|
||||
+ evemu_read_event_realtime(fp, &ev, &evtime) > 0) {
|
||||
if (fp_time != NULL) {
|
||||
clock_gettime(CLOCK_MONOTONIC, &curr_tp);
|
||||
fprintf(fp_time, time_format,
|
||||
@@ -396,6 +445,7 @@ int evemu_play(FILE *fp, int fd, FILE *fp_time)
|
||||
curr_tp.tv_sec, curr_tp.tv_nsec);
|
||||
}
|
||||
SYSCALL(ret = write(fd, &ev, sizeof(ev)));
|
||||
+ flag_slot0_inserted = 0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
diff --git a/tools/evemu-play.c b/tools/evemu-play.c
|
||||
index f66275e..c2aef3e 100644
|
||||
--- a/tools/evemu-play.c
|
||||
+++ b/tools/evemu-play.c
|
||||
@@ -50,9 +50,12 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
int fd;
|
||||
FILE *fp_time = NULL;
|
||||
- if (argc < 2 || argc > 3) {
|
||||
- fprintf(stderr, "Usage: %s <device> [output_file]\n", argv[0]);
|
||||
+ char *output_filename = NULL;
|
||||
+ int flag_slot0 = 0;
|
||||
+ if (argc < 2 || argc > 4) {
|
||||
+ fprintf(stderr, "Usage: %s <device> [--insert-slot0] [output_file]\n", argv[0]);
|
||||
fprintf(stderr, "\n");
|
||||
+ fprintf(stderr, "--insert-slot0: insert a slot 0 event if missing in the very first packet.\n");
|
||||
fprintf(stderr, "Event data is read from standard input.\n");
|
||||
return -1;
|
||||
}
|
||||
@@ -61,15 +64,25 @@ int main(int argc, char *argv[])
|
||||
fprintf(stderr, "error: could not open device\n");
|
||||
return -1;
|
||||
}
|
||||
- if (argc == 3) {
|
||||
- fp_time = fopen(argv[2], "w");
|
||||
- if (fp_time == NULL) {
|
||||
- fprintf(stderr, "error: could not open output file %s.\n",
|
||||
- argv[2]);
|
||||
- return -1;
|
||||
+ if (argc >= 3) {
|
||||
+ if (strcmp(argv[2], "--insert-slot0") == 0) {
|
||||
+ flag_slot0 = 1;
|
||||
+ if (argc == 4) {
|
||||
+ output_filename = argv[3];
|
||||
+ }
|
||||
+ } else {
|
||||
+ output_filename = argv[2];
|
||||
+ }
|
||||
+ if (output_filename != NULL) {
|
||||
+ fp_time = fopen(output_filename, "w");
|
||||
+ if (fp_time == NULL) {
|
||||
+ fprintf(stderr, "error: could not open output file %s.\n",
|
||||
+ output_filename);
|
||||
+ return -1;
|
||||
+ }
|
||||
}
|
||||
}
|
||||
- if (evemu_play(stdin, fd, fp_time)) {
|
||||
+ if (evemu_play(stdin, fd, fp_time, flag_slot0)) {
|
||||
fprintf(stderr, "error: could not describe device\n");
|
||||
}
|
||||
if (fp_time != NULL) {
|
@ -1,28 +0,0 @@
|
||||
From a3e4e37ee67be28edc3daa78c97ce9a1e457b0b8 Mon Sep 17 00:00:00 2001
|
||||
From: Dennis Kempin <denniskempin@chromium.org>
|
||||
Date: Thu, 7 Jun 2012 17:50:19 -0700
|
||||
Subject: [PATCH 1/2] Fixed bug: absinfo not initialized
|
||||
|
||||
When reading device info from a file, the absinfo structure is not initialized.
|
||||
This causes fields that are not read from file to be set to undefined values.
|
||||
Fixed by initializing with zero.
|
||||
---
|
||||
src/evemu.c | 2 +-
|
||||
1 files changed, 1 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/src/evemu.c b/src/evemu.c
|
||||
index 9d34101..8501933 100644
|
||||
--- a/src/evemu.c
|
||||
+++ b/src/evemu.c
|
||||
@@ -286,7 +286,7 @@ static void read_mask(struct evemu_device *dev, FILE *fp)
|
||||
|
||||
static void read_abs(struct evemu_device *dev, FILE *fp)
|
||||
{
|
||||
- struct input_absinfo abs;
|
||||
+ struct input_absinfo abs = {0};
|
||||
int index;
|
||||
while (fscanf(fp, "A: %02x %d %d %d %d\n", &index,
|
||||
&abs.minimum, &abs.maximum, &abs.fuzz, &abs.flat) > 0)
|
||||
--
|
||||
1.7.7.3
|
||||
|
@ -1,106 +0,0 @@
|
||||
diff --git a/tools/evemu-play.c b/tools/evemu-play.c
|
||||
index c2aef3e..9c868a2 100644
|
||||
--- a/tools/evemu-play.c
|
||||
+++ b/tools/evemu-play.c
|
||||
@@ -45,43 +45,77 @@
|
||||
#include <fcntl.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
+#include <getopt.h>
|
||||
+
|
||||
+void usage(char *program_name) {
|
||||
+ fprintf(stderr, "Usage: %s [--insert-slot0] [--output output_file] <device>\n", program_name);
|
||||
+ fprintf(stderr, "\n");
|
||||
+ fprintf(stderr, "--insert-slot0: insert a slot 0 event if missing in the very first packet.\n");
|
||||
+ fprintf(stderr, "--output: specify the output file name.\n");
|
||||
+ fprintf(stderr, "Note: event data is read from standard input.\n");
|
||||
+}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
int fd;
|
||||
+ int c;
|
||||
+ int flag_slot0 = 0;
|
||||
FILE *fp_time = NULL;
|
||||
char *output_filename = NULL;
|
||||
- int flag_slot0 = 0;
|
||||
- if (argc < 2 || argc > 4) {
|
||||
- fprintf(stderr, "Usage: %s <device> [--insert-slot0] [output_file]\n", argv[0]);
|
||||
- fprintf(stderr, "\n");
|
||||
- fprintf(stderr, "--insert-slot0: insert a slot 0 event if missing in the very first packet.\n");
|
||||
- fprintf(stderr, "Event data is read from standard input.\n");
|
||||
+ char *device_name = NULL;
|
||||
+
|
||||
+ /* Get options */
|
||||
+ while (1) {
|
||||
+ static struct option long_options[] = {
|
||||
+ {"insert-slot0", no_argument, 0, 'i'},
|
||||
+ {"output", required_argument, 0, 'o'},
|
||||
+ {0, 0, 0, 0}
|
||||
+ };
|
||||
+ int option_index = 0;
|
||||
+ c = getopt_long(argc, argv, "io:", long_options, &option_index);
|
||||
+ if (c == -1)
|
||||
+ break;
|
||||
+ switch (c) {
|
||||
+ case 0:
|
||||
+ break;
|
||||
+ case 'i':
|
||||
+ flag_slot0 = 1;
|
||||
+ break;
|
||||
+ case 'o':
|
||||
+ output_filename = optarg;
|
||||
+ break;
|
||||
+ case '?':
|
||||
+ default:
|
||||
+ usage(argv[0]);
|
||||
+ return -1;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ /* Get command line argument: device */
|
||||
+ if (optind >= argc) {
|
||||
+ fprintf(stderr, "You need to supply the <device>.\n");
|
||||
+ usage(argv[0]);
|
||||
return -1;
|
||||
}
|
||||
- fd = open(argv[1], O_WRONLY);
|
||||
+ device_name = argv[optind];
|
||||
+
|
||||
+ /* Open the event device */
|
||||
+ fd = open(device_name, O_WRONLY);
|
||||
if (fd < 0) {
|
||||
- fprintf(stderr, "error: could not open device\n");
|
||||
+ fprintf(stderr, "Error: fail to open device %s\n", device_name);
|
||||
return -1;
|
||||
}
|
||||
- if (argc >= 3) {
|
||||
- if (strcmp(argv[2], "--insert-slot0") == 0) {
|
||||
- flag_slot0 = 1;
|
||||
- if (argc == 4) {
|
||||
- output_filename = argv[3];
|
||||
- }
|
||||
- } else {
|
||||
- output_filename = argv[2];
|
||||
- }
|
||||
- if (output_filename != NULL) {
|
||||
- fp_time = fopen(output_filename, "w");
|
||||
- if (fp_time == NULL) {
|
||||
- fprintf(stderr, "error: could not open output file %s.\n",
|
||||
- output_filename);
|
||||
- return -1;
|
||||
- }
|
||||
+
|
||||
+ /* Open the optional output file */
|
||||
+ if (output_filename != NULL) {
|
||||
+ fp_time = fopen(output_filename, "w");
|
||||
+ if (fp_time == NULL) {
|
||||
+ fprintf(stderr, "Error: fail to open output file %s.\n",
|
||||
+ output_filename);
|
||||
+ return -1;
|
||||
}
|
||||
}
|
||||
+
|
||||
if (evemu_play(stdin, fd, fp_time, flag_slot0)) {
|
||||
fprintf(stderr, "error: could not describe device\n");
|
||||
}
|
@ -1,113 +0,0 @@
|
||||
diff --git a/include/evemu.h b/include/evemu.h
|
||||
index 1f55d5c..e4ce667 100644
|
||||
--- a/include/evemu.h
|
||||
+++ b/include/evemu.h
|
||||
@@ -285,6 +285,7 @@ int evemu_record(FILE *fp, int fd, int ms);
|
||||
* evemu_play() - replay events from file to kernel device in realtime
|
||||
* @fp: file pointer to read the events from
|
||||
* @fd: file descriptor of kernel device to write to
|
||||
+ * @fp_time: file descriptor for keeping playback timing information
|
||||
*
|
||||
* Contiuously reads events from the file and writes them to the
|
||||
* kernel device, in realtime. The function terminates when end of
|
||||
@@ -292,7 +293,7 @@ int evemu_record(FILE *fp, int fd, int ms);
|
||||
*
|
||||
* Returns zero if successful, negative error otherwise.
|
||||
*/
|
||||
-int evemu_play(FILE *fp, int fd);
|
||||
+int evemu_play(FILE *fp, int fd, FILE *fp_time);
|
||||
|
||||
/**
|
||||
* evemu_create() - create a kernel device from the evemu configuration
|
||||
diff --git a/src/Makefile.in b/src/Makefile.in
|
||||
index 8468f02..6378196 100644
|
||||
--- a/src/Makefile.in
|
||||
+++ b/src/Makefile.in
|
||||
@@ -70,7 +70,7 @@ am__base_list = \
|
||||
am__installdirs = "$(DESTDIR)$(libdir)" \
|
||||
"$(DESTDIR)$(libutouch_evemuincludedir)"
|
||||
LTLIBRARIES = $(lib_LTLIBRARIES)
|
||||
-libutouch_evemu_la_LIBADD =
|
||||
+libutouch_evemu_la_LIBADD = -lrt
|
||||
am_libutouch_evemu_la_OBJECTS = evemu.lo
|
||||
libutouch_evemu_la_OBJECTS = $(am_libutouch_evemu_la_OBJECTS)
|
||||
libutouch_evemu_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
diff --git a/src/evemu.c b/src/evemu.c
|
||||
index df6b250..02377f1 100644
|
||||
--- a/src/evemu.c
|
||||
+++ b/src/evemu.c
|
||||
@@ -49,6 +49,8 @@
|
||||
#include <poll.h>
|
||||
#include <ctype.h>
|
||||
#include <unistd.h>
|
||||
+#include <sys/time.h>
|
||||
+#include <time.h>
|
||||
|
||||
#ifndef UI_SET_PROPBIT
|
||||
#define UI_SET_PROPBIT _IOW(UINPUT_IOCTL_BASE, 110, int)
|
||||
@@ -376,15 +378,25 @@ int evemu_read_event_realtime(FILE *fp, struct input_event *ev,
|
||||
return ret;
|
||||
}
|
||||
|
||||
-int evemu_play(FILE *fp, int fd)
|
||||
+int evemu_play(FILE *fp, int fd, FILE *fp_time)
|
||||
{
|
||||
struct input_event ev;
|
||||
struct timeval evtime;
|
||||
+ struct timespec curr_tp;
|
||||
int ret;
|
||||
+ char *time_format = "E: %lu.%06u %04x %04x %-4d -- playback %lu.%09u\n";
|
||||
|
||||
memset(&evtime, 0, sizeof(evtime));
|
||||
- while (evemu_read_event_realtime(fp, &ev, &evtime) > 0)
|
||||
+ while (evemu_read_event_realtime(fp, &ev, &evtime) > 0) {
|
||||
+ if (fp_time != NULL) {
|
||||
+ clock_gettime(CLOCK_MONOTONIC, &curr_tp);
|
||||
+ fprintf(fp_time, time_format,
|
||||
+ ev.time.tv_sec, ev.time.tv_usec,
|
||||
+ ev.type, ev.code, ev.value,
|
||||
+ curr_tp.tv_sec, curr_tp.tv_nsec);
|
||||
+ }
|
||||
SYSCALL(ret = write(fd, &ev, sizeof(ev)));
|
||||
+ }
|
||||
|
||||
return 0;
|
||||
}
|
||||
diff --git a/tools/evemu-play.c b/tools/evemu-play.c
|
||||
index 7b9b777..f66275e 100644
|
||||
--- a/tools/evemu-play.c
|
||||
+++ b/tools/evemu-play.c
|
||||
@@ -49,8 +49,9 @@
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
int fd;
|
||||
- if (argc != 2) {
|
||||
- fprintf(stderr, "Usage: %s <device>\n", argv[0]);
|
||||
+ FILE *fp_time = NULL;
|
||||
+ if (argc < 2 || argc > 3) {
|
||||
+ fprintf(stderr, "Usage: %s <device> [output_file]\n", argv[0]);
|
||||
fprintf(stderr, "\n");
|
||||
fprintf(stderr, "Event data is read from standard input.\n");
|
||||
return -1;
|
||||
@@ -60,9 +61,20 @@ int main(int argc, char *argv[])
|
||||
fprintf(stderr, "error: could not open device\n");
|
||||
return -1;
|
||||
}
|
||||
- if (evemu_play(stdin, fd)) {
|
||||
+ if (argc == 3) {
|
||||
+ fp_time = fopen(argv[2], "w");
|
||||
+ if (fp_time == NULL) {
|
||||
+ fprintf(stderr, "error: could not open output file %s.\n",
|
||||
+ argv[2]);
|
||||
+ return -1;
|
||||
+ }
|
||||
+ }
|
||||
+ if (evemu_play(stdin, fd, fp_time)) {
|
||||
fprintf(stderr, "error: could not describe device\n");
|
||||
}
|
||||
+ if (fp_time != NULL) {
|
||||
+ close(fp_time);
|
||||
+ }
|
||||
close(fd);
|
||||
return 0;
|
||||
}
|
@ -1,110 +0,0 @@
|
||||
From eec34acf18f7dd7320fc1be6ae2b3efb4ca9783d Mon Sep 17 00:00:00 2001
|
||||
From: Dennis Kempin <denniskempin@chromium.org>
|
||||
Date: Tue, 12 Jun 2012 15:56:24 -0700
|
||||
Subject: [PATCH] api extension: access to raw kernel input_ structures and
|
||||
bitmasks
|
||||
|
||||
This CL adds functions to the api that allow raw access to the
|
||||
input_id and input_absinfo structures as well as bitmasks.
|
||||
This allows the regression test suite to use the evemu API for
|
||||
reading device properties from files.
|
||||
|
||||
BUG=chromium-os:31732
|
||||
TEST=compiles. tested with regression test prototype.
|
||||
---
|
||||
include/evemu.h | 46 ++++++++++++++++++++++++++++++++++++++++++++++
|
||||
src/evemu.c | 26 ++++++++++++++++++++++++++
|
||||
2 files changed, 72 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/include/evemu.h b/include/evemu.h
|
||||
index 05cef0f..1fb8390 100644
|
||||
--- a/include/evemu.h
|
||||
+++ b/include/evemu.h
|
||||
@@ -329,4 +329,50 @@ int evemu_create(const struct evemu_device *dev, int fd);
|
||||
*/
|
||||
void evemu_destroy(int fd);
|
||||
|
||||
+/**
|
||||
+ * evemu_get_id() - raw access to kernel device id structure
|
||||
+ * @dev: the device in use
|
||||
+ *
|
||||
+ * Returns the kernel device id structure.
|
||||
+ */
|
||||
+struct input_id* evemu_get_id(const struct evemu_device *dev);
|
||||
+
|
||||
+/**
|
||||
+ * evemu_get_abs() - raw access to kernel absinfo structure
|
||||
+ * @dev: the device in use
|
||||
+ * @code: the event type code to query
|
||||
+ *
|
||||
+ * Returns the input_absinfo structure for provided event type code
|
||||
+ */
|
||||
+const struct info_absinfo*
|
||||
+evemu_get_abs(const struct evemu_device *dev, int code);
|
||||
+
|
||||
+/**
|
||||
+ * evemu_get_mask_size() - get the bitmask size
|
||||
+ * @dev: the device in use
|
||||
+ *
|
||||
+ * Returns the size of bitmasks as returned by evemu_get_prop_mask
|
||||
+ * or evemu_get_mask. Size in bytes.
|
||||
+ * The bitmask size is static and defined at compile time, but might conflict
|
||||
+ * when evemu and the calling library are using incompatible kernel header.
|
||||
+ */
|
||||
+int evemu_get_mask_size(const struct evemu_device *dev);
|
||||
+
|
||||
+/**
|
||||
+ * evemu_get_prop_mask() - raw access to the kernel property bitmask
|
||||
+ * @dev: the device in use
|
||||
+ *
|
||||
+ * Returns a pointer to the property bitmask
|
||||
+ */
|
||||
+const unsigned char* evemu_get_prop_mask(const struct evemu_device *dev);
|
||||
+
|
||||
+/**
|
||||
+ * evemu_get_mask() - raw access to event bitmasks
|
||||
+ * @dev: the device in use
|
||||
+ * @code: the event type code to query
|
||||
+ *
|
||||
+ * Returns a pointer to the queried bitmask.
|
||||
+ */
|
||||
+const unsigned char* evemu_get_mask(const struct evemu_device *dev, int code);
|
||||
+
|
||||
#endif
|
||||
diff --git a/src/evemu.c b/src/evemu.c
|
||||
index 29a2c69..0dd1cab 100644
|
||||
--- a/src/evemu.c
|
||||
+++ b/src/evemu.c
|
||||
@@ -564,3 +564,29 @@ void evemu_destroy(int fd)
|
||||
int ret;
|
||||
SYSCALL(ret = ioctl(fd, UI_DEV_DESTROY, NULL));
|
||||
}
|
||||
+
|
||||
+struct input_id* evemu_get_id(const struct evemu_device *dev)
|
||||
+{
|
||||
+ return &dev->id;
|
||||
+}
|
||||
+
|
||||
+const struct info_absinfo*
|
||||
+evemu_get_abs(const struct evemu_device *dev, int code)
|
||||
+{
|
||||
+ return &dev->abs[code];
|
||||
+}
|
||||
+
|
||||
+int evemu_get_mask_size(const struct evemu_device *dev)
|
||||
+{
|
||||
+ return EVPLAY_NBYTES;
|
||||
+}
|
||||
+
|
||||
+const unsigned char* evemu_get_prop_mask(const struct evemu_device *dev)
|
||||
+{
|
||||
+ return dev->prop;
|
||||
+}
|
||||
+
|
||||
+const unsigned char* evemu_get_mask(const struct evemu_device *dev, int code)
|
||||
+{
|
||||
+ return dev->mask[code];
|
||||
+}
|
||||
--
|
||||
1.7.7.3
|
||||
|
@ -1,32 +0,0 @@
|
||||
diff --git a/tools/evemu-record.c b/tools/evemu-record.c
|
||||
index afdd400..f75c0bb 100644
|
||||
--- a/tools/evemu-record.c
|
||||
+++ b/tools/evemu-record.c
|
||||
@@ -42,15 +42,26 @@
|
||||
|
||||
#include "evemu.h"
|
||||
#include <stdio.h>
|
||||
+#include <stdlib.h>
|
||||
#include <fcntl.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
+#include <signal.h>
|
||||
|
||||
#define WAIT_MS 10000
|
||||
|
||||
+int fd;
|
||||
+
|
||||
+void close_file()
|
||||
+{
|
||||
+ close(fd);
|
||||
+ exit(1);
|
||||
+}
|
||||
+
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
- int fd;
|
||||
+ signal(SIGINT, close_file);
|
||||
+ signal(SIGTERM, close_file);
|
||||
if (argc < 2) {
|
||||
fprintf(stderr, "Usage: %s <device>\n", argv[0]);
|
||||
return -1;
|
@ -1,48 +0,0 @@
|
||||
From da1ad19f039c303808d36d1cf318cfd44aae77a4 Mon Sep 17 00:00:00 2001
|
||||
From: Joseph Hwang <josephsih@chromium.org>
|
||||
Date: Wed, 30 Nov 2011 14:59:37 +0800
|
||||
Subject: [PATCH] 1.0.5-timeout
|
||||
|
||||
The second argument of evemu-record is used as a timeout value.
|
||||
The default timeout value for evemu-record is 10 seconds if no value
|
||||
is specified. If the timeout value is set to -1, evemu-record would
|
||||
not terminate until it receives the SIGINT or SIGTERM signal.
|
||||
---
|
||||
tools/evemu-record.c | 12 +++++++++---
|
||||
1 files changed, 9 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/tools/evemu-record.c b/tools/evemu-record.c
|
||||
index f75c0bb..4d29e7f 100644
|
||||
--- a/tools/evemu-record.c
|
||||
+++ b/tools/evemu-record.c
|
||||
@@ -60,10 +60,16 @@ void close_file()
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
+ int timeout;
|
||||
+ char *endp;
|
||||
+
|
||||
signal(SIGINT, close_file);
|
||||
signal(SIGTERM, close_file);
|
||||
- if (argc < 2) {
|
||||
- fprintf(stderr, "Usage: %s <device>\n", argv[0]);
|
||||
+
|
||||
+ timeout = argc == 3 ? strtol(argv[2], &endp, 10) : WAIT_MS;
|
||||
+ if (argc < 2 || argc > 3 || (argc == 3 && *endp != '\0')) {
|
||||
+ fprintf(stderr, "Usage: %s <device> [timeout_in_ms]\n",
|
||||
+ argv[0]);
|
||||
return -1;
|
||||
}
|
||||
fd = open(argv[1], O_RDONLY | O_NONBLOCK);
|
||||
@@ -71,7 +77,7 @@ int main(int argc, char *argv[])
|
||||
fprintf(stderr, "error: could not open device\n");
|
||||
return -1;
|
||||
}
|
||||
- if (evemu_record(stdout, fd, WAIT_MS)) {
|
||||
+ if (evemu_record(stdout, fd, timeout)) {
|
||||
fprintf(stderr, "error: could not describe device\n");
|
||||
}
|
||||
close(fd);
|
||||
--
|
||||
1.7.7.3
|
||||
|
@ -1,32 +0,0 @@
|
||||
# Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=2
|
||||
|
||||
inherit base
|
||||
|
||||
DESCRIPTION="To record and replay data from kernel evdev devices"
|
||||
HOMEPAGE="http://bitmath.org/code/evemu/"
|
||||
SRC_URI="http://launchpad.net/utouch-evemu/trunk/v${PV}/+download/${P}.tar.gz"
|
||||
LICENSE="GPL-3"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 x86 arm"
|
||||
IUSE="X"
|
||||
|
||||
RDEPEND="X? ( >=x11-base/xorg-server-1.8 )"
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/1.0.5-signal_exit.patch"
|
||||
"${FILESDIR}/1.0.5-timeout.patch"
|
||||
"${FILESDIR}/1.0.5-play_timestamp.patch"
|
||||
"${FILESDIR}/1.0.5-add_slot0.patch"
|
||||
"${FILESDIR}/1.0.5-getopt.patch"
|
||||
"${FILESDIR}/1.0.5-fix_init_absinfo.patch"
|
||||
"${FILESDIR}/1.0.5-add_resolution.patch"
|
||||
"${FILESDIR}/1.0.5-raw_access_api.patch"
|
||||
)
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install || die "install failed"
|
||||
}
|
@ -1,199 +0,0 @@
|
||||
# Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=2
|
||||
CROS_WORKON_COMMIT="366c9e7ff1c99364be8eea8e1accc5bcb301773b"
|
||||
CROS_WORKON_TREE="d003ce8d1ed1a8f362a169685fae11e7aedc0afe"
|
||||
CROS_WORKON_PROJECT="chromiumos/platform/assets"
|
||||
|
||||
inherit cros-workon toolchain-funcs
|
||||
|
||||
DESCRIPTION="Chrome OS assets (images, sounds, etc.)"
|
||||
HOMEPAGE="http://www.chromium.org/"
|
||||
SRC_URI=""
|
||||
LICENSE="BSD"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 arm x86"
|
||||
IUSE="alex lumpy lumpy64 mario tegra2-ldk"
|
||||
|
||||
DEPEND="media-fonts/croscorefonts
|
||||
media-fonts/droidfonts-cros
|
||||
x11-apps/xcursorgen"
|
||||
RDEPEND=""
|
||||
|
||||
REAL_CURSOR_NAMES="
|
||||
fleur
|
||||
hand2
|
||||
left_ptr
|
||||
sb_h_double_arrow
|
||||
sb_v_double_arrow
|
||||
top_left_corner
|
||||
top_right_corner
|
||||
xterm"
|
||||
|
||||
# These are cursors for which there is no file, but we want to use
|
||||
# one of the existing files. So we link them. The first one is an
|
||||
# X holdover from some mozilla bug, and without it, we will use the
|
||||
# default left_ptr_watch bitmap.
|
||||
LINK_CURSORS="
|
||||
08e8e1c95fe2fc01f976f1e063a24ccd:left_ptr_watch
|
||||
X_cursor:left_ptr
|
||||
arrow:left_ptr
|
||||
based_arrow_down:sb_v_double_arrow
|
||||
based_arrow_up:sb_v_double_arrow
|
||||
boat:left_ptr
|
||||
bogosity:left_ptr
|
||||
bottom_left_corner:top_right_corner
|
||||
bottom_right_corner:top_left_corner
|
||||
bottom_side:sb_v_double_arrow
|
||||
bottom_tee:sb_v_double_arrow
|
||||
box_spiral:left_ptr
|
||||
center_ptr:left_ptr
|
||||
circle:left_ptr
|
||||
clock:left_ptr
|
||||
coffee_mug:left_ptr
|
||||
diamond_cross:left_ptr
|
||||
dot:left_ptr
|
||||
dotbox:left_ptr
|
||||
double_arrow:sb_v_double_arrow
|
||||
draft_large:left_ptr
|
||||
draft_small:left_ptr
|
||||
draped_box:left_ptr
|
||||
exchange:left_ptr
|
||||
gobbler:left_ptr
|
||||
gumby:left_ptr
|
||||
hand1:hand2
|
||||
heart:left_ptr
|
||||
icon:left_ptr
|
||||
iron_cross:left_ptr
|
||||
left_ptr_watch:left_ptr
|
||||
left_side:sb_h_double_arrow
|
||||
left_tee:sb_h_double_arrow
|
||||
leftbutton:left_ptr
|
||||
ll_angle:top_right_corner
|
||||
lr_angle:top_left_corner
|
||||
man:left_ptr
|
||||
middlebutton:left_ptr
|
||||
mouse:left_ptr
|
||||
pencil:left_ptr
|
||||
pirate:left_ptr
|
||||
plus:left_ptr
|
||||
right_ptr:left_ptr
|
||||
right_side:sb_h_double_arrow
|
||||
right_tee:sb_h_double_arrow
|
||||
rightbutton:left_ptr
|
||||
rtl_logo:left_ptr
|
||||
sailboat:left_ptr
|
||||
sb_down_arrow:sb_v_double_arrow
|
||||
sb_left_arrow:sb_h_double_arrow
|
||||
sb_right_arrow:sb_h_double_arrow
|
||||
sb_up_arrow:sb_v_double_arrow
|
||||
shuttle:left_ptr
|
||||
sizing:top_left_corner
|
||||
spider:left_ptr
|
||||
spraycan:left_ptr
|
||||
star:left_ptr
|
||||
target:left_ptr
|
||||
tcross:left_ptr
|
||||
top_left_arrow:left_ptr
|
||||
top_side:sb_v_double_arrow
|
||||
top_tee:sb_v_double_arrow
|
||||
trek:left_ptr
|
||||
ul_angle:top_left_corner
|
||||
umbrella:left_ptr
|
||||
ur_angle:top_right_corner
|
||||
watch:left_ptr"
|
||||
|
||||
CROS_WORKON_LOCALNAME="assets"
|
||||
|
||||
src_install() {
|
||||
insinto /usr/share/chromeos-assets/images
|
||||
doins -r "${S}"/images/*
|
||||
|
||||
insinto /usr/share/chromeos-assets/images_100_percent
|
||||
doins -r "${S}"/images_100_percent/*
|
||||
|
||||
insinto /usr/share/chromeos-assets/images_200_percent
|
||||
doins -r "${S}"/images_200_percent/*
|
||||
|
||||
insinto /usr/share/chromeos-assets/text
|
||||
doins -r "${S}"/text/boot_messages
|
||||
dosbin "${S}"/text/display_boot_message
|
||||
|
||||
insinto /usr/share/chromeos-assets/gaia_auth
|
||||
doins -r "${S}"/gaia_auth/*
|
||||
|
||||
insinto /usr/share/chromeos-assets/input_methods
|
||||
doins "${S}"/input_methods/*
|
||||
|
||||
unzip "${S}"/accessibility/extensions/access_chromevox.zip
|
||||
insinto /usr/share/chromeos-assets/accessibility/extensions/access_chromevox
|
||||
doins -r "${S}"/chromevox_deploy/*
|
||||
|
||||
insinto /usr/share/chromeos-assets/crosh_builtin/
|
||||
unzip -d crosh_builtin_deploy/ "${S}"/chromeapps/crosh_builtin/crosh_builtin.zip
|
||||
|
||||
doins -r "${S}"/crosh_builtin_deploy/*
|
||||
|
||||
insinto /usr/share/fonts/chrome-droid
|
||||
doins "${S}"/fonts/ChromeDroid*.ttf
|
||||
|
||||
insinto /usr/share/color/bin
|
||||
if use mario; then
|
||||
newins "${S}"/color_profiles/mario.bin internal_display.bin
|
||||
elif use alex; then
|
||||
newins "${S}"/color_profiles/alex.bin internal_display.bin
|
||||
elif use lumpy; then
|
||||
newins "${S}"/color_profiles/lumpy.bin internal_display.bin
|
||||
fi
|
||||
|
||||
# Don't install cursors when building for Tegra, since the
|
||||
# current ARGB cursor implementation is performing badly,
|
||||
# and the fallback to 2-bit hardware cursor works better.
|
||||
# TODO: Remove this when the display driver has been fixed to
|
||||
# remove the performance bottlenecks.
|
||||
if ! use tegra2-ldk; then
|
||||
local CURSOR_DIR="${D}"/usr/share/cursors/xorg-x11/chromeos/cursors
|
||||
|
||||
mkdir -p "${CURSOR_DIR}"
|
||||
for i in ${REAL_CURSOR_NAMES}; do
|
||||
xcursorgen -p "${S}"/cursors "${S}"/cursors/$i.cfg >"${CURSOR_DIR}/$i"
|
||||
done
|
||||
|
||||
for i in ${LINK_CURSORS}; do
|
||||
ln -s ${i#*:} "${CURSOR_DIR}/${i%:*}"
|
||||
done
|
||||
fi
|
||||
|
||||
mkdir -p "${D}"/usr/share/cursors/xorg-x11/default
|
||||
echo Inherits=chromeos \
|
||||
>"${D}"/usr/share/cursors/xorg-x11/default/index.theme
|
||||
|
||||
#
|
||||
# Speech synthesis
|
||||
#
|
||||
|
||||
insinto /usr/share/chromeos-assets/speech_synthesis/patts
|
||||
|
||||
# Speech synthesis component extension code
|
||||
doins "${S}"/speech_synthesis/patts/manifest.json
|
||||
doins "${S}"/speech_synthesis/patts/tts_main.js
|
||||
doins "${S}"/speech_synthesis/patts/tts_service.nmf
|
||||
|
||||
# Speech synthesis voice data
|
||||
doins "${S}"/speech_synthesis/patts/voice_data_hmm_en-US.js
|
||||
unzip "${S}"/speech_synthesis/patts/voice_data_hmm_en-US.zip
|
||||
doins -r "${S}"/voice_data_hmm_en-US
|
||||
|
||||
# Speech synthesis engine (platform-specific native client module)
|
||||
if use arm ; then
|
||||
unzip "${S}"/speech_synthesis/patts/tts_service_pexe_arm.nexe.zip
|
||||
doins "${S}"/tts_service_pexe_arm.nexe
|
||||
elif use x86 ; then
|
||||
unzip "${S}"/speech_synthesis/patts/tts_service_x86-32.nexe.zip
|
||||
doins "${S}"/tts_service_x86-32.nexe
|
||||
elif use amd64 ; then
|
||||
unzip "${S}"/speech_synthesis/patts/tts_service_x86-64.nexe.zip
|
||||
doins "${S}"/tts_service_x86-64.nexe
|
||||
fi
|
||||
}
|
@ -1,197 +0,0 @@
|
||||
# Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=2
|
||||
CROS_WORKON_PROJECT="chromiumos/platform/assets"
|
||||
|
||||
inherit cros-workon toolchain-funcs
|
||||
|
||||
DESCRIPTION="Chrome OS assets (images, sounds, etc.)"
|
||||
HOMEPAGE="http://www.chromium.org/"
|
||||
SRC_URI=""
|
||||
LICENSE="BSD"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm ~x86"
|
||||
IUSE="alex lumpy lumpy64 mario tegra2-ldk"
|
||||
|
||||
DEPEND="media-fonts/croscorefonts
|
||||
media-fonts/droidfonts-cros
|
||||
x11-apps/xcursorgen"
|
||||
RDEPEND=""
|
||||
|
||||
REAL_CURSOR_NAMES="
|
||||
fleur
|
||||
hand2
|
||||
left_ptr
|
||||
sb_h_double_arrow
|
||||
sb_v_double_arrow
|
||||
top_left_corner
|
||||
top_right_corner
|
||||
xterm"
|
||||
|
||||
# These are cursors for which there is no file, but we want to use
|
||||
# one of the existing files. So we link them. The first one is an
|
||||
# X holdover from some mozilla bug, and without it, we will use the
|
||||
# default left_ptr_watch bitmap.
|
||||
LINK_CURSORS="
|
||||
08e8e1c95fe2fc01f976f1e063a24ccd:left_ptr_watch
|
||||
X_cursor:left_ptr
|
||||
arrow:left_ptr
|
||||
based_arrow_down:sb_v_double_arrow
|
||||
based_arrow_up:sb_v_double_arrow
|
||||
boat:left_ptr
|
||||
bogosity:left_ptr
|
||||
bottom_left_corner:top_right_corner
|
||||
bottom_right_corner:top_left_corner
|
||||
bottom_side:sb_v_double_arrow
|
||||
bottom_tee:sb_v_double_arrow
|
||||
box_spiral:left_ptr
|
||||
center_ptr:left_ptr
|
||||
circle:left_ptr
|
||||
clock:left_ptr
|
||||
coffee_mug:left_ptr
|
||||
diamond_cross:left_ptr
|
||||
dot:left_ptr
|
||||
dotbox:left_ptr
|
||||
double_arrow:sb_v_double_arrow
|
||||
draft_large:left_ptr
|
||||
draft_small:left_ptr
|
||||
draped_box:left_ptr
|
||||
exchange:left_ptr
|
||||
gobbler:left_ptr
|
||||
gumby:left_ptr
|
||||
hand1:hand2
|
||||
heart:left_ptr
|
||||
icon:left_ptr
|
||||
iron_cross:left_ptr
|
||||
left_ptr_watch:left_ptr
|
||||
left_side:sb_h_double_arrow
|
||||
left_tee:sb_h_double_arrow
|
||||
leftbutton:left_ptr
|
||||
ll_angle:top_right_corner
|
||||
lr_angle:top_left_corner
|
||||
man:left_ptr
|
||||
middlebutton:left_ptr
|
||||
mouse:left_ptr
|
||||
pencil:left_ptr
|
||||
pirate:left_ptr
|
||||
plus:left_ptr
|
||||
right_ptr:left_ptr
|
||||
right_side:sb_h_double_arrow
|
||||
right_tee:sb_h_double_arrow
|
||||
rightbutton:left_ptr
|
||||
rtl_logo:left_ptr
|
||||
sailboat:left_ptr
|
||||
sb_down_arrow:sb_v_double_arrow
|
||||
sb_left_arrow:sb_h_double_arrow
|
||||
sb_right_arrow:sb_h_double_arrow
|
||||
sb_up_arrow:sb_v_double_arrow
|
||||
shuttle:left_ptr
|
||||
sizing:top_left_corner
|
||||
spider:left_ptr
|
||||
spraycan:left_ptr
|
||||
star:left_ptr
|
||||
target:left_ptr
|
||||
tcross:left_ptr
|
||||
top_left_arrow:left_ptr
|
||||
top_side:sb_v_double_arrow
|
||||
top_tee:sb_v_double_arrow
|
||||
trek:left_ptr
|
||||
ul_angle:top_left_corner
|
||||
umbrella:left_ptr
|
||||
ur_angle:top_right_corner
|
||||
watch:left_ptr"
|
||||
|
||||
CROS_WORKON_LOCALNAME="assets"
|
||||
|
||||
src_install() {
|
||||
insinto /usr/share/chromeos-assets/images
|
||||
doins -r "${S}"/images/*
|
||||
|
||||
insinto /usr/share/chromeos-assets/images_100_percent
|
||||
doins -r "${S}"/images_100_percent/*
|
||||
|
||||
insinto /usr/share/chromeos-assets/images_200_percent
|
||||
doins -r "${S}"/images_200_percent/*
|
||||
|
||||
insinto /usr/share/chromeos-assets/text
|
||||
doins -r "${S}"/text/boot_messages
|
||||
dosbin "${S}"/text/display_boot_message
|
||||
|
||||
insinto /usr/share/chromeos-assets/gaia_auth
|
||||
doins -r "${S}"/gaia_auth/*
|
||||
|
||||
insinto /usr/share/chromeos-assets/input_methods
|
||||
doins "${S}"/input_methods/*
|
||||
|
||||
unzip "${S}"/accessibility/extensions/access_chromevox.zip
|
||||
insinto /usr/share/chromeos-assets/accessibility/extensions/access_chromevox
|
||||
doins -r "${S}"/chromevox_deploy/*
|
||||
|
||||
insinto /usr/share/chromeos-assets/crosh_builtin/
|
||||
unzip -d crosh_builtin_deploy/ "${S}"/chromeapps/crosh_builtin/crosh_builtin.zip
|
||||
|
||||
doins -r "${S}"/crosh_builtin_deploy/*
|
||||
|
||||
insinto /usr/share/fonts/chrome-droid
|
||||
doins "${S}"/fonts/ChromeDroid*.ttf
|
||||
|
||||
insinto /usr/share/color/bin
|
||||
if use mario; then
|
||||
newins "${S}"/color_profiles/mario.bin internal_display.bin
|
||||
elif use alex; then
|
||||
newins "${S}"/color_profiles/alex.bin internal_display.bin
|
||||
elif use lumpy; then
|
||||
newins "${S}"/color_profiles/lumpy.bin internal_display.bin
|
||||
fi
|
||||
|
||||
# Don't install cursors when building for Tegra, since the
|
||||
# current ARGB cursor implementation is performing badly,
|
||||
# and the fallback to 2-bit hardware cursor works better.
|
||||
# TODO: Remove this when the display driver has been fixed to
|
||||
# remove the performance bottlenecks.
|
||||
if ! use tegra2-ldk; then
|
||||
local CURSOR_DIR="${D}"/usr/share/cursors/xorg-x11/chromeos/cursors
|
||||
|
||||
mkdir -p "${CURSOR_DIR}"
|
||||
for i in ${REAL_CURSOR_NAMES}; do
|
||||
xcursorgen -p "${S}"/cursors "${S}"/cursors/$i.cfg >"${CURSOR_DIR}/$i"
|
||||
done
|
||||
|
||||
for i in ${LINK_CURSORS}; do
|
||||
ln -s ${i#*:} "${CURSOR_DIR}/${i%:*}"
|
||||
done
|
||||
fi
|
||||
|
||||
mkdir -p "${D}"/usr/share/cursors/xorg-x11/default
|
||||
echo Inherits=chromeos \
|
||||
>"${D}"/usr/share/cursors/xorg-x11/default/index.theme
|
||||
|
||||
#
|
||||
# Speech synthesis
|
||||
#
|
||||
|
||||
insinto /usr/share/chromeos-assets/speech_synthesis/patts
|
||||
|
||||
# Speech synthesis component extension code
|
||||
doins "${S}"/speech_synthesis/patts/manifest.json
|
||||
doins "${S}"/speech_synthesis/patts/tts_main.js
|
||||
doins "${S}"/speech_synthesis/patts/tts_service.nmf
|
||||
|
||||
# Speech synthesis voice data
|
||||
doins "${S}"/speech_synthesis/patts/voice_data_hmm_en-US.js
|
||||
unzip "${S}"/speech_synthesis/patts/voice_data_hmm_en-US.zip
|
||||
doins -r "${S}"/voice_data_hmm_en-US
|
||||
|
||||
# Speech synthesis engine (platform-specific native client module)
|
||||
if use arm ; then
|
||||
unzip "${S}"/speech_synthesis/patts/tts_service_pexe_arm.nexe.zip
|
||||
doins "${S}"/tts_service_pexe_arm.nexe
|
||||
elif use x86 ; then
|
||||
unzip "${S}"/speech_synthesis/patts/tts_service_x86-32.nexe.zip
|
||||
doins "${S}"/tts_service_x86-32.nexe
|
||||
elif use amd64 ; then
|
||||
unzip "${S}"/speech_synthesis/patts/tts_service_x86-64.nexe.zip
|
||||
doins "${S}"/tts_service_x86-64.nexe
|
||||
fi
|
||||
}
|
@ -1,63 +0,0 @@
|
||||
# Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=4
|
||||
CROS_WORKON_COMMIT="f6a78c3976f71190d7aa4d310f245410627e77d2"
|
||||
CROS_WORKON_TREE="acf7bf198dadec0295a36c07a3f28615bd53af35"
|
||||
CROS_WORKON_PROJECT="chromiumos/platform/debugd"
|
||||
CROS_WORKON_LOCALNAME=$(basename ${CROS_WORKON_PROJECT})
|
||||
|
||||
inherit cros-debug cros-workon toolchain-funcs
|
||||
|
||||
DESCRIPTION="Chrome OS debugging service"
|
||||
HOMEPAGE="http://www.chromium.org/"
|
||||
SRC_URI=""
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 arm x86"
|
||||
IUSE=""
|
||||
|
||||
LIBCHROME_VERS="125070"
|
||||
|
||||
RDEPEND="chromeos-base/chromeos-minijail
|
||||
chromeos-base/libchrome:${LIBCHROME_VERS}[cros-debug=]
|
||||
chromeos-base/libchromeos
|
||||
dev-libs/dbus-c++
|
||||
dev-libs/glib:2
|
||||
dev-libs/libpcre"
|
||||
DEPEND="${RDEPEND}
|
||||
chromeos-base/shill
|
||||
sys-apps/dbus
|
||||
virtual/modemmanager"
|
||||
|
||||
src_compile() {
|
||||
tc-export CC CXX AR RANLIB LD NM PKG_CONFIG OBJCOPY
|
||||
cros-debug-add-NDEBUG
|
||||
emake BASE_VER=${LIBCHROME_VERS}
|
||||
}
|
||||
|
||||
src_test() {
|
||||
emake tests BASE_VER=${LIBCHROME_VERS}
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cd build-opt
|
||||
into /
|
||||
dosbin debugd
|
||||
dodir /debugd
|
||||
exeinto /usr/libexec/debugd/helpers
|
||||
doexe helpers/icmp
|
||||
doexe helpers/netif
|
||||
doexe helpers/modem_status
|
||||
doexe "${S}"/src/helpers/minijail-setuid-hack.sh
|
||||
doexe "${S}"/src/helpers/systrace.sh
|
||||
doexe helpers/network_status
|
||||
|
||||
insinto /etc/dbus-1/system.d
|
||||
doins "${FILESDIR}/org.chromium.debugd.conf"
|
||||
|
||||
insinto /etc/init
|
||||
doins "${FILESDIR}/debugd.conf"
|
||||
doins "${FILESDIR}/trace_marker-test.conf"
|
||||
}
|
@ -1,61 +0,0 @@
|
||||
# Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=4
|
||||
CROS_WORKON_PROJECT="chromiumos/platform/debugd"
|
||||
CROS_WORKON_LOCALNAME=$(basename ${CROS_WORKON_PROJECT})
|
||||
|
||||
inherit cros-debug cros-workon toolchain-funcs
|
||||
|
||||
DESCRIPTION="Chrome OS debugging service"
|
||||
HOMEPAGE="http://www.chromium.org/"
|
||||
SRC_URI=""
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~arm ~x86"
|
||||
IUSE=""
|
||||
|
||||
LIBCHROME_VERS="125070"
|
||||
|
||||
RDEPEND="chromeos-base/chromeos-minijail
|
||||
chromeos-base/libchrome:${LIBCHROME_VERS}[cros-debug=]
|
||||
chromeos-base/libchromeos
|
||||
dev-libs/dbus-c++
|
||||
dev-libs/glib:2
|
||||
dev-libs/libpcre"
|
||||
DEPEND="${RDEPEND}
|
||||
chromeos-base/shill
|
||||
sys-apps/dbus
|
||||
virtual/modemmanager"
|
||||
|
||||
src_compile() {
|
||||
tc-export CC CXX AR RANLIB LD NM PKG_CONFIG OBJCOPY
|
||||
cros-debug-add-NDEBUG
|
||||
emake BASE_VER=${LIBCHROME_VERS}
|
||||
}
|
||||
|
||||
src_test() {
|
||||
emake tests BASE_VER=${LIBCHROME_VERS}
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cd build-opt
|
||||
into /
|
||||
dosbin debugd
|
||||
dodir /debugd
|
||||
exeinto /usr/libexec/debugd/helpers
|
||||
doexe helpers/icmp
|
||||
doexe helpers/netif
|
||||
doexe helpers/modem_status
|
||||
doexe "${S}"/src/helpers/minijail-setuid-hack.sh
|
||||
doexe "${S}"/src/helpers/systrace.sh
|
||||
doexe helpers/network_status
|
||||
|
||||
insinto /etc/dbus-1/system.d
|
||||
doins "${FILESDIR}/org.chromium.debugd.conf"
|
||||
|
||||
insinto /etc/init
|
||||
doins "${FILESDIR}/debugd.conf"
|
||||
doins "${FILESDIR}/trace_marker-test.conf"
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user