# ChangeLog for sys-apps/suspend2-userui
# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/suspend2-userui/ChangeLog,v 1.8 2006/02/01 16:47:25 brix Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/suspend2-userui/ChangeLog,v 1.9 2006/03/28 20:20:45 brix Exp $
+
+*suspend2-userui-0.6.3-r1 (28 Mar 2006)
+
+ 28 Mar 2006; Henrik Brix Andersen <brix@gentoo.org>
+ +files/suspend2-userui-0.6.3-skewed-image.patch,
+ +files/suspend2-userui-0.6.3-skewed-text.patch,
+ +suspend2-userui-0.6.3-r1.ebuild:
+ Added patches from upstream, thanks to Alon Bar-Lev.
01 Feb 2006; Henrik Brix Andersen <brix@gentoo.org>
suspend2-userui-0.6.3.ebuild:
-MD5 ac65a936160baacf0768f006e6714604 ChangeLog 1427
+MD5 58cd45aa54e6c8164bf6af9e4dd1bd95 ChangeLog 1715
MD5 9189b784d36ef34bf204fc33245c0980 files/digest-suspend2-userui-0.5.1 72
MD5 8c01c12e7560cac8c27088d6f90f647b files/digest-suspend2-userui-0.6.1 72
MD5 50a14df881aec01f7f1c060f0b54d647 files/digest-suspend2-userui-0.6.2 72
MD5 d2b5ea7a0c825bf76dd8f6db96f80bb2 files/digest-suspend2-userui-0.6.3 73
+MD5 d2b5ea7a0c825bf76dd8f6db96f80bb2 files/digest-suspend2-userui-0.6.3-r1 73
+MD5 7ebbb292a7fc3672467e7f2fd7255c70 files/suspend2-userui-0.6.3-skewed-image.patch 1551
+MD5 ad0e358f60075a903529f7e8d4b64d3f files/suspend2-userui-0.6.3-skewed-text.patch 416
MD5 b280eebc74d70d85e664debf1adce2c3 metadata.xml 255
MD5 cd7fdd45f1bc8f0cb307a9e6147d6fb4 suspend2-userui-0.5.1.ebuild 1504
MD5 4ffd8254bbe84baa2868d9efddec7bb9 suspend2-userui-0.6.1.ebuild 1504
MD5 b10fdb770ad3ff62d474720c4821bde0 suspend2-userui-0.6.2.ebuild 1505
+MD5 224372f6c6538e56e4c376fc95d75bc6 suspend2-userui-0.6.3-r1.ebuild 1636
MD5 5345fa27c2ab0794eef342edea123154 suspend2-userui-0.6.3.ebuild 1504
--- /dev/null
+MD5 0d3a51d821da88149298ed4aa3118c3e suspend2-userui-0.6.3.tar.gz 388915
--- /dev/null
+Index: fbsplash/userui_fbsplash_core.c
+===================================================================
+--- fbsplash/userui_fbsplash_core.c (revision 997)
++++ fbsplash/userui_fbsplash_core.c (working copy)
+@@ -154,8 +154,8 @@
+ }
+ memcpy(base_image, (void*)silent_img.data, base_image_size);
+
+- frame_buffer = mmap(NULL, base_image_size, PROT_READ | PROT_WRITE,
+- MAP_SHARED, fb_fd, 0);
++ frame_buffer = mmap(NULL, fb_fix.line_length * fb_var.yres,
++ PROT_READ | PROT_WRITE, MAP_SHARED, fb_fd, 0);
+ if (frame_buffer == MAP_FAILED) {
+ frame_buffer = NULL;
+ }
+@@ -183,7 +183,7 @@
+ config_file = NULL;
+
+ if (frame_buffer) {
+- munmap(frame_buffer, base_image_size);
++ munmap(frame_buffer, fb_fix.line_length * fb_var.yres);
+ frame_buffer = NULL;
+ }
+
+@@ -203,15 +203,24 @@
+ }
+
+ static void update_fb_img() {
++ int y;
++ int img_line_length = fb_var.xres * ((fb_var.bits_per_pixel + 7) >> 3);
++
+ if (!silent_img.data)
+ return;
+
+- /* Try mmap'd I/O first */
+ if (frame_buffer) {
+- memcpy(frame_buffer, silent_img.data, base_image_size);
++ /* Try mmap'd I/O if we have it */
++ for (y = 0; y < fb_var.yres; y++) {
++ memcpy(frame_buffer + y * fb_fix.line_length,
++ silent_img.data + (y * img_line_length),
++ img_line_length);
++ }
+ } else if (fb_fd != -1) {
+- lseek(fb_fd, 0, SEEK_SET);
+- write(fb_fd, silent_img.data, base_image_size);
++ for (y = 0; y < fb_var.yres; y++) {
++ lseek(fb_fd, y * fb_fix.line_length, SEEK_SET);
++ write(fb_fd, silent_img.data + (y * img_line_length), img_line_length);
++ }
+ }
+ }
+
--- /dev/null
+Index: fbsplash/ttf.c
+===================================================================
+--- fbsplash/ttf.c (revision 997)
++++ fbsplash/ttf.c (working copy)
+@@ -638,7 +638,7 @@
+ j -= glyph->minx;
+ }
+
+- dst = (unsigned char *)target + i*fb_fix.line_length + j*bytespp;
++ dst = (unsigned char *)target + (i * fb_var.xres + j)*bytespp;
+ src = current->buffer + row*current->pitch;
+
+ add = x & 1;
--- /dev/null
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/suspend2-userui/suspend2-userui-0.6.3-r1.ebuild,v 1.1 2006/03/28 20:20:45 brix Exp $
+
+inherit toolchain-funcs eutils
+
+DESCRIPTION="User Interface for Software Suspend 2"
+HOMEPAGE="http://www.suspend2.net"
+SRC_URI="http://www.suspend2.net/downloads/all/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86"
+
+IUSE="fbsplash"
+DEPEND="virtual/libc
+ fbsplash? ( sys-libs/zlib
+ media-libs/freetype
+ media-libs/jpeg
+ media-libs/lcms
+ >=media-libs/libmng-1.0.5
+ media-libs/libpng )"
+
+src_unpack() {
+ unpack ${A}
+
+ cd ${S}
+ epatch ${FILESDIR}/${P}-skewed-image.patch
+ epatch ${FILESDIR}/${P}-skewed-text.patch
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" suspend2ui_text \
+ || die "emake suspend2ui_text failed"
+
+ if use fbsplash; then
+ emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" fbsplash \
+ || die "emake fbsplash failed"
+ emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" suspend2ui_fbsplash \
+ || die "emake suspend2ui_fbsplash failed"
+ fi
+}
+
+src_install() {
+ into /
+ dosbin suspend2ui_text
+ use fbsplash && dosbin suspend2ui_fbsplash
+
+ dodoc AUTHORS ChangeLog KERNEL_API README TODO USERUI_API
+}
+
+pkg_postinst() {
+ if use fbsplash; then
+ einfo
+ einfo "You must create a symlink from /etc/splash/suspend2"
+ einfo "to the theme you want suspend2ui_fbsplash to use, e.g.:"
+ einfo
+ einfo " # ln -sfn /etc/splash/emergence /etc/splash/suspend2"
+ fi
+
+ einfo
+ einfo "Please see /usr/share/doc/${PF}/README.gz for further"
+ einfo "instructions."
+ einfo
+}