From 00b45672fdff37bf630a0385bc02940a67a96ca3 Mon Sep 17 00:00:00 2001 From: Henrik Brix Andersen Date: Tue, 28 Mar 2006 20:20:45 +0000 Subject: [PATCH] Added patches from upstream, thanks to Alon Bar-Lev. Package-Manager: portage-2.0.54 --- sys-apps/suspend2-userui/ChangeLog | 10 ++- sys-apps/suspend2-userui/Manifest | 6 +- .../files/digest-suspend2-userui-0.6.3-r1 | 1 + .../suspend2-userui-0.6.3-skewed-image.patch | 53 +++++++++++++++ .../suspend2-userui-0.6.3-skewed-text.patch | 13 ++++ .../suspend2-userui-0.6.3-r1.ebuild | 65 +++++++++++++++++++ 6 files changed, 146 insertions(+), 2 deletions(-) create mode 100644 sys-apps/suspend2-userui/files/digest-suspend2-userui-0.6.3-r1 create mode 100644 sys-apps/suspend2-userui/files/suspend2-userui-0.6.3-skewed-image.patch create mode 100644 sys-apps/suspend2-userui/files/suspend2-userui-0.6.3-skewed-text.patch create mode 100644 sys-apps/suspend2-userui/suspend2-userui-0.6.3-r1.ebuild diff --git a/sys-apps/suspend2-userui/ChangeLog b/sys-apps/suspend2-userui/ChangeLog index 8b71810c7007..23dcb924eb26 100644 --- a/sys-apps/suspend2-userui/ChangeLog +++ b/sys-apps/suspend2-userui/ChangeLog @@ -1,6 +1,14 @@ # 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 + +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 suspend2-userui-0.6.3.ebuild: diff --git a/sys-apps/suspend2-userui/Manifest b/sys-apps/suspend2-userui/Manifest index b2729205ecac..a60e13c0b9ab 100644 --- a/sys-apps/suspend2-userui/Manifest +++ b/sys-apps/suspend2-userui/Manifest @@ -1,10 +1,14 @@ -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 diff --git a/sys-apps/suspend2-userui/files/digest-suspend2-userui-0.6.3-r1 b/sys-apps/suspend2-userui/files/digest-suspend2-userui-0.6.3-r1 new file mode 100644 index 000000000000..1f98bf778aa3 --- /dev/null +++ b/sys-apps/suspend2-userui/files/digest-suspend2-userui-0.6.3-r1 @@ -0,0 +1 @@ +MD5 0d3a51d821da88149298ed4aa3118c3e suspend2-userui-0.6.3.tar.gz 388915 diff --git a/sys-apps/suspend2-userui/files/suspend2-userui-0.6.3-skewed-image.patch b/sys-apps/suspend2-userui/files/suspend2-userui-0.6.3-skewed-image.patch new file mode 100644 index 000000000000..0f3cc9a5f7f6 --- /dev/null +++ b/sys-apps/suspend2-userui/files/suspend2-userui-0.6.3-skewed-image.patch @@ -0,0 +1,53 @@ +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); ++ } + } + } + diff --git a/sys-apps/suspend2-userui/files/suspend2-userui-0.6.3-skewed-text.patch b/sys-apps/suspend2-userui/files/suspend2-userui-0.6.3-skewed-text.patch new file mode 100644 index 000000000000..642628efc07d --- /dev/null +++ b/sys-apps/suspend2-userui/files/suspend2-userui-0.6.3-skewed-text.patch @@ -0,0 +1,13 @@ +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; diff --git a/sys-apps/suspend2-userui/suspend2-userui-0.6.3-r1.ebuild b/sys-apps/suspend2-userui/suspend2-userui-0.6.3-r1.ebuild new file mode 100644 index 000000000000..610b0920097d --- /dev/null +++ b/sys-apps/suspend2-userui/suspend2-userui-0.6.3-r1.ebuild @@ -0,0 +1,65 @@ +# 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 +} -- 2.26.2