diff options
author | tijl <tijl@FreeBSD.org> | 2014-01-17 17:31:42 +0800 |
---|---|---|
committer | tijl <tijl@FreeBSD.org> | 2014-01-17 17:31:42 +0800 |
commit | b71f36d949de443e2df87e75e820936474da6f55 (patch) | |
tree | 9c42529b559a43d379b4ba162c22a4cad66138f7 /sysutils | |
parent | 700f91f3c2910ed8bfd40f051073a6fe25c5932f (diff) | |
download | freebsd-ports-gnome-b71f36d949de443e2df87e75e820936474da6f55.tar.gz freebsd-ports-gnome-b71f36d949de443e2df87e75e820936474da6f55.tar.zst freebsd-ports-gnome-b71f36d949de443e2df87e75e820936474da6f55.zip |
- Fix a crash with some SCSI disks.
- Add DOCS option and use option helpers.
- USES=gmake.
- Staging.
- Remove CFLAGS left from old versions.
PR: ports/181836
Approved by: maintainer timeout (3 weeks)
Diffstat (limited to 'sysutils')
-rw-r--r-- | sysutils/smartmontools/Makefile | 28 | ||||
-rw-r--r-- | sysutils/smartmontools/files/patch-os_freebsd.cpp | 31 | ||||
-rw-r--r-- | sysutils/smartmontools/pkg-plist | 4 |
3 files changed, 43 insertions, 20 deletions
diff --git a/sysutils/smartmontools/Makefile b/sysutils/smartmontools/Makefile index cc07ba17ec09..1c8846b6f342 100644 --- a/sysutils/smartmontools/Makefile +++ b/sysutils/smartmontools/Makefile @@ -3,6 +3,7 @@ PORTNAME= smartmontools PORTVERSION= 6.2 +PORTREVISION= 1 CATEGORIES= sysutils MASTER_SITES= SF @@ -13,7 +14,11 @@ LICENSE= GPLv2 CONFLICTS= smartmontools-devel-[0-9]* -USE_GMAKE= yes +OPTIONS_DEFINE= DOCS +DOCS_CONFIGURE_OFF= --without-docdir --without-exampledir +DOCS_CONFIGURE_ON= --with-docdir=${DOCSDIR} + +USES= gmake GNU_CONFIGURE= yes CONFIGURE_ARGS= --disable-dependency-tracking \ --enable-drivedb --enable-sample \ @@ -22,29 +27,14 @@ CONFIGURE_ARGS= --disable-dependency-tracking \ SUB_FILES= pkg-message smart USE_RC_SUBR= smartd -MAN5= smartd.conf.5 -MAN8= smartd.8 smartctl.8 - PORTDOCS= * -NO_STAGE= yes -.include <bsd.port.options.mk> - -.if ! ${PORT_OPTIONS:MDOCS} -CONFIGURE_ARGS+= --without-docdir --without-exampledir -.else -CONFIGURE_ARGS+= --with-docdir=${DOCSDIR} -.endif - -CFLAGS:= ${CFLAGS:S/-O2/-O/} -Wno-write-strings - post-patch: @${REINPLACE_CMD} -e 's| install-initdDATA| |' ${WRKSRC}/Makefile.in post-install: - ${MKDIR} ${PREFIX}/etc/periodic/daily - ${INSTALL_SCRIPT} ${WRKDIR}/smart ${PREFIX}/etc/periodic/daily/smart - - @${CAT} ${PKGMESSAGE} + ${MKDIR} ${STAGEDIR}${PREFIX}/etc/periodic/daily + ${INSTALL_SCRIPT} ${WRKDIR}/smart \ + ${STAGEDIR}${PREFIX}/etc/periodic/daily .include <bsd.port.mk> diff --git a/sysutils/smartmontools/files/patch-os_freebsd.cpp b/sysutils/smartmontools/files/patch-os_freebsd.cpp new file mode 100644 index 000000000000..51c20e3068e8 --- /dev/null +++ b/sysutils/smartmontools/files/patch-os_freebsd.cpp @@ -0,0 +1,31 @@ +--- os_freebsd.cpp.orig 2013-07-05 12:40:38.000000000 +0200 ++++ os_freebsd.cpp 2013-12-25 20:54:46.000000000 +0100 +@@ -445,7 +445,8 @@ + } + + if ((ccb.ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) { +- cam_error_print(m_camdev, &ccb, CAM_ESF_ALL, CAM_EPF_ALL, stderr); ++ if(scsi_debugmode > 0) ++ cam_error_print(m_camdev, &ccb, CAM_ESF_ALL, CAM_EPF_ALL, stderr); + set_err(EIO); + return -1; + } +@@ -997,13 +998,15 @@ + + if (cam_send_ccb(m_camdev,ccb) < 0) { + warn("error sending SCSI ccb"); +- cam_error_print(m_camdev,ccb,CAM_ESF_ALL,CAM_EPF_ALL,stderr); ++ if (report > 0) ++ cam_error_print(m_camdev,ccb,CAM_ESF_ALL,CAM_EPF_ALL,stderr); + cam_freeccb(ccb); + return -EIO; + } + +- if (((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) && ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_SCSI_STATUS_ERROR)) { +- cam_error_print(m_camdev,ccb,CAM_ESF_ALL,CAM_EPF_ALL,stderr); ++ if ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) { ++ if(report > 0) ++ cam_error_print(m_camdev,ccb,CAM_ESF_ALL,CAM_EPF_ALL,stderr); + cam_freeccb(ccb); + return -EIO; + } diff --git a/sysutils/smartmontools/pkg-plist b/sysutils/smartmontools/pkg-plist index 30869b1081a5..83e828bde203 100644 --- a/sysutils/smartmontools/pkg-plist +++ b/sysutils/smartmontools/pkg-plist @@ -1,7 +1,9 @@ -@stopdaemon smartd etc/periodic/daily/smart etc/smartd.conf.sample etc/smartd_warning.sh +man/man5/smartd.conf.5.gz +man/man8/smartd.8.gz +man/man8/smartctl.8.gz sbin/smartctl sbin/smartd sbin/update-smart-drivedb |