diff options
author | Robert Buchholz <rbu@gentoo.org> | 2007-10-26 09:40:44 +0000 |
---|---|---|
committer | Robert Buchholz <rbu@gentoo.org> | 2007-10-26 09:40:44 +0000 |
commit | ebac902431eaa69cc41760ff9590877e742d1fbc (patch) | |
tree | 8f7a2485c86c4378264b6c3431f207d0632338f3 /app-misc/lcd4linux | |
parent | Changed SRC_URI to mirror://gentoo (diff) | |
download | gentoo-2-ebac902431eaa69cc41760ff9590877e742d1fbc.tar.gz gentoo-2-ebac902431eaa69cc41760ff9590877e742d1fbc.tar.bz2 gentoo-2-ebac902431eaa69cc41760ff9590877e742d1fbc.zip |
Fix compilation with linux-headers, clean up old.
(Portage version: 2.1.3.14)
Diffstat (limited to 'app-misc/lcd4linux')
-rw-r--r-- | app-misc/lcd4linux/ChangeLog | 11 | ||||
-rw-r--r-- | app-misc/lcd4linux/files/digest-lcd4linux-0.10.1_rc2-r2 | 3 | ||||
-rw-r--r-- | app-misc/lcd4linux/files/digest-lcd4linux-0.9.11 | 3 | ||||
-rw-r--r-- | app-misc/lcd4linux/files/lcd4linux-0.10.1_rc2-nordtsc.patch | 187 | ||||
-rw-r--r-- | app-misc/lcd4linux/files/lcd4linux-0.9.11-modular-x.patch | 15 | ||||
-rw-r--r-- | app-misc/lcd4linux/lcd4linux-0.10.1_rc2-r2.ebuild | 180 | ||||
-rw-r--r-- | app-misc/lcd4linux/lcd4linux-0.9.11.ebuild | 67 |
7 files changed, 380 insertions, 86 deletions
diff --git a/app-misc/lcd4linux/ChangeLog b/app-misc/lcd4linux/ChangeLog index f4f05a69a97c..07ecd4da73ee 100644 --- a/app-misc/lcd4linux/ChangeLog +++ b/app-misc/lcd4linux/ChangeLog @@ -1,6 +1,15 @@ # ChangeLog for app-misc/lcd4linux # Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-misc/lcd4linux/ChangeLog,v 1.29 2007/08/29 18:30:55 dertobi123 Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-misc/lcd4linux/ChangeLog,v 1.30 2007/10/26 09:40:44 rbu Exp $ + +*lcd4linux-0.10.1_rc2-r2 (26 Oct 2007) + + 26 Oct 2007; Robert Buchholz <rbu@gentoo.org> + -files/lcd4linux-0.9.11-modular-x.patch, + +files/lcd4linux-0.10.1_rc2-nordtsc.patch, -lcd4linux-0.9.11.ebuild, + +lcd4linux-0.10.1_rc2-r2.ebuild: + Fix compilation with current Linux-Headers (bug #197057) + Clean up old version. 29 Aug 2007; Tobias Scherbaum <dertobi123@gentoo.org> lcd4linux-0.10.1_rc2-r1.ebuild: diff --git a/app-misc/lcd4linux/files/digest-lcd4linux-0.10.1_rc2-r2 b/app-misc/lcd4linux/files/digest-lcd4linux-0.10.1_rc2-r2 new file mode 100644 index 000000000000..fb0122326135 --- /dev/null +++ b/app-misc/lcd4linux/files/digest-lcd4linux-0.10.1_rc2-r2 @@ -0,0 +1,3 @@ +MD5 a64c40feb74862cb4a91281bc7737f72 lcd4linux-0.10.1-RC2.tar.gz 386188 +RMD160 5f4465d20c26e43aea79150cad00141d63bb784d lcd4linux-0.10.1-RC2.tar.gz 386188 +SHA256 9e69ded08dc9a8c75f36a3c020e7aa96b90313d91b2f58add6d4dfff1f8861b0 lcd4linux-0.10.1-RC2.tar.gz 386188 diff --git a/app-misc/lcd4linux/files/digest-lcd4linux-0.9.11 b/app-misc/lcd4linux/files/digest-lcd4linux-0.9.11 deleted file mode 100644 index 835ec66b6046..000000000000 --- a/app-misc/lcd4linux/files/digest-lcd4linux-0.9.11 +++ /dev/null @@ -1,3 +0,0 @@ -MD5 fabbc58e9118570c1f57ae90743e4859 lcd4linux-0.9.11.tar.gz 218557 -RMD160 55257d7c5951938ce7a1b878935139e436514ef0 lcd4linux-0.9.11.tar.gz 218557 -SHA256 7d90fd3fbd5907c1db56f78b88eddaf80cef9b2012214ad3118f9b6f72c35627 lcd4linux-0.9.11.tar.gz 218557 diff --git a/app-misc/lcd4linux/files/lcd4linux-0.10.1_rc2-nordtsc.patch b/app-misc/lcd4linux/files/lcd4linux-0.10.1_rc2-nordtsc.patch new file mode 100644 index 000000000000..b25d01e8e901 --- /dev/null +++ b/app-misc/lcd4linux/files/lcd4linux-0.10.1_rc2-nordtsc.patch @@ -0,0 +1,187 @@ +kMessage-ID: <47011930.60100@reinelt.co.at> +Date: Mon, 01 Oct 2007 17:58:40 +0200 +From: Michael Reinelt <michael@reinelt.co.at> +Subject: [Lcd4linux-devel] asm/msr.h inclusion and RDTSC stuff removed + +Hi there, + +I just committed a changeset where I removed the whole RDTSC delay loop +stuff, and therefore lcd4linux does no longer need asm/msr.h + +Instead, a gettimeofday() delay loop will be used when necessary. + +The rdtsc stuff worked fine, but had two major disadvantages: It did not +work with variable CPU frequencies, and latest kernels do no longer +offer the rdtsc() macro. + +The changeset has been committed to trunk, and will be backported to the +0.10.1 branch as soon as I get some positive feedback 8or at least I +don't get any negative feedback) + + +bye, Michael + +-- +Michael Reinelt <michael@reinelt.co.at> +http://home.pages.at/reinelt +GPG-Key 0xDF13BA50 +ICQ #288386781 + +Index: configure.in +=================================================================== +--- lcd4linux-0.10.1-RC2/configure.in.orig ++++ lcd4linux-0.10.1-RC2/configure.in +@@ -99,7 +99,6 @@ AC_HEADER_STDC + AC_CHECK_HEADERS([arpa/inet.h fcntl.h netdb.h netinet/in.h stdlib.h string.h sys/ioctl.h sys/socket.h sys/time.h sys/vfs.h syslog.h termios.h unistd.h]) + AC_CHECK_HEADERS(sys/io.h asm/io.h) + AC_CHECK_HEADERS(linux/parport.h linux/ppdev.h) +-AC_CHECK_HEADERS(asm/msr.h) + + # Checks for typedefs, structures, and compiler characteristics. + AC_C_CONST +Index: udelay.c +=================================================================== +--- lcd4linux-0.10.1-RC2/udelay.c.orig ++++ lcd4linux-0.10.1-RC2/udelay.c +@@ -55,11 +55,6 @@ + #include <string.h> + #include <sys/time.h> + +-#ifdef HAVE_ASM_MSR_H +-#define u32 unsigned int +-#include <asm/msr.h> +-#endif +- + + #include "debug.h" + #include "cfg.h" +@@ -67,79 +62,10 @@ + #include "udelay.h" + + +-static unsigned int ticks_per_usec = 0; +- +- +-static void getCPUinfo(int *hasTSC, double *MHz) +-{ +- int fd; +- char buffer[4096], *p; +- +- *hasTSC = 0; +- *MHz = -1; +- +- fd = open("/proc/cpuinfo", O_RDONLY); +- if (fd == -1) { +- error("udelay: open(/proc/cpuinfo) failed: %s", strerror(errno)); +- return; +- } +- if (read(fd, &buffer, sizeof(buffer) - 1) == -1) { +- error("udelay: read(/proc/cpuinfo) failed: %s", strerror(errno)); +- close(fd); +- return; +- } +- close(fd); +- +- p = strstr(buffer, "flags"); +- if (p == NULL) { +- info("udelay: /proc/cpuinfo has no 'flags' line"); +- } else { +- p = strstr(p, "tsc"); +- if (p == NULL) { +- info("udelay: CPU does not support Time Stamp Counter"); +- } else { +- info("udelay: CPU supports Time Stamp Counter"); +- *hasTSC = 1; +- } +- } +- +- p = strstr(buffer, "cpu MHz"); +- if (p == NULL) { +- info("udelay: /proc/cpuinfo has no 'cpu MHz' line"); +- } else { +- if (sscanf(p + 7, " : %lf", MHz) != 1) { +- error("udelay: parse(/proc/cpuinfo) failed: unknown 'cpu MHz' format"); +- *MHz = -1; +- } else { +- info("udelay: CPU runs at %f MHz", *MHz); +- } +- } +- +-} +- + + void udelay_init(void) + { +-#ifdef HAVE_ASM_MSR_H +- +- int tsc; +- double mhz; +- +- getCPUinfo(&tsc, &mhz); +- +- if (tsc && mhz > 0.0) { +- ticks_per_usec = ceil(mhz); +- info("udelay: using TSC delay loop, %u ticks per microsecond", ticks_per_usec); +- } else +-#else +- error("udelay: The file 'include/asm/msr.h' was missing at compile time."); +- error("udelay: Even if your CPU supports TSC, it will not be used!"); +- error("udelay: You *really* should install msr.h and recompile LCD4linux!"); +-#endif +- { +- ticks_per_usec = 0; +- info("udelay: using gettimeofday() delay loop"); +- } ++ info("udelay: using gettimeofday() delay loop"); + } + + +@@ -172,37 +98,17 @@ unsigned long timing(const char *driver, + void ndelay(const unsigned long nsec) + { + +-#ifdef HAVE_ASM_MSR_H +- +- if (ticks_per_usec) { ++ struct timeval now, end; + +- unsigned int t1, t2; +- unsigned long tsc; +- +- tsc = (nsec * ticks_per_usec + 999) / 1000; +- +- rdtscl(t1); +- do { +- rep_nop(); +- rdtscl(t2); +- } while ((t2 - t1) < tsc); +- +- } else +-#endif +- +- { +- struct timeval now, end; +- +- gettimeofday(&end, NULL); +- end.tv_usec += (nsec + 999) / 1000; +- while (end.tv_usec > 1000000) { +- end.tv_usec -= 1000000; +- end.tv_sec++; +- } +- +- do { +- rep_nop(); +- gettimeofday(&now, NULL); +- } while (now.tv_sec == end.tv_sec ? now.tv_usec < end.tv_usec : now.tv_sec < end.tv_sec); ++ gettimeofday(&end, NULL); ++ end.tv_usec += (nsec + 999) / 1000; ++ while (end.tv_usec > 1000000) { ++ end.tv_usec -= 1000000; ++ end.tv_sec++; + } ++ ++ do { ++ rep_nop(); ++ gettimeofday(&now, NULL); ++ } while (now.tv_sec == end.tv_sec ? now.tv_usec < end.tv_usec : now.tv_sec < end.tv_sec); + } diff --git a/app-misc/lcd4linux/files/lcd4linux-0.9.11-modular-x.patch b/app-misc/lcd4linux/files/lcd4linux-0.9.11-modular-x.patch deleted file mode 100644 index dc7651517f1d..000000000000 --- a/app-misc/lcd4linux/files/lcd4linux-0.9.11-modular-x.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- configure.in.orig 2006-10-23 02:23:15.000000000 +0200 -+++ configure.in 2006-10-23 02:24:45.000000000 +0200 -@@ -228,7 +228,11 @@ - AC_MSG_ERROR(X11 headers or libraries not available: X11 driver disabled) - else - DRIVERS="$DRIVERS XWindow.o" -- DRVLIBS="$DRVLIBS -L$ac_x_libraries -lX11" -+ if test "x$ac_x_libraries" = "x"; then -+ DRVLIBS="$DRVLIBS -lX11" -+ else -+ DRVLIBS="$DRVLIBS -L$ac_x_libraries -lX11" -+ fi - AC_DEFINE(WITH_X11,1,[junk]) - fi - fi diff --git a/app-misc/lcd4linux/lcd4linux-0.10.1_rc2-r2.ebuild b/app-misc/lcd4linux/lcd4linux-0.10.1_rc2-r2.ebuild new file mode 100644 index 000000000000..31ad6f78ca48 --- /dev/null +++ b/app-misc/lcd4linux/lcd4linux-0.10.1_rc2-r2.ebuild @@ -0,0 +1,180 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-misc/lcd4linux/lcd4linux-0.10.1_rc2-r2.ebuild,v 1.1 2007/10/26 09:40:44 rbu Exp $ + + +WANT_AUTOMAKE="1.9" +inherit eutils multilib autotools + +MY_P=${P/_rc/-RC} + +DESCRIPTION="Shows system and ISDN information on an external display or in a X11 window" +HOMEPAGE="http://ssl.bulix.org/projects/${PN}" +SRC_URI="mirror://gentoo/${MY_P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" + +IUSE="mysql python iconv mpd" + +# The following array holds the USE_EXPANDed keywords +IUSE_LCD_DEVICES=(beckmannegle bwct cfontz ncurses cwlinux + ea232 g15 hd44780 hd44780i2c lcd2usb + lcdlinux lcdterm ledmatrix lph7508 m50530 + mtxorb milfordbpk noritake null picolcd + png ppm routerboard serdisplib simplelcd + t6963 trefon usbhub usblcd wincor + X luise) + +# Iterate through the array and add the lcd_devices_* that we support +NUM_DEVICES=${#IUSE_LCD_DEVICES[@]} +index=0 +while [ "${index}" -lt "${NUM_DEVICES}" ] ; do + IUSE="${IUSE} lcd_devices_${IUSE_LCD_DEVICES[$index]}" + let "index = ${index} + 1" +done + +DEPEND=" + mysql? ( virtual/mysql ) + python? ( dev-lang/python ) + iconv? ( virtual/libiconv ) + mpd? ( media-libs/libmpd ) + + lcd_devices_bwct? ( dev-libs/libusb ) + lcd_devices_g15? ( dev-libs/libusb ) + lcd_devices_lcd2usb? ( dev-libs/libusb ) + lcd_devices_picolcd? ( dev-libs/libusb ) + lcd_devices_trefon? ( dev-libs/libusb ) + lcd_devices_usbhub? ( dev-libs/libusb ) + lcd_devices_usblcd? ( dev-libs/libusb ) + lcd_devices_luise? ( dev-libs/luise-bin ) + lcd_devices_ncurses? ( sys-libs/ncurses ) + lcd_devices_noritake? ( media-libs/gd ) + lcd_devices_t6963? ( media-libs/gd ) + lcd_devices_png? ( media-libs/libpng media-libs/gd ) + lcd_devices_X? ( x11-libs/libX11 media-libs/gd ) + lcd_devices_serdisplib? ( dev-libs/serdisplib media-libs/gd )" + +S="${WORKDIR}/${MY_P}" + +pkg_setup() { + echo + elog "If you wish to compile only specific plugins, please use" + elog "the LCD4LINUX_PLUGINS environment variable. Plugins must be comma separated and can be either of:" + elog "apm cpuinfo diskstats dvb exec file ic_sensors imon isdn kvv loadavg meminfo netdev pop3 ppp proc_stat seti statfs uname uptime wireless" + echo +} + +src_unpack() { + unpack ${A} + cd "${S}" + + epatch "${FILESDIR}/${P}-warnings.patch" + epatch "${FILESDIR}/${P}-mpd.patch" + epatch "${FILESDIR}/${P}-nordtsc.patch" + + eautoreconf +} + +src_compile() { + # This array contains the driver names required by configure --with-drivers= + # The positions must be the same as the corresponding use_expand flags + local DEVICE_DRIVERS=(BeckmannEgle BWCT CrystalFontz Curses Cwlinux + EA232graphic G15 HD44780 HD44780-I2C LCD2USB + LCDLinux LCDTerm LEDMatrix LPH7508 M50530 + MatrixOrbital MilfordInstruments Noritake NULL picoLCD + PNG PPM RouterBoard serdisplib SimpleLCD + T6963 Trefon USBHUB USBLCD WincorNixdorf + X11 LUIse) + + local myconf myp + + # plugins + if [ -n "$LCD4LINUX_PLUGINS" ]; then + myp="$LCD4LINUX_PLUGINS" + else + myp="all,!xmms" + fi + use iconv || myp="${myp},!iconv" + use mpd || myp="${myp},!mpd" + use mysql || myp="${myp},!mysql" + use python || myp="${myp},!python" + elog "Active plugins: ${myp}" + + # Generate comma separated list of drivers + local COMMA_DRIVERS + local FIRST_DRIVER + local index=0 + local driver + + while [ "${index}" -lt "${NUM_DEVICES}" ] ; do + if use "lcd_devices_${IUSE_LCD_DEVICES[$index]}" ; then + driver=${DEVICE_DRIVERS[$index]} + if [ -z ${COMMA_DRIVERS} ] ; then + # First in the list + COMMA_DRIVERS="${driver}" + FIRST_DRIVER="${driver}" + else + # Second, third, ... include a comma at the front + COMMA_DRIVERS="${COMMA_DRIVERS},${driver}" + fi + fi + let "index = ${index} + 1" + done + + # activate at least one driver + if [ -z ${COMMA_DRIVERS} ] ; then + COMMA_DRIVERS="NULL" + fi + + # workaround the build failing because of b0rked settings + if use lcd_devices_hd44780 && use lcd_devices_hd44780i2c ; then + echo + ewarn "Disabling hd44780 LCD_DEVICE as hd44780i2c is set!" + echo + COMMA_DRIVERS="${COMMA_DRIVERS},!HD44780" + fi + + # avoid package brokenness + if use lcd_devices_X ; then + myconf="--x-libraries=/usr/$(get_libdir) --x-include=/usr/include" + else + myconf="--without-x" + fi + + econf \ + --sysconfdir=/etc/lcd4linux \ + --with-drivers="${COMMA_DRIVERS}" \ + --with-plugins="${myp}" \ + $(use_with python) \ + ${myconf} \ + || die "econf failed" + + sed -i.orig -e 's/-L -lX11/ -lX11 /g' Makefile || die "sed fixup failed" + + emake || die "make failed" +} + +src_install() { + emake DESTDIR="${D}" install || die "make install failed" + + dodoc README ChangeLog + + newinitd "${FILESDIR}/${P}.initd" ${PN} + + insinto /etc + insopts -o root -g root -m 0600 + newins lcd4linux.conf.sample lcd4linux.conf +} + +pkg_postinst() { + if use lcd_devices_lcdlinux; then + echo + ewarn "To actually use the lcd-linux devices, you will need to install the lcd-linux kernel module." + ewarn "You can either do that yourself, see http://lcd-linux.sf.net or " + ewarn "checkout http://overlays.gentoo.org/dev/jokey/browser/trunk and emerge app-misc/lcd-linux" + echo + fi + ewarn "If you are upgrading, please note that the default config file was moved to /etc/lcd4linux.conf" +} diff --git a/app-misc/lcd4linux/lcd4linux-0.9.11.ebuild b/app-misc/lcd4linux/lcd4linux-0.9.11.ebuild deleted file mode 100644 index d60e8643220a..000000000000 --- a/app-misc/lcd4linux/lcd4linux-0.9.11.ebuild +++ /dev/null @@ -1,67 +0,0 @@ -# Copyright 1999-2006 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-misc/lcd4linux/lcd4linux-0.9.11.ebuild,v 1.12 2006/12/06 11:31:16 jokey Exp $ - -WANT_AUTOCONF="latest" -WANT_AUTOMAKE="latest" -inherit eutils autotools - -DESCRIPTION="Shows system and ISDN information on an external display or in a X11 window" -HOMEPAGE="http://ssl.bulix.org/projects/lcd4linux/" -SRC_URI="mirror://sourceforge/lcd4linux/${P}.tar.gz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="x86" -IUSE="kde pda png X usb" - -RDEPEND="sys-libs/ncurses - x11-libs/libX11 - png? ( media-libs/libpng )" -DEPEND="${RDEPEND} - x11-libs/libXt" - -src_unpack() { - unpack ${A} - cd "${S}" - - epatch "${FILESDIR}/${P}-modular-x.patch" - eautoreconf -} - -src_compile() { - local myconf - - use png || myconf=",!PNG" - use pda || myconf="${myconf},!PalmPilot" - use X || myconf="${myconf},!X11" - use usb || myconf="${myconf},!USBLCD" - - econf \ - --sysconfdir=/etc/lcd4linux \ - --with-drivers="all${myconf}" || die "econf failed" - - emake || die -} - -src_install() { - CONFIG_PROTECT="${CONFIG_PROTECT} /etc/lcd4linux" - einstall - - insinto /etc/lcd4linux - newins lcd4linux.conf.sample lcd4linux.conf - insopts -o root -g root -m 0600 - dodoc README* NEWS TODO CREDITS FAQ - dodoc lcd4linux.conf.sample lcd4linux.kdelnk lcd4linux.xpm - - if use kde ; then - insinto /etc/lcd4linux - insopts -o root -g root -m 0600 - doins lcd4kde.conf - insinto /usr/share/applnk/apps/System - doins lcd4linux.kdelnk - insinto /usr/share/pixmaps - doins lcd4linux.xpm - touch ${D}/etc/lcd4linux/lcd4X11.conf - fi -} |