diff options
author | bms <bms@FreeBSD.org> | 2003-11-01 10:57:51 +0800 |
---|---|---|
committer | bms <bms@FreeBSD.org> | 2003-11-01 10:57:51 +0800 |
commit | e33c83d74b58e74272b5011771c112bc0babbc71 (patch) | |
tree | b1845ec7bea81da50b8091298bf1a2b9b4c2fe87 /sysutils | |
parent | 20b29dc79aece01319e507096dc2cbc527be6247 (diff) | |
download | freebsd-ports-gnome-e33c83d74b58e74272b5011771c112bc0babbc71.tar.gz freebsd-ports-gnome-e33c83d74b58e74272b5011771c112bc0babbc71.tar.zst freebsd-ports-gnome-e33c83d74b58e74272b5011771c112bc0babbc71.zip |
Unbreak build on 4-STABLE and 5.1-RELEASE. Add a warning which states
that 5.1-CURRENT is required in order to monitor ATA devices.
Diffstat (limited to 'sysutils')
-rw-r--r-- | sysutils/smartmontools-devel/Makefile | 7 | ||||
-rw-r--r-- | sysutils/smartmontools-devel/files/patch-knowndrives.c | 10 | ||||
-rw-r--r-- | sysutils/smartmontools-devel/files/patch-os_freebsd.c | 50 | ||||
-rw-r--r-- | sysutils/smartmontools/Makefile | 7 | ||||
-rw-r--r-- | sysutils/smartmontools/files/patch-knowndrives.c | 10 | ||||
-rw-r--r-- | sysutils/smartmontools/files/patch-os_freebsd.c | 50 |
6 files changed, 130 insertions, 4 deletions
diff --git a/sysutils/smartmontools-devel/Makefile b/sysutils/smartmontools-devel/Makefile index a3aec3f9a686..2699e4972ce5 100644 --- a/sysutils/smartmontools-devel/Makefile +++ b/sysutils/smartmontools-devel/Makefile @@ -7,6 +7,7 @@ PORTNAME= smartmontools PORTVERSION= 5.22 +PORTREVISION= 1 CATEGORIES= sysutils MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= ${PORTNAME} @@ -42,8 +43,10 @@ do-install: .include <bsd.port.pre.mk> -.if ${OSVERSION} < 500000 -IGNORE= smartmontools currently support only FreeBSD 5.x +.if ${OSVERSION} < 501112 +pre-everything: + @${ECHO} "WARNING: In order to support monitoring of ATA devices," + @${ECHO} "${PORTNAME} requires 5.1-CURRENT (__FreeBSD_version 501112)." .endif post-install: diff --git a/sysutils/smartmontools-devel/files/patch-knowndrives.c b/sysutils/smartmontools-devel/files/patch-knowndrives.c new file mode 100644 index 000000000000..31472c3a0a57 --- /dev/null +++ b/sysutils/smartmontools-devel/files/patch-knowndrives.c @@ -0,0 +1,10 @@ +--- knowndrives.c.orig Sat Nov 1 02:33:08 2003 ++++ knowndrives.c Sat Nov 1 02:33:20 2003 +@@ -17,6 +17,7 @@ + * + */ + ++#include <sys/types.h> + #include <stdio.h> + #include <regex.h> + #include "atacmds.h" diff --git a/sysutils/smartmontools-devel/files/patch-os_freebsd.c b/sysutils/smartmontools-devel/files/patch-os_freebsd.c new file mode 100644 index 000000000000..f7fb6ba13752 --- /dev/null +++ b/sysutils/smartmontools-devel/files/patch-os_freebsd.c @@ -0,0 +1,50 @@ +--- os_freebsd.c.orig Sat Nov 1 02:34:37 2003 ++++ os_freebsd.c Sat Nov 1 02:40:19 2003 +@@ -402,13 +402,17 @@ + + if (cam_send_ccb(cam_dev,ccb) < 0) { + warn("error sending SCSI ccb"); ++ #if __FreeBSD_version > 500000 + cam_error_print(cam_dev,ccb,CAM_ESF_ALL,CAM_EPF_ALL,stderr); ++ #endif + cam_freeccb(ccb); + return -1; + } + + if ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) { ++ #if __FreeBSD_version > 500000 + cam_error_print(cam_dev,ccb,CAM_ESF_ALL,CAM_EPF_ALL,stderr); ++ #endif + cam_freeccb(ccb); + return -1; + } +@@ -426,8 +430,10 @@ + cam_close_device(cam_dev); + + if (report > 0) { ++ int trunc; ++ + pout(" status=0\n"); +- int trunc = (iop->dxfer_len > 256) ? 1 : 0; ++ trunc = (iop->dxfer_len > 256) ? 1 : 0; + + pout(" Incoming data, len=%d%s:\n", (int)iop->dxfer_len, + (trunc ? " [only first 256 bytes shown]" : "")); +@@ -444,6 +450,9 @@ + + + static int get_ata_channel_unit ( const char* name, int* unit, int* dev) { ++#ifndef ATAREQUEST ++ return -1; ++#else + // there is no direct correlation between name 'ad0, ad1, ...' and + // channel/unit number. So we need to iterate through the possible + // channels and check each unit to see if we match names +@@ -483,6 +492,7 @@ + return -1; + else + return 0; ++#endif + } + + diff --git a/sysutils/smartmontools/Makefile b/sysutils/smartmontools/Makefile index a3aec3f9a686..2699e4972ce5 100644 --- a/sysutils/smartmontools/Makefile +++ b/sysutils/smartmontools/Makefile @@ -7,6 +7,7 @@ PORTNAME= smartmontools PORTVERSION= 5.22 +PORTREVISION= 1 CATEGORIES= sysutils MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= ${PORTNAME} @@ -42,8 +43,10 @@ do-install: .include <bsd.port.pre.mk> -.if ${OSVERSION} < 500000 -IGNORE= smartmontools currently support only FreeBSD 5.x +.if ${OSVERSION} < 501112 +pre-everything: + @${ECHO} "WARNING: In order to support monitoring of ATA devices," + @${ECHO} "${PORTNAME} requires 5.1-CURRENT (__FreeBSD_version 501112)." .endif post-install: diff --git a/sysutils/smartmontools/files/patch-knowndrives.c b/sysutils/smartmontools/files/patch-knowndrives.c new file mode 100644 index 000000000000..31472c3a0a57 --- /dev/null +++ b/sysutils/smartmontools/files/patch-knowndrives.c @@ -0,0 +1,10 @@ +--- knowndrives.c.orig Sat Nov 1 02:33:08 2003 ++++ knowndrives.c Sat Nov 1 02:33:20 2003 +@@ -17,6 +17,7 @@ + * + */ + ++#include <sys/types.h> + #include <stdio.h> + #include <regex.h> + #include "atacmds.h" diff --git a/sysutils/smartmontools/files/patch-os_freebsd.c b/sysutils/smartmontools/files/patch-os_freebsd.c new file mode 100644 index 000000000000..f7fb6ba13752 --- /dev/null +++ b/sysutils/smartmontools/files/patch-os_freebsd.c @@ -0,0 +1,50 @@ +--- os_freebsd.c.orig Sat Nov 1 02:34:37 2003 ++++ os_freebsd.c Sat Nov 1 02:40:19 2003 +@@ -402,13 +402,17 @@ + + if (cam_send_ccb(cam_dev,ccb) < 0) { + warn("error sending SCSI ccb"); ++ #if __FreeBSD_version > 500000 + cam_error_print(cam_dev,ccb,CAM_ESF_ALL,CAM_EPF_ALL,stderr); ++ #endif + cam_freeccb(ccb); + return -1; + } + + if ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) { ++ #if __FreeBSD_version > 500000 + cam_error_print(cam_dev,ccb,CAM_ESF_ALL,CAM_EPF_ALL,stderr); ++ #endif + cam_freeccb(ccb); + return -1; + } +@@ -426,8 +430,10 @@ + cam_close_device(cam_dev); + + if (report > 0) { ++ int trunc; ++ + pout(" status=0\n"); +- int trunc = (iop->dxfer_len > 256) ? 1 : 0; ++ trunc = (iop->dxfer_len > 256) ? 1 : 0; + + pout(" Incoming data, len=%d%s:\n", (int)iop->dxfer_len, + (trunc ? " [only first 256 bytes shown]" : "")); +@@ -444,6 +450,9 @@ + + + static int get_ata_channel_unit ( const char* name, int* unit, int* dev) { ++#ifndef ATAREQUEST ++ return -1; ++#else + // there is no direct correlation between name 'ad0, ad1, ...' and + // channel/unit number. So we need to iterate through the possible + // channels and check each unit to see if we match names +@@ -483,6 +492,7 @@ + return -1; + else + return 0; ++#endif + } + + |