From 5543bf19eec9334d0e746eebc934bbc035cd9075 Mon Sep 17 00:00:00 2001 From: joerg Date: Mon, 19 Feb 2007 19:50:47 +0000 Subject: Modular Xorg and DragonFly support. --- sysutils/torsmo/Makefile | 9 +++++-- sysutils/torsmo/distinfo | 5 ++-- sysutils/torsmo/patches/patch-ad | 36 +++++++++++++++++++++++---- sysutils/torsmo/patches/patch-ae | 53 ++++++++++++++++++++++++++++++++++++++++ 4 files changed, 94 insertions(+), 9 deletions(-) create mode 100644 sysutils/torsmo/patches/patch-ae (limited to 'sysutils/torsmo') diff --git a/sysutils/torsmo/Makefile b/sysutils/torsmo/Makefile index d9cc34fe647..f8ffb65ea5a 100644 --- a/sysutils/torsmo/Makefile +++ b/sysutils/torsmo/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.2 2006/04/16 20:26:26 ghen Exp $ +# $NetBSD: Makefile,v 1.3 2007/02/19 19:50:47 joerg Exp $ DISTNAME= torsmo-0.18 CATEGORIES= sysutils @@ -31,5 +31,10 @@ do-install: ${INSTALL_DATA} ${WRKSRC:Q}/README ${DOCDIR:Q}/ ${INSTALL_DATA} ${WRKSRC:Q}/readme.html ${DOCDIR:Q}/ -.include "../../mk/x11.buildlink3.mk" +BUILDLINK_DEPMETHOD.libXt?= build + +.include "../../x11/libX11/buildlink3.mk" +.include "../../x11/libXext/buildlink3.mk" +.include "../../x11/libXt/buildlink3.mk" +.include "../../x11/xextproto/buildlink3.mk" .include "../../mk/bsd.pkg.mk" diff --git a/sysutils/torsmo/distinfo b/sysutils/torsmo/distinfo index 0f69d6cccdc..1d546292f9e 100644 --- a/sysutils/torsmo/distinfo +++ b/sysutils/torsmo/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.2 2006/10/05 02:53:55 rillig Exp $ +$NetBSD: distinfo,v 1.3 2007/02/19 19:50:48 joerg Exp $ SHA1 (torsmo-0.18.tar.gz) = 01e6737b3971daa3a7c9cb6dd1961f61bc39bdae RMD160 (torsmo-0.18.tar.gz) = f1d8b3c4679155596569f9116970e7ba8a01eb6e @@ -6,4 +6,5 @@ Size (torsmo-0.18.tar.gz) = 84020 bytes SHA1 (patch-aa) = b1d9e3eb7638e24c3cc595e9cd1e1c6054adf5cf SHA1 (patch-ab) = 3bf66bd2b7645c204099a8c7b806098d028cc8bf SHA1 (patch-ac) = 5b342d09ff0fcc3982aa855e2cc660823ed53e11 -SHA1 (patch-ad) = 827c1c98b302883bf91af2cee2f4efcd8ba635c4 +SHA1 (patch-ad) = 87fa39455dc2d5190c419142d5e4d0768914841e +SHA1 (patch-ae) = c5785c503776fa75d99025815ec95a1817ca9075 diff --git a/sysutils/torsmo/patches/patch-ad b/sysutils/torsmo/patches/patch-ad index 09d0f0ba05a..44e7440462a 100644 --- a/sysutils/torsmo/patches/patch-ad +++ b/sysutils/torsmo/patches/patch-ad @@ -1,8 +1,34 @@ -$NetBSD: patch-ad,v 1.1 2006/10/05 02:53:55 rillig Exp $ +$NetBSD: patch-ad,v 1.2 2007/02/19 19:50:48 joerg Exp $ ---- configure.orig 2006-10-05 04:52:34.000000000 +0200 -+++ configure 2006-10-05 04:53:06.000000000 +0200 -@@ -924,14 +924,14 @@ fi +--- configure.orig 2004-12-21 21:57:05.000000000 +0000 ++++ configure +@@ -795,11 +795,15 @@ fi + + uname=`uname` + ++if test "$uname" = "DragonFly"; then ++ LIBS="$LIBS -lkinfo" ++fi ++ + case $uname in + Linux*) + WANT_SYSINFO=yes + ;; +- FreeBSD*) ++ FreeBSD*|DragonFly*) + WANT_KVM=yes + ;; + NetBSD*) +@@ -839,7 +843,7 @@ else + fi + + +-if test x$uname = xFreeBSD; then ++if test x$uname = xFreeBSD || test x$uname = xDragonFly; then + BUILD_FREEBSD_TRUE= + BUILD_FREEBSD_FALSE='#' + else +@@ -924,14 +928,14 @@ fi @@ -19,7 +45,7 @@ $NetBSD: patch-ad,v 1.1 2006/10/05 02:53:55 rillig Exp $ cat >> confdefs.h <<\EOF #define SETI 1 EOF -@@ -949,14 +949,14 @@ fi +@@ -949,14 +953,14 @@ fi diff --git a/sysutils/torsmo/patches/patch-ae b/sysutils/torsmo/patches/patch-ae new file mode 100644 index 00000000000..d7fb46472b5 --- /dev/null +++ b/sysutils/torsmo/patches/patch-ae @@ -0,0 +1,53 @@ +$NetBSD: patch-ae,v 1.1 2007/02/19 19:50:48 joerg Exp $ + +--- freebsd.c.orig 2007-02-19 19:26:16.000000000 +0000 ++++ freebsd.c +@@ -13,7 +13,11 @@ + #include + #include + #include ++#ifdef __DragonFly__ ++#include ++#else + #include ++#endif + #include + #include + #include +@@ -251,6 +255,19 @@ long cpu_used, oldtotal, oldused; + + void update_cpu_usage() { + long used, total; ++#ifdef __DragonFly__ ++ struct kinfo_cputime cp_time; ++ ++ if (kinfo_get_sched_cputime(&cp_time)) { ++ fprintf(stderr, "kinfo_get_sched_cputime failed"); ++ return; ++ } ++ fresh.load[0] = cp_time.cp_user; ++ fresh.load[0] = cp_time.cp_nice; ++ fresh.load[0] = cp_time.cp_sys; ++ fresh.load[0] = cp_time.cp_idle; ++ fresh.load[0] = cp_time.cp_idle; ++#else + long cp_time[CPUSTATES]; + size_t len = sizeof(cp_time); + +@@ -263,6 +280,7 @@ void update_cpu_usage() { + fresh.load[2] = cp_time[CP_SYS]; + fresh.load[3] = cp_time[CP_IDLE]; + fresh.load[4] = cp_time[CP_IDLE]; ++#endif + + used = fresh.load[0] + fresh.load[1] + fresh.load[2]; + total = fresh.load[0] + fresh.load[1] + fresh.load[2] + fresh.load[3]; +@@ -345,3 +363,8 @@ char* get_acpi_ac_adapter(void) + char* get_acpi_fan() { + return ""; + } ++ ++char * get_freq() ++{ ++ return ""; ++} -- cgit v1.2.3