diff options
author | Joe Peterson <lavajoe@gentoo.org> | 2007-06-08 18:04:35 +0000 |
---|---|---|
committer | Joe Peterson <lavajoe@gentoo.org> | 2007-06-08 18:04:35 +0000 |
commit | 502eb8d2805e7ee90cbcb9c33d7fbcfe628d8f60 (patch) | |
tree | 5c7c6ca00c80c36ac30a54172e49bee274fb9560 /sys-apps/915resolution | |
parent | Revision bump fixes security bug 181214 (diff) | |
download | historical-502eb8d2805e7ee90cbcb9c33d7fbcfe628d8f60.tar.gz historical-502eb8d2805e7ee90cbcb9c33d7fbcfe628d8f60.tar.bz2 historical-502eb8d2805e7ee90cbcb9c33d7fbcfe628d8f60.zip |
Port to ~x86-fbsd, keyword this arch only, fix init.d file (bug #175500)
Package-Manager: portage-2.1.2.9
Diffstat (limited to 'sys-apps/915resolution')
-rw-r--r-- | sys-apps/915resolution/915resolution-0.5.3-r1.ebuild | 49 | ||||
-rw-r--r-- | sys-apps/915resolution/ChangeLog | 16 | ||||
-rw-r--r-- | sys-apps/915resolution/Manifest | 23 | ||||
-rw-r--r-- | sys-apps/915resolution/files/915resolution-0.5.3-freebsd.patch | 95 | ||||
-rw-r--r-- | sys-apps/915resolution/files/digest-915resolution-0.5.3-r1 | 3 | ||||
-rw-r--r-- | sys-apps/915resolution/files/initd-r1 | 59 |
6 files changed, 240 insertions, 5 deletions
diff --git a/sys-apps/915resolution/915resolution-0.5.3-r1.ebuild b/sys-apps/915resolution/915resolution-0.5.3-r1.ebuild new file mode 100644 index 000000000000..cbdf019b18b5 --- /dev/null +++ b/sys-apps/915resolution/915resolution-0.5.3-r1.ebuild @@ -0,0 +1,49 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/915resolution/915resolution-0.5.3-r1.ebuild,v 1.1 2007/06/08 18:04:35 lavajoe Exp $ + +inherit eutils flag-o-matic + +DESCRIPTION="Utility to patch VBIOS of Intel 855 / 865 / 915 chipsets" +HOMEPAGE="http://www.geocities.com/stomljen/" +SRC_URI="http://www.geocities.com/stomljen/${P}.tar.gz" + +LICENSE="public-domain" +SLOT="0" +KEYWORDS="~x86-fbsd" +IUSE="" + +DEPEND="" +RDEPEND="" + +src_unpack() { + unpack ${A} + cd "${S}" + + epatch "${FILESDIR}/${P}-freebsd.patch" +} + +src_compile() { + filter-flags -O -O1 -O2 -O3 -Os + emake clean + emake CFLAGS="${CFLAGS}" || die "Compiliation failed." +} + +src_install() { + dosbin ${PN} + newconfd "${FILESDIR}/confd" ${PN} + newinitd "${FILESDIR}/initd-r1" ${PN} + dodoc README.txt changes.log chipset_info.txt dump_bios +} + +pkg_postinst() { + elog + elog "${PN} alters your video BIOS in a non-permanent way, this means" + elog "that there is no risk of permanent damage to your video card, but" + elog "it also means that it must be run at every boot. To set it up, " + elog "edit /etc/conf.d/${PN} to add your configuration and type the" + elog "following command to add it the your defautl runlevel:" + elog + elog " \"rc-update add ${PN} default\"" + elog +} diff --git a/sys-apps/915resolution/ChangeLog b/sys-apps/915resolution/ChangeLog index 267ca7c507fc..b546d566551c 100644 --- a/sys-apps/915resolution/ChangeLog +++ b/sys-apps/915resolution/ChangeLog @@ -1,6 +1,20 @@ # ChangeLog for sys-apps/915resolution # Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/915resolution/ChangeLog,v 1.9 2007/04/17 16:52:24 genstef Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/915resolution/ChangeLog,v 1.10 2007/06/08 18:04:35 lavajoe Exp $ + +*915resolution-0.5.3-r1 (08 Jun 2007) + + 08 Jun 2007; Joe Peterson <lavajoe@gentoo.org> + +files/915resolution-0.5.3-freebsd.patch, +files/initd-r1, + +915resolution-0.5.3-r1.ebuild: + Port to ~x86-fbsd by adding code from FreeBSD-compatible version of + 855resolution (found here: + http://www.sigusr1.org/~kurahone/misc-hacks/); remove optimization flags + (breaks assembly code part of build and is not necessary anyway); fix + init.d file to return correct error code if any of the resolutions in + config fail; improve formatting of log file; keyword with *only* + ~x86-fbsd for now awaiting testing on other archs + (bug #175500) 17 Apr 2007; Stefan Schweizer <genstef@gentoo.org> files/confd, metadata.xml: diff --git a/sys-apps/915resolution/Manifest b/sys-apps/915resolution/Manifest index 5987a4cecd97..092909e854ba 100644 --- a/sys-apps/915resolution/Manifest +++ b/sys-apps/915resolution/Manifest @@ -2,6 +2,10 @@ AUX 915resolution-0.5.2-830.patch 2284 RMD160 9a7dfb7107c41b14544e3911de3bfeeefe MD5 54baa1f7bedd081849e500b34203b08c files/915resolution-0.5.2-830.patch 2284 RMD160 9a7dfb7107c41b14544e3911de3bfeeefeb95c27 files/915resolution-0.5.2-830.patch 2284 SHA256 6441481adfee24b10c4c53f7a5b7792d47fa1992d30162db5ebcbb1b63a583af files/915resolution-0.5.2-830.patch 2284 +AUX 915resolution-0.5.3-freebsd.patch 2279 RMD160 3d9ea969c18041c881142f41741d1446a6b8bb8c SHA1 5ac9e2f01aa13470d935217bf5183b6a25e499ca SHA256 7a9ba1e0bdc123ea5dc661633dd7b660be9b35be7cae087b991fcf68ad90bb15 +MD5 33d92952b9038007f2037188edada840 files/915resolution-0.5.3-freebsd.patch 2279 +RMD160 3d9ea969c18041c881142f41741d1446a6b8bb8c files/915resolution-0.5.3-freebsd.patch 2279 +SHA256 7a9ba1e0bdc123ea5dc661633dd7b660be9b35be7cae087b991fcf68ad90bb15 files/915resolution-0.5.3-freebsd.patch 2279 AUX confd 633 RMD160 5518de5337843b8b69e853a9641a1ae6494a0cb7 SHA1 2ba05cdf7dcff3ad3f46f44ec73fb792e6630569 SHA256 932b9c2c0f3bec0aff627afe43efb81d1e28906b0d2028e1ec65633d668b9124 MD5 2f62e9d5d1cd485ac323a7c176668be0 files/confd 633 RMD160 5518de5337843b8b69e853a9641a1ae6494a0cb7 files/confd 633 @@ -10,6 +14,10 @@ AUX initd 960 RMD160 d8ea8b2e94d33a65f9cdf39cf3b439d17039c310 SHA1 f41fd2056d12f MD5 4f8a3dc2fafb2fe93965dbf2659c141a files/initd 960 RMD160 d8ea8b2e94d33a65f9cdf39cf3b439d17039c310 files/initd 960 SHA256 54833d3dfb7cf8f5342fbd8cb0c288d7a6c5ace577524f398e23bb5d392ecc62 files/initd 960 +AUX initd-r1 1337 RMD160 4e35a384345b530b359e79f0849795774f324223 SHA1 4f333d0e5689b5f506c3f2b750dc158b4ca2dae6 SHA256 e0add05fe60f21013c9f618b432b1de8f08910e57be69a33649b2886d324ff1e +MD5 bb5bd6f55d55dbbbc7bbbe7f4fc7d5fe files/initd-r1 1337 +RMD160 4e35a384345b530b359e79f0849795774f324223 files/initd-r1 1337 +SHA256 e0add05fe60f21013c9f618b432b1de8f08910e57be69a33649b2886d324ff1e files/initd-r1 1337 DIST 915resolution-0.5.2.tar.gz 21183 RMD160 722b352a83f41f0e9822ed4e096e8064f239dcc1 SHA1 9f26eb1b728ca0b2d28c948207b034a49b477089 SHA256 98827dd5adb5ffb5e415b2b28364033ffc173796555051ef52983ec5df77b6d4 DIST 915resolution-0.5.3.tar.gz 22583 RMD160 a406c6810bbfcf94c5352ea1b1e9178af4078589 SHA1 377a32d33f1987adf372341c8c6664d5673da9b8 SHA256 b64cab834b5e410bca555dc9db8e69f62f6f02496942f35ff4a68f3f27f1b542 EBUILD 915resolution-0.5.2-r1.ebuild 1272 RMD160 1f958bbcdd35b1a106ef851a7445707a07a9ab6d SHA1 b1aa41378b877379770b822aee93e7df027e2618 SHA256 d2f33fb6384a0ad7eeb1f2519be6d2799abf076a2531be3bbdba36951f89893a @@ -20,14 +28,18 @@ EBUILD 915resolution-0.5.2.ebuild 1173 RMD160 27461097bf217872fa76685f77a75744e1 MD5 824bc54e9f70d905cdd2ddd26cdab125 915resolution-0.5.2.ebuild 1173 RMD160 27461097bf217872fa76685f77a75744e18bbf37 915resolution-0.5.2.ebuild 1173 SHA256 bfd165cd789155d4e98511517ac3e1f6d1bf76bef87b1d7861b5dbb81ec47c77 915resolution-0.5.2.ebuild 1173 +EBUILD 915resolution-0.5.3-r1.ebuild 1326 RMD160 c0d35b878b6992717a747bcd04ab508df20eb004 SHA1 082432666b362aa649f50a0082cbc7a0a615098a SHA256 852787bdefe67a39fb3b63e84eb435c89c2e339c2305ae64023e6f64a4f34415 +MD5 4a44302f00aaf438851c44d85d64fd11 915resolution-0.5.3-r1.ebuild 1326 +RMD160 c0d35b878b6992717a747bcd04ab508df20eb004 915resolution-0.5.3-r1.ebuild 1326 +SHA256 852787bdefe67a39fb3b63e84eb435c89c2e339c2305ae64023e6f64a4f34415 915resolution-0.5.3-r1.ebuild 1326 EBUILD 915resolution-0.5.3.ebuild 1176 RMD160 92d51ce08889baf5c243d2ac90bf18d1d22fa675 SHA1 0391ae39bb0a496dbcf5887be4b3ca90006b51e3 SHA256 0d6a4d04289bdac1c5e231fdf4037493053dc1e3deea9bdd6a22bb19b825b245 MD5 38a9684e9d57dde07e9fea6272a9bc90 915resolution-0.5.3.ebuild 1176 RMD160 92d51ce08889baf5c243d2ac90bf18d1d22fa675 915resolution-0.5.3.ebuild 1176 SHA256 0d6a4d04289bdac1c5e231fdf4037493053dc1e3deea9bdd6a22bb19b825b245 915resolution-0.5.3.ebuild 1176 -MISC ChangeLog 1306 RMD160 773f1b6f050410e89cbec6d44162dae01625c7d1 SHA1 debde070868598b2c93fbe5b546158dd986183e7 SHA256 f5519e2943f0c42a7af4554f0a67ec7903f836bf8b376ac1a93a7c9cc79dcdd7 -MD5 7435eab2bf650b77c6bc17c950aa21f8 ChangeLog 1306 -RMD160 773f1b6f050410e89cbec6d44162dae01625c7d1 ChangeLog 1306 -SHA256 f5519e2943f0c42a7af4554f0a67ec7903f836bf8b376ac1a93a7c9cc79dcdd7 ChangeLog 1306 +MISC ChangeLog 1950 RMD160 bda8db08009de88f1b2c6f1f4c605e0354a2b0bb SHA1 f3eccf06e8cbf779e6ae1ff2d2d2241f32570c74 SHA256 cca9edf1a2841b81b89a01af1234be342757a34474182467265291ff4ac13618 +MD5 0a85b64651f57bfd8fb7b5a99130c9be ChangeLog 1950 +RMD160 bda8db08009de88f1b2c6f1f4c605e0354a2b0bb ChangeLog 1950 +SHA256 cca9edf1a2841b81b89a01af1234be342757a34474182467265291ff4ac13618 ChangeLog 1950 MISC metadata.xml 880 RMD160 4d30d36ae8e839d3dd3aba4786956efc020b1f13 SHA1 8573ae1d386db341f1156811aaab368405719a07 SHA256 7c026fc1fdcc9e7357126f7b7c012c5ec9b57586997a1028f9ec04bf8c3b7562 MD5 36f46ca08c232be9f18f7643fbddf8c3 metadata.xml 880 RMD160 4d30d36ae8e839d3dd3aba4786956efc020b1f13 metadata.xml 880 @@ -41,3 +53,6 @@ SHA256 a9b1e1c8d39680132cb47bfb19be139315dccd0a537fb97cc3a03eae79bc1499 files/di MD5 e384f115c3773085943ac8408d14e5d2 files/digest-915resolution-0.5.3 256 RMD160 699b6640c9d4cc1a932c60f46627aac294aa5f2e files/digest-915resolution-0.5.3 256 SHA256 977bd888b239c8b0ce49a141d97478a6ce96e55bdc62b6c6630194b5b61df117 files/digest-915resolution-0.5.3 256 +MD5 e384f115c3773085943ac8408d14e5d2 files/digest-915resolution-0.5.3-r1 256 +RMD160 699b6640c9d4cc1a932c60f46627aac294aa5f2e files/digest-915resolution-0.5.3-r1 256 +SHA256 977bd888b239c8b0ce49a141d97478a6ce96e55bdc62b6c6630194b5b61df117 files/digest-915resolution-0.5.3-r1 256 diff --git a/sys-apps/915resolution/files/915resolution-0.5.3-freebsd.patch b/sys-apps/915resolution/files/915resolution-0.5.3-freebsd.patch new file mode 100644 index 000000000000..462772940f7b --- /dev/null +++ b/sys-apps/915resolution/files/915resolution-0.5.3-freebsd.patch @@ -0,0 +1,95 @@ +diff -Nru 915resolution-0.5.3/915resolution.c 915resolution-0.5.3-new/915resolution.c +--- 915resolution-0.5.3/915resolution.c 2007-04-21 12:40:51 +0000 ++++ 915resolution-0.5.3-new/915resolution.c 2007-04-21 12:40:51 +0000 +@@ -22,7 +22,17 @@ + #include <string.h> + #include <sys/mman.h> + #include <fcntl.h> ++ ++#if defined(__NetBSD__) ++#include <sys/types.h> ++#include <machine/sysarch.h> ++#include "bsd_io.h" ++#elif defined(__FreeBSD__) ++#include "bsd_io.h" ++#elif defined(linux) + #include <sys/io.h> ++#endif ++ + #include <unistd.h> + #include <assert.h> + +@@ -163,12 +173,26 @@ + + + void initialize_system(char * filename) { +- + if (!filename) { ++#if defined(__FreeBSD__) ++ int iofd = open("/dev/io", O_RDONLY); ++ if (iofd == -1) { ++ perror("Unable to obtain the proper IO permissions"); ++ exit(2); ++ } ++#elif defined(__NetBSD__) ++ if (i386_iopl(3) < 0) { ++ perror("Unable to obtain the proper IO permissions"); ++ exit(2); ++ } ++#elif defined(linux) + if (iopl(3) < 0) { + perror("Unable to obtain the proper IO permissions"); + exit(2); + } ++#else ++#error Not ported to this operating system ++#endif + } + } + +diff -Nru 915resolution-0.5.3/bsd_io.h 915resolution-0.5.3-new/bsd_io.h +--- 915resolution-0.5.3/bsd_io.h 1970-01-01 00:00:00 +0000 ++++ 915resolution-0.5.3-new/bsd_io.h 2007-04-21 12:40:51 +0000 +@@ -0,0 +1,42 @@ ++#include <sys/types.h> ++ ++#ifndef _BSD_IO_H_ ++#define _BSD_IO_H_ ++ ++/* Ripped out of cpufunc.h, changed args to match Linux. */ ++static __inline u_int ++inl(u_int port) ++{ ++ u_int data; ++ ++ __asm __volatile("inl %%dx,%0" : "=a" (data) : "d" (port)); ++ return (data); ++} ++ ++static __inline u_char ++inb(u_int port) ++{ ++ u_char data; ++ ++ __asm __volatile("inb %%dx,%0" : "=a" (data) : "d" (port)); ++ return (data); ++} ++ ++static __inline void ++outl(u_int data, u_int port) ++{ ++ /* ++ * outl() and outw() aren't used much so we haven't looked at ++ * possible micro-optimizations such as the unnecessary ++ * assignment for them. ++ */ ++ __asm __volatile("outl %0,%%dx" : : "a" (data), "d" (port)); ++} ++ ++static __inline void ++outb(u_char data, u_int port) ++{ ++ __asm __volatile("outb %0,%1" : : "a" (data), "id" ((u_short)(port))); ++} ++ ++#endif diff --git a/sys-apps/915resolution/files/digest-915resolution-0.5.3-r1 b/sys-apps/915resolution/files/digest-915resolution-0.5.3-r1 new file mode 100644 index 000000000000..db576029788c --- /dev/null +++ b/sys-apps/915resolution/files/digest-915resolution-0.5.3-r1 @@ -0,0 +1,3 @@ +MD5 ed287778a53d02c31a7a6a52bc146291 915resolution-0.5.3.tar.gz 22583 +RMD160 a406c6810bbfcf94c5352ea1b1e9178af4078589 915resolution-0.5.3.tar.gz 22583 +SHA256 b64cab834b5e410bca555dc9db8e69f62f6f02496942f35ff4a68f3f27f1b542 915resolution-0.5.3.tar.gz 22583 diff --git a/sys-apps/915resolution/files/initd-r1 b/sys-apps/915resolution/files/initd-r1 new file mode 100644 index 000000000000..f63f2472aa61 --- /dev/null +++ b/sys-apps/915resolution/files/initd-r1 @@ -0,0 +1,59 @@ +#!/sbin/runscript + +depend() { + before xdm +} + +# Credit to David Leverton for this function which handily maps a bash array +# structure to positional parameters so existing configs work :) +# We'll deprecate arrays at some point though. +_get_array() { + if [ -n "${BASH}" ] ; then + case "$(declare -p "$1" 2>/dev/null)" in + "declare -a "*) + echo "set -- \"\${$1[@]}\"" + return + ;; + esac + fi + + echo "eval set -- \"\$$1\"" +} + +checkconfig() { + if [ -z "${replace}" ]; then + eerror "You need to have at least one resolution to replace" + eerror "/etc/conf.d/915resolution" + return 1 + fi + + # Start with a clean log file + cat /dev/null > ${log:-/dev/null} + + return 0 +} + +start() { + checkconfig || return 1 + + ebegin "Patching video BIOS with new video modes" + + retval=0 + first=0 + eval $(_get_array replace) + for mode in "$@"; do + # If this is not the first mode, insert a separator in the log + if [ ${first} -ne 0 ]; then + echo "" >> ${log:-/dev/null} + echo "---" >> ${log:-/dev/null} + echo "" >> ${log:-/dev/null} + fi + + # Set each mode, and remember the last bad return value if any fail + 915resolution ${mode} >> ${log:-/dev/null} || retval=$? + + first=1 + done + + eend ${retval} +} |