aboutsummaryrefslogtreecommitdiff
path: root/sysutils/xmbmon
diff options
context:
space:
mode:
authorJean-Yves Lefort <jylefort@FreeBSD.org>2006-02-01 20:05:08 +0000
committerJean-Yves Lefort <jylefort@FreeBSD.org>2006-02-01 20:05:08 +0000
commit0bdafa9ce292c464890affc3c2c0b381cb30ec81 (patch)
tree01cdd838c1c83f04a6b0420f0ed446f4da9a39ed /sysutils/xmbmon
parent33af4d91ed7a6cecda5d7256bce87a23358caee0 (diff)
downloadports-0bdafa9ce292c464890affc3c2c0b381cb30ec81.tar.gz
ports-0bdafa9ce292c464890affc3c2c0b381cb30ec81.zip
Notes
Diffstat (limited to 'sysutils/xmbmon')
-rw-r--r--sysutils/xmbmon/Makefile55
-rw-r--r--sysutils/xmbmon/distinfo3
-rw-r--r--sysutils/xmbmon/files/patch-aa68
-rw-r--r--sysutils/xmbmon/files/patch-configure22
-rw-r--r--sysutils/xmbmon/files/patch-getMB-smb_ioctl.c24
-rw-r--r--sysutils/xmbmon/files/patch-mbmon.c13
-rw-r--r--sysutils/xmbmon/files/patch-pci_pm.c28
-rw-r--r--sysutils/xmbmon/files/patch-pci_pm.h27
-rw-r--r--sysutils/xmbmon/files/patch-sens_lm85.c71
-rw-r--r--sysutils/xmbmon/files/patch-testsmb.c44
-rw-r--r--sysutils/xmbmon/files/patch-xmbmon.c17
-rw-r--r--sysutils/xmbmon/pkg-descr15
-rw-r--r--sysutils/xmbmon/pkg-plist7
13 files changed, 24 insertions, 370 deletions
diff --git a/sysutils/xmbmon/Makefile b/sysutils/xmbmon/Makefile
index 31c2e451e7f4..3605c5890798 100644
--- a/sysutils/xmbmon/Makefile
+++ b/sysutils/xmbmon/Makefile
@@ -6,55 +6,20 @@
#
PORTNAME= xmbmon
-PORTVERSION= 205
-PORTREVISION= 5
-CATEGORIES= sysutils
-MASTER_SITES= http://www.nt.phys.kyushu-u.ac.jp/shimizu/download/xmbmon/
-.if defined(WITHOUT_X11)
-PKGNAMESUFFIX= -nox11
-.endif
-DISTNAME= ${PORTNAME}${PORTVERSION}
+PORTREVISION= 6
-MAINTAINER= ports@FreeBSD.ORG
-COMMENT= X/tty motherboard monitor for LM78/79, W8378x, AS99127F, VT82C686 and ADM9240
+COMMENT= A X motherboard monitor for LM78/79, W8378x, AS99127F, VT82C686 and ADM9240
-USE_REINPLACE= yes
-GNU_CONFIGURE= yes
-.if defined(WITHOUT_X11)
-PLIST_SUB= X11_ONLY="@comment "
-.else
-USE_XLIB= yes
-PLIST_SUB= X11_ONLY=""
-.endif
+MASTERDIR= ${.CURDIR}/../mbmon
-MAKE_ARGS+= DOCSDIR='${DOCSDIR}' INSTALL_DATA='${INSTALL_DATA}' PREFIX='${PREFIX}'
+USE_X_PREFIX= yes
+EXTRA_PATCHES= ${.CURDIR}/files/patch-*
-MAN1= xmbmon.1x mbmon.1
-
-.include <bsd.port.pre.mk>
-
-.if ${ARCH} != "i386" && ${ARCH} != "amd64"
-BROKEN= "Does not compile on !i386 and !amd64"
-.endif
-
-pre-everything::
- @${ECHO_CMD} ""
- @${ECHO_CMD} "Definable build options"
- @${ECHO_CMD} "-----------------------"
- @${ECHO_CMD} "WITHOUT_X11 - Self explanatory"
- @${ECHO_CMD} "WITHOUT_SMB - disable smb(4) support"
- @${ECHO_CMD} ""
-
-post-patch:
- @${REINPLACE_CMD} -e 's+/usr/share/doc/mbmon+${DOCSDIR}+' ${WRKSRC}/mbmon.1
-.if !defined(WITHOUT_SMB)
- @${REINPLACE_CMD} -e 's/^DEFS=/&-DSMBUS_IOCTL /' ${WRKSRC}/Makefile.in
-.endif
+PLIST_FILES= lib/X11/app-defaults/XMBmon
+MAN1= xmbmon.1x
post-install:
-.if !defined(NOPORTDOCS)
- @${MKDIR} ${DOCSDIR}
- (cd ${WRKSRC}; ${MAKE} ${MAKE_ARGS} install-man install-doc)
-.endif
+ ${MKDIR} ${PREFIX}/lib/X11/app-defaults
+ ${INSTALL_DATA} ${WRKSRC}/xmbmon.resources ${PREFIX}/lib/X11/app-defaults/XMBmon
-.include <bsd.port.post.mk>
+.include "${MASTERDIR}/Makefile"
diff --git a/sysutils/xmbmon/distinfo b/sysutils/xmbmon/distinfo
deleted file mode 100644
index 56451adec0dc..000000000000
--- a/sysutils/xmbmon/distinfo
+++ /dev/null
@@ -1,3 +0,0 @@
-MD5 (xmbmon205.tar.gz) = ab6614c785f5b653fcc69fb9c02058f0
-SHA256 (xmbmon205.tar.gz) = 65b10ebfe53585ac22d6a31d8ef3fea552cb266cf2c124c00421dec1df5a4a4f
-SIZE (xmbmon205.tar.gz) = 142987
diff --git a/sysutils/xmbmon/files/patch-aa b/sysutils/xmbmon/files/patch-aa
deleted file mode 100644
index 3b4e65a7d9ac..000000000000
--- a/sysutils/xmbmon/files/patch-aa
+++ /dev/null
@@ -1,68 +0,0 @@
---- Makefile.in.orig Fri Aug 13 16:04:21 2004
-+++ Makefile.in Fri Sep 17 05:34:33 2004
-@@ -26,8 +26,8 @@
- LIBSX=$(LIBS) @X_LIBS@ -lXt @X_PRE_LIBS@ -lX11 @X_EXTRA_LIBS@
-
- #CC=/compat/linux/usr/bin/gcc
--CC=@CC@
--CFLAGS=-O3 $(INCLUDES) $(DEFS)
-+CC?=@CC@
-+CFLAGS+=$(INCLUDES) $(DEFS)
- CFLAGSX=$(CFLAGS) @X_CFLAGS@
- LDFLAGS=-s
-
-@@ -37,19 +37,25 @@
- RM=rm -f
- INSTALL=install
-
--INST_DIR=/usr/local/bin
--INST_MANDIR=/usr/local/man/man1
--INST_XDIR=/usr/X11R6/bin
--INST_MANXDIR=/usr/X11R6/man/man1
--INST_XRDIR=/usr/X11R6/lib/X11/app-defaults
-+INST_DIR=$(PREFIX)/bin
-+INST_MANDIR=$(PREFIX)/man/man1
-+INST_XDIR=$(X11BASE)/bin
-+INST_MANXDIR=$(X11BASE)/man/man1
-+INST_XRDIR=$(X11BASE)/lib/X11/app-defaults
-
- .c.o:
- $(CC) -c $(CFLAGS) $*.c
-
- MANPAGE = mbmon.1 xmbmon.1x
--PROGRAM = mbmon xmbmon
--
-+PROGRAM = mbmon
- TESTPROG = testpci testsmb testhwm testfan
-+DOCS= ReadMe ReadMe.jp ReadMe.tech
-+.if !defined(WITHOUT_X11)
-+DOCS+= xmbmon.resources
-+PROGRAM+= xmbmon
-+.endif
-+
-+all: $(PROGRAM) $(TESTPROG)
-
- MB_OBJ = getMB-via.o getMB-smb.o getMB-isa.o
- SMB_OBJ = smbuses.o smbus_piix4.o smbus_amd.o smbus_ali.o smbus_amd8.o
-@@ -133,12 +139,18 @@
- $(RM) Makefile config.cache config.log config.h config.status
-
- install: $(PROGRAM)
-- $(INSTALL) -o root -g wheel -m 4555 -c -p mbmon $(INST_DIR)
-- $(INSTALL) -o root -g wheel -m 4555 -c -p xmbmon $(INST_XDIR)
-+ @for i in $(PROGRAM); do \
-+ $(INSTALL) -o root -g wheel -m 4555 -c -p $$i $(INST_DIR); \
-+ done
-
- install-man: $(MANPAGE)
- $(INSTALL) -o root -g wheel -m 444 -c -p mbmon.1 $(INST_MANDIR)
-- $(INSTALL) -o root -g wheel -m 444 -c -p xmbmon.1x $(INST_MANXDIR)
-+
-+install-doc:
-+ @for f in $(DOCS); do \
-+ $(INSTALL_DATA) $$f $(DOCSDIR)/; \
-+ done
-+ $(INSTALL) -o root -g wheel -m 444 -c -p xmbmon.1x $(INST_MANDIR)
-
- lint:
- $(LINT) $(INCLUDES) $(DEFS) $(FONTDEFINES) $(SRCS) -lm
diff --git a/sysutils/xmbmon/files/patch-configure b/sysutils/xmbmon/files/patch-configure
deleted file mode 100644
index 7bd6af8d22b4..000000000000
--- a/sysutils/xmbmon/files/patch-configure
+++ /dev/null
@@ -1,22 +0,0 @@
-$FreeBSD$
-
---- configure Fri Aug 13 10:22:18 2004
-+++ configure Fri Dec 30 23:37:25 2005
-@@ -3486,7 +3486,7 @@
-
-
- case "${host}" in
-- i?86-*-freebsd*)
-+ i?86-*-freebsd* | amd64-*-freebsd*)
- CC=cc
- ;;
- i?86-*-linux-*)
-@@ -3946,7 +3946,7 @@
- done
-
-
--for ac_header in machine/smb.h
-+for ac_header in dev/smbus/smb.h machine/smb.h
- do
- as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
- if eval "test \"\${$as_ac_Header+set}\" = set"; then
diff --git a/sysutils/xmbmon/files/patch-getMB-smb_ioctl.c b/sysutils/xmbmon/files/patch-getMB-smb_ioctl.c
deleted file mode 100644
index 7fe81da58542..000000000000
--- a/sysutils/xmbmon/files/patch-getMB-smb_ioctl.c
+++ /dev/null
@@ -1,24 +0,0 @@
-$FreeBSD$
-
---- getMB-smb_ioctl.c.orig Sat Jul 5 18:15:24 2003
-+++ getMB-smb_ioctl.c Fri Dec 16 17:56:54 2005
-@@ -5,6 +5,7 @@
- #ifdef HAVE_SMBUS
- /* assume SMBus ioctl support, only for FreeBSD */
-
-+#include <sys/param.h>
- #include <stdlib.h>
- #include <stdio.h>
- #include <fcntl.h>
-@@ -13,7 +14,11 @@
- #include <sys/types.h>
- #include <sys/ioctl.h>
-
-+#if __FreeBSD_version >= 500000
-+#include <dev/smbus/smb.h>
-+#else
- #include <machine/smb.h>
-+#endif
-
- #include "methods.h"
-
diff --git a/sysutils/xmbmon/files/patch-mbmon.c b/sysutils/xmbmon/files/patch-mbmon.c
deleted file mode 100644
index 5eca1d5b8d37..000000000000
--- a/sysutils/xmbmon/files/patch-mbmon.c
+++ /dev/null
@@ -1,13 +0,0 @@
-$FreeBSD$
-
---- mbmon.c Fri Aug 13 10:23:32 2004
-+++ mbmon.c Tue Dec 27 16:59:48 2005
-@@ -315,7 +315,7 @@
-
- name = argv[0];
- #if !defined(LINUX) && defined(HAVE_SMBUS) && defined(SMBUS_IOCTL)
-- while ((ch = getopt(argc,argv,"VSIAfdDYe:p:s:c:T:F:tunNirh")) != -1) {
-+ while ((ch = getopt(argc,argv,"VSIAfdDYe:p:s:c:T:F:tunNirhP:")) != -1) {
- #else
- while ((ch = getopt(argc,argv,"VSIAfdDYe:p:c:T:F:tunNirhP:")) != -1) {
- #endif
diff --git a/sysutils/xmbmon/files/patch-pci_pm.c b/sysutils/xmbmon/files/patch-pci_pm.c
deleted file mode 100644
index a5b7076e7588..000000000000
--- a/sysutils/xmbmon/files/patch-pci_pm.c
+++ /dev/null
@@ -1,28 +0,0 @@
---- pci_pm.c.orig Tue Aug 17 19:38:04 2004
-+++ pci_pm.c Fri Dec 30 23:05:40 2005
-@@ -64,7 +64,7 @@
- comt = "Intel8XX(ICH/ICH2/ICH3/ICH4/ICH5/ICH6)";
- break;
- case AMD756SMB:
-- comt = "AMD756/766/768";
-+ comt = "AMD756/766/768/8111";
- break;
- case NFORCESMB:
- comt = "NVidia nForce";
-@@ -166,6 +166,7 @@
- case ID_AMD756:
- case ID_AMD766:
- case ID_AMD768:
-+ case ID_AMD8111_1:
- ret = AMD756SMB;
- inq_smbba = getSMBBA3;
- break;
-@@ -182,7 +183,7 @@
- inq_smbba = getSMBBA4;
- }
- break;
-- case ID_AMD8111:
-+ case ID_AMD8111_2:
- ret = AMD8111SMB;
- inq_smbba = getSMBBA6;
- break;
diff --git a/sysutils/xmbmon/files/patch-pci_pm.h b/sysutils/xmbmon/files/patch-pci_pm.h
deleted file mode 100644
index 8a7203e02cb8..000000000000
--- a/sysutils/xmbmon/files/patch-pci_pm.h
+++ /dev/null
@@ -1,27 +0,0 @@
-$FreeBSD$
-
---- pci_pm.h Wed Jul 14 18:02:49 2004
-+++ pci_pm.h Fri Dec 30 23:06:26 2005
-@@ -32,10 +32,10 @@
- #define getSMBBA0 0x90 /* PIIX4, VIA596,686 */
- #define getSMBBA1 0xD0 /* VT8233/A/C */
- #define getSMBBA2 0x20 /* Intel801_ICH's */
--#define getSMBBA3 0x58 /* AMD756,766,768 */
-+#define getSMBBA3 0x58 /* AMD756,766,768,8111 */
- #define getSMBBA4 0x14 /* NVidia nForce */
- #define getSMBBA5 0xE2 /* ALI7101 */
--#define getSMBBA6 0x10 /* AMD8111 */
-+#define getSMBBA6 0x10 /* AMD8111 SMBus 2.0 */
- #define getSMBBA70 0x50 /* NVidia nForce2, bus0 */
- #define getSMBBA71 0x54 /* NVidia nForce2, bus1 */
-
-@@ -68,7 +68,8 @@
- #define ID_AMD756 0x740B1022
- #define ID_AMD766 0x74131022
- #define ID_AMD768 0x74431022
--#define ID_AMD8111 0x746A1022
-+#define ID_AMD8111_1 0x746B1022
-+#define ID_AMD8111_2 0x746A1022
- #define ID_NFORCE 0x01B410DE
- #define ID_NFORCE2 0x006410DE
- #define ID_ALI7101 0x710110B9
diff --git a/sysutils/xmbmon/files/patch-sens_lm85.c b/sysutils/xmbmon/files/patch-sens_lm85.c
deleted file mode 100644
index 3caa2c7a9754..000000000000
--- a/sysutils/xmbmon/files/patch-sens_lm85.c
+++ /dev/null
@@ -1,71 +0,0 @@
-$FreeBSD$
-
---- sens_lm85.c Mon Oct 13 10:12:58 2003
-+++ sens_lm85.c Wed Dec 21 15:37:56 2005
-@@ -53,7 +53,6 @@
- #define ADM_24FAN(nr) (0x28 + (nr))
- #define ADM_24FANDIV 0x47
- #define ADM_24MODE 0x16
--#define ADM_TEMPOFF(nr) (0x70 + (nr))
- #define ADM_EXTRES1 0x76
- #define ADM_EXTRES2 0x77
- #define ADM_FANPPR 0x7B
-@@ -213,7 +212,7 @@
- static float lm85_temp( LM_METHODS *method, int no )
- {
- int n, ne;
-- float ext = 0.0, offset = 0.0;
-+ float ext = 0.0;
-
- if (no < 0 || 2 < no)
- return 0xFFFF;
-@@ -226,18 +225,20 @@
- } else if (lm85chipid >= ADM1027) {
- ne = method->Read(ADM_EXTRES2);
- ext = 0.25 * ((ne >> ((no + 1) * 2)) & 0x03);
-- n = method->Read(ADM_TEMPOFF(no));
-- if (n > 0x80)
-- n -= 0xFF;
-- offset = (float) n;
-+ /* Unlock temperature registers. */
-+ if (no != 0) method->Read(LM85_TEMP(0));
-+ if (no != 1) method->Read(LM85_TEMP(1));
-+ if (no != 2) method->Read(LM85_TEMP(2));
-+ /* Unlock voltage register. */
-+ method->Read(LM85_VOLT(4));
- }
- n = method->Read(LM85_TEMP(no));
- if (n == 0x80)
- return 0xFFFF;
- else if (n > 0x80)
-- return (float) (n - 0xFF) + ext - offset;
-+ return (float) (n - 0xFF) + ext;
- else
-- return (float) n + ext - offset;
-+ return (float) n + ext;
- }
-
-
-@@ -262,10 +263,20 @@
- return 0xFFFF;
-
- if (lm85chipid >= ADM1027) {
-- if (no == 4)
-+ if (no == 4) {
- ne = method->Read(ADM_EXTRES2) & 0x03;
-- else
-+ /* Unlock temperature registers. */
-+ method->Read(LM85_TEMP(0));
-+ method->Read(LM85_TEMP(1));
-+ method->Read(LM85_TEMP(2));
-+ } else {
- ne = (method->Read(ADM_EXTRES1) >> (no * 2)) & 0x03;
-+ /* Unlock voltage registers. */
-+ if (no != 0) method->Read(LM85_VOLT(0));
-+ if (no != 1) method->Read(LM85_VOLT(1));
-+ if (no != 2) method->Read(LM85_VOLT(2));
-+ if (no != 3) method->Read(LM85_VOLT(3));
-+ }
- }
- n = method->Read(LM85_VOLT(no));
- if (lm85chipid >= ADM1027)
diff --git a/sysutils/xmbmon/files/patch-testsmb.c b/sysutils/xmbmon/files/patch-testsmb.c
deleted file mode 100644
index 52d6d6cf7934..000000000000
--- a/sysutils/xmbmon/files/patch-testsmb.c
+++ /dev/null
@@ -1,44 +0,0 @@
-$FreeBSD$
-
---- testsmb.c Thu Aug 12 07:34:48 2004
-+++ testsmb.c Fri Dec 30 23:11:29 2005
-@@ -105,8 +105,9 @@
- case ID_AMD756:
- case ID_AMD766:
- case ID_AMD768:
-+ case ID_AMD8111_1:
- smbus = &smbus_amd;
-- fprintf(stderr, "AMD756/766/768 found.\n");
-+ fprintf(stderr, "AMD756/766/768/8111 found.\n");
- break;
- case ID_NFORCE:
- smbus = &smbus_amd;
-@@ -116,9 +117,9 @@
- smbus = &smbus_ali;
- fprintf(stderr, "ALi M1535D+ found.\n");
- break;
-- case ID_AMD8111:
-+ case ID_AMD8111_2:
- smbus = &smbus_amd8;
-- fprintf(stderr, "AMD8111 found.\n");
-+ fprintf(stderr, "AMD8111 SMBus 2.0 found.\n");
- break;
- case ID_NFORCE2:
- smbus = &smbus_amd8;
-@@ -126,7 +127,7 @@
- break;
- default:
- fprintf(stderr, "No known SMBus(I2C) chip found.\n");
-- goto exit;
-+ continue;
- }
-
- if(OpenIO() == -1) return -1;
-@@ -141,7 +142,6 @@
- }
-
- CloseIO();
--exit:
- ; /* dummy statment for gcc 3.4 or after */
-
- } /* endo of Big loop for smb_base candidates */
diff --git a/sysutils/xmbmon/files/patch-xmbmon.c b/sysutils/xmbmon/files/patch-xmbmon.c
index 171f801bea18..dafca35f6e8c 100644
--- a/sysutils/xmbmon/files/patch-xmbmon.c
+++ b/sysutils/xmbmon/files/patch-xmbmon.c
@@ -1,6 +1,17 @@
---- xmbmon.c.orig Mon Feb 23 00:32:24 2004
-+++ xmbmon.c Mon Feb 23 00:32:43 2004
-@@ -32,7 +32,7 @@
+--- xmbmon.c.orig Thu Aug 12 06:37:03 2004
++++ xmbmon.c Wed Feb 1 20:44:54 2006
+@@ -23,16 +23,16 @@
+ #define RES_NAME "XMBmon"
+
+ #define DEFAULT_GEOMETRY "100x140"
+-#define DEFAULT_FONT "-adobe-helvetica-bold-r-*-*-10-*-*-*-*-*-*-*"
++#define DEFAULT_FONT "fixed"
+
+-#define DEFAULT_LBFONT "-adobe-helvetica-bold-r-*-*-12-*-*-*-*-*-*-*"
++#define DEFAULT_LBFONT "fixed"
+ #define DEFAULT_LBCOLOR "black"
+
+ #define DEFAULT_COUNT "4"
#define DEFAULT_CSEC "20"
#define DEFAULT_WSEC "1800"
#define DEFAULT_TMIN "10.0"
diff --git a/sysutils/xmbmon/pkg-descr b/sysutils/xmbmon/pkg-descr
deleted file mode 100644
index 5d70f1cac7a3..000000000000
--- a/sysutils/xmbmon/pkg-descr
+++ /dev/null
@@ -1,15 +0,0 @@
-This is an X/tty motherboard monitor which supports LM78/79, WINBond
-83781D/83782D/83783S, ASUS 991227F, and VIA VT82C686A/B PC-health
-chips via 3 methods: ISA-I/O, SMBus, VIA-direct.
-
-Run "mbmon -h" or "xmbmon -help" to see the usage.
-
-***CAUTION***
-
-These programs access to the SMBus or the ISA-IO port directly under
-the superuser privilege, so it may cause a system crash. Please test
-"mbmon -d" or "xmbmon -debug" first.
-
-WWW: http://www.nt.phys.kyushu-u.ac.jp/shimizu/download/download.html
---
-kaz@kobe1995.net (NAKAMURA Kazushi)
diff --git a/sysutils/xmbmon/pkg-plist b/sysutils/xmbmon/pkg-plist
deleted file mode 100644
index 166dea5bd162..000000000000
--- a/sysutils/xmbmon/pkg-plist
+++ /dev/null
@@ -1,7 +0,0 @@
-bin/mbmon
-%%X11_ONLY%%bin/xmbmon
-%%PORTDOCS%%%%DOCSDIR%%/ReadMe
-%%PORTDOCS%%%%DOCSDIR%%/ReadMe.jp
-%%PORTDOCS%%%%DOCSDIR%%/ReadMe.tech
-%%X11_ONLY%%%%PORTDOCS%%%%DOCSDIR%%/xmbmon.resources
-%%PORTDOCS%%@dirrm %%DOCSDIR%%