Date: 26 Aug 2004 22:22:44 -0000 From: Colin Percival <cperciva@daemonology.net> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/71007: [NEW PORT] sysutils/est Message-ID: <20040826222244.9674.qmail@hexahedron.daemonology.net> Resent-Message-ID: <200408262230.i7QMUTmD095556@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 71007 >Category: ports >Synopsis: [NEW PORT] sysutils/est >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Thu Aug 26 22:30:29 GMT 2004 >Closed-Date: >Last-Modified: >Originator: Colin Percival >Release: FreeBSD 5.2.1-SECURITY i386 >Organization: >Environment: System: FreeBSD hexahedron.daemonology.net 5.2.1-SECURITY FreeBSD 5.2.1-SECURITY #0: Wed May 26 04:19:54 GMT 2004 root@builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC i386 >Description: This port builds a kernel module providing two sysctls (hw.est_freqs, hw.est_curfreq) for controlling Enhanced SpeedStep on Intel Pentium M processors. >How-To-Repeat: >Fix: --- est.shar begins here --- # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # sysutils/est # sysutils/est/pkg-descr # sysutils/est/distinfo # sysutils/est/Makefile # sysutils/est/files # sysutils/est/files/est.sh # sysutils/est/files/est.c.diff.fbsd4 # echo c - sysutils/est mkdir -p sysutils/est > /dev/null 2>&1 echo x - sysutils/est/pkg-descr sed 's/^X//' >sysutils/est/pkg-descr << 'END-of-sysutils/est/pkg-descr' XThis is a driver for the Enhanced SpeedStep feature in Intel Pentium M Xprocessors. X XWWW: http://www.daemonology.net/freebsd-est/ X X- Colin Percival Xcperciva@daemonology.net END-of-sysutils/est/pkg-descr echo x - sysutils/est/distinfo sed 's/^X//' >sysutils/est/distinfo << 'END-of-sysutils/est/distinfo' XMD5 (est-0.5.tar.gz) = 9ae866be0144aa0c904279fc8683f650 XSIZE (est-0.5.tar.gz) = 3847 END-of-sysutils/est/distinfo echo x - sysutils/est/Makefile sed 's/^X//' >sysutils/est/Makefile << 'END-of-sysutils/est/Makefile' X# New ports collection makefile for: Enhanced SpeedStep driver X# Date created: 21 August 2004 X# Whom: cperciva@daemonology.net X# X# $FreeBSD$ X# X XPORTNAME= est XPORTVERSION= 0.5 XCATEGORIES= sysutils XMASTER_SITES= http://www.daemonology.net/freebsd-est/ X XMAINTAINER= cperciva@daemonology.net XCOMMENT= Enhanced SpeedStep driver for Pentium M processors X XONLY_FOR_ARCHS= i386 XKMODDIR= ${PREFIX}/modules XMAKE_ARGS= KMODDIR="${KMODDIR}" X XPLIST_FILES= modules/est.ko \ X etc/rc.d/est.sh X X.include <bsd.port.pre.mk> X X.if ${OSVERSION} < 500023 XEXTRA_PATCHES= ${FILESDIR}/est.c.diff.fbsd4 X.endif X Xpost-extract: X @${SED} -e 's|@@PREFIX@@|${PREFIX}|' ${FILESDIR}/est.sh \ X > ${WRKDIR}/est.sh X Xpre-install: X ${MKDIR} ${KMODDIR} X Xpost-install: X ${INSTALL_SCRIPT} ${WRKDIR}/est.sh ${PREFIX}/etc/rc.d/ X X.include <bsd.port.post.mk> END-of-sysutils/est/Makefile echo c - sysutils/est/files mkdir -p sysutils/est/files > /dev/null 2>&1 echo x - sysutils/est/files/est.sh sed 's/^X//' >sysutils/est/files/est.sh << 'END-of-sysutils/est/files/est.sh' X#!/bin/sh X Xkmoddir=@@PREFIX@@/modules Xkmod=est.ko X Xcase "$1" in Xstart) X if [ -x $kmoddir/$kmod ]; then X echo -n ' est' X /sbin/kldload $kmoddir/$kmod X fi X ;; Xstop) X /sbin/kldunload $kmod && echo -n ' est' X ;; X*) X echo "Usage: `basename $0` {start|stop}" >&2 X exit 64 X ;; Xesac END-of-sysutils/est/files/est.sh echo x - sysutils/est/files/est.c.diff.fbsd4 sed 's/^X//' >sysutils/est/files/est.c.diff.fbsd4 << 'END-of-sysutils/est/files/est.c.diff.fbsd4' X--- est.c.orig Thu Aug 26 22:51:42 2004 X+++ est.c Thu Aug 26 22:53:59 2004 X@@ -33,7 +33,7 @@ X #include <sys/sysctl.h> X #include <sys/module.h> X #include <sys/kernel.h> X-#include <sys/pcpu.h> X+#include <sys/proc.h> X X typedef struct { X int mhz; X@@ -566,13 +566,13 @@ X X switch (what) { X case MOD_LOAD: X- err = kernel_sysctlbyname(curthread, "hw.model", hwmodel, X+ err = kernel_sysctlbyname(curproc, "hw.model", hwmodel, X &modellen, NULL, 0, NULL); X if (err) X return err; X X ncpulen = sizeof(ncpu); X- err = kernel_sysctlbyname(curthread, "hw.ncpu", &ncpu, X+ err = kernel_sysctlbyname(curproc, "hw.ncpu", &ncpu, X &ncpulen, NULL, 0, NULL); X if (err) X return err; END-of-sysutils/est/files/est.c.diff.fbsd4 exit --- est.shar ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040826222244.9674.qmail>