pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/sysutils/smartmontools smartmontools: fix build for Fr...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/ab5a7f87d818
branches:  trunk
changeset: 319600:ab5a7f87d818
user:      triaxx <triaxx%pkgsrc.org@localhost>
date:      Fri Feb 15 20:38:29 2019 +0000

description:
smartmontools: fix build for FreeBSD

* Change c++03 to c++: clang++ now identify strtoull()
* Patch NVMe
* Bump revision

diffstat:

 sysutils/smartmontools/Makefile                      |   6 ++--
 sysutils/smartmontools/distinfo                      |   3 +-
 sysutils/smartmontools/patches/patch-os__freebsd.cpp |  21 ++++++++++++++++++++
 3 files changed, 26 insertions(+), 4 deletions(-)

diffs (61 lines):

diff -r cd83aacae868 -r ab5a7f87d818 sysutils/smartmontools/Makefile
--- a/sysutils/smartmontools/Makefile   Fri Feb 15 20:13:21 2019 +0000
+++ b/sysutils/smartmontools/Makefile   Fri Feb 15 20:38:29 2019 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.35 2019/01/18 02:05:50 tnn Exp $
+# $NetBSD: Makefile,v 1.36 2019/02/15 20:38:29 triaxx Exp $
 
 DISTNAME=              smartmontools-7.0
-PKGREVISION=           1
+PKGREVISION=           2
 CATEGORIES=            sysutils
 MASTER_SITES=          ${MASTER_SITE_SOURCEFORGE:=smartmontools/}
 
@@ -13,7 +13,7 @@
 ONLY_FOR_PLATFORM=     Darwin-*-* DragonFly-*-* FreeBSD-*-* Linux-*-*
 ONLY_FOR_PLATFORM+=    NetBSD-*-* OpenBSD-*-* SunOS-*-*
 
-USE_LANGUAGES=         c c++03
+USE_LANGUAGES=         c c++
 USE_TOOLS+=            gmake
 GNU_CONFIGURE=         yes
 
diff -r cd83aacae868 -r ab5a7f87d818 sysutils/smartmontools/distinfo
--- a/sysutils/smartmontools/distinfo   Fri Feb 15 20:13:21 2019 +0000
+++ b/sysutils/smartmontools/distinfo   Fri Feb 15 20:38:29 2019 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.33 2019/01/18 02:04:43 tnn Exp $
+$NetBSD: distinfo,v 1.34 2019/02/15 20:38:29 triaxx Exp $
 
 SHA1 (smartmontools-7.0.tar.gz) = 00e6a7bb26b283695ab0deaf521be6723ba44f0a
 RMD160 (smartmontools-7.0.tar.gz) = db20533115aa05a52836dbef0006c664083fbe90
@@ -7,3 +7,4 @@
 SHA1 (patch-aa) = bd08aff267f0e9e9307ebc57858e61e35144bf16
 SHA1 (patch-ag) = 01b0b35d89d6d6a11b13b3c05a141c46a0c1590b
 SHA1 (patch-nvmecmds.cpp) = 0fec043f00b4a7fde2974e1a4670ce42343f2d52
+SHA1 (patch-os__freebsd.cpp) = 96db45ca207e3a2f0d454f7b5c8b1b0d4e8a3e9c
diff -r cd83aacae868 -r ab5a7f87d818 sysutils/smartmontools/patches/patch-os__freebsd.cpp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/smartmontools/patches/patch-os__freebsd.cpp      Fri Feb 15 20:38:29 2019 +0000
@@ -0,0 +1,21 @@
+$NetBSD: patch-os__freebsd.cpp,v 1.1 2019/02/15 20:38:29 triaxx Exp $
+
+* Big-endian support has been added to NVMe in FreeBSD 1200059: status field of
+  struct nvme_completion changed from struct nvme_status to uint16_t.
+  https://svnweb.freebsd.org/base/stable/12/sys/dev/nvme/nvme.h?revision=329824
+
+--- os_freebsd.cpp.orig        2018-12-05 18:30:46.000000000 +0000
++++ os_freebsd.cpp
+@@ -542,7 +542,12 @@ bool freebsd_nvme_device::nvme_pass_through(const nvme
+   out.result=cp_p->cdw0; // Command specific result (DW0)
+ 
+   if (nvme_completion_is_error(cp_p)) {  /* ignore DNR and More bits */
++#if __FreeBSD_version < 1200059
+     uint16_t nvme_status = ((cp_p->status.sct << 8) | cp_p->status.sc) & 0x3ff;
++#else
++    uint16_t nvme_status = NVME_STATUS_GET_SCT(cp_p->status) |
++                           NVME_STATUS_GET_SC(cp_p->status);
++#endif
+ 
+     return set_nvme_err(out, nvme_status);
+   }



Home | Main Index | Thread Index | Old Index