Index: head/sysutils/xen-tools/Makefile =================================================================== --- head/sysutils/xen-tools/Makefile (revision 528770) +++ head/sysutils/xen-tools/Makefile (revision 528771) @@ -1,91 +1,94 @@ # $FreeBSD$ PORTNAME= xen PKGNAMESUFFIX= -tools PORTVERSION= 4.13.0 -PORTREVISION= 0 +PORTREVISION= 1 CATEGORIES= sysutils emulators MASTER_SITES= http://downloads.xenproject.org/release/xen/${PORTVERSION}/ MAINTAINER= royger@FreeBSD.org COMMENT= Xen management tools LICENSE= GPLv2 LGPL3 LICENSE_COMB= multi LIB_DEPENDS= libyajl.so:devel/yajl \ liblzo2.so:archivers/lzo2 \ libpixman-1.so:x11/pixman \ libargp.so:devel/argp-standalone \ libxml2.so:textproc/libxml2 BUILD_DEPENDS= seabios>0:misc/seabios RUN_DEPENDS= seabios>0:misc/seabios DOCS_BUILD_DEPENDS=markdown:textproc/markdown OPTIONS_DEFINE= DOCS SPICE OPTIONS_DEFAULT= DOCS OPTIONS_SUB= yes SPICE_DESC= Enable SPICE protocol for QEMU SPICE_CONFIGURE_WITH= extra-qemuu-configure-args="--enable-spice" SPICE_BUILD_DEPENDS= spice-protocol>=0.12.10:devel/spice-protocol SPICE_LIB_DEPENDS= libspice-server.so:devel/libspice-server ONLY_FOR_ARCHS= amd64 ONLY_FOR_ARCHS_REASON= "not yet ported to anything other than amd64" USES= cpe gettext gmake gnome libtool localbase:ldflags perl5 \ pkgconfig python shebangfix iconv USE_GNOME= glib20 USE_LDCONFIG= yes USE_PYTHON= py3kplist HAS_CONFIGURE= yes # Set ARCH=x86_64 in order to overwrite the environment ARCH=amd64 MAKE_ARGS= clang=y ARCH=x86_64 CONFIGURE_ARGS+= --with-system-seabios=${LOCALBASE}/share/seabios/bios.bin \ --mandir=${MANPREFIX}/man SHEBANG_FILES= tools/misc/xencov_split \ tools/python/scripts/convert-legacy-stream \ tools/python/scripts/verify-stream-v2 \ tools/xenmon/xenmon.py ALL_TARGET= tools DOCS_ALL_TARGET= docs INSTALL_TARGET= install-tools DOCS_INSTALL_TARGET= install-docs + +# Fix build with clang 10.0 (re convert enum constant to boolean) +EXTRA_PATCHES+= ${PATCHDIR}/0001-libfsimage-fix-clang-10-build.patch .include .if ${OPSYS} != FreeBSD IGNORE= only supported on FreeBSD .endif .if ${OSVERSION} < 1200074 IGNORE= only supported on FreeBSD 12.0 or newer .endif .if ${PORT_OPTIONS:MSPICE} && ${OSVERSION} < 1300008 BROKEN= SPICE support requires FreeBSD version 13.0 or higher .endif post-patch: @for p in `ls ${FILESDIR}/*qemuu*.patch 2>/dev/null`; do \ ${ECHO_CMD} "====> Applying $${p##*/}" ; \ ${PATCH} -s -p1 -i $${p} -d ${WRKSRC}/tools/qemu-xen ; \ done # The ports native 'build' target cannot be used because it sets CFLAGS, and # that breaks the Xen kernel build system that's used by the tools in order to # build the pv-shim. do-build: ${MAKE_CMD} -j${MAKE_JOBS_NUMBER} -C ${WRKSRC} ${MAKE_ARGS} ${ALL_TARGET} do-install: ${MAKE_CMD} -j${MAKE_JOBS_NUMBER} -C ${WRKSRC} ${MAKE_ARGS} ${INSTALL_TARGET} post-install: ${MKDIR} ${STAGEDIR}/var/run/xen .include Index: head/sysutils/xen-tools/files/0001-libfsimage-fix-clang-10-build.patch =================================================================== --- head/sysutils/xen-tools/files/0001-libfsimage-fix-clang-10-build.patch (nonexistent) +++ head/sysutils/xen-tools/files/0001-libfsimage-fix-clang-10-build.patch (revision 528771) @@ -0,0 +1,52 @@ +From e54c433adf01a242bf6e9fe9378a2c83d3f8b419 Mon Sep 17 00:00:00 2001 +From: Roger Pau Monne +Date: Fri, 13 Mar 2020 09:45:57 +0100 +Subject: [PATCH] libfsimage: fix clang 10 build +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +clang complains with: + +fsys_zfs.c:826:2: error: converting the enum constant to a boolean [-Werror,-Wint-in-bool-context] + VERIFY_DN_TYPE(dn, DMU_OT_PLAIN_FILE_CONTENTS); + ^ +/wrkdirs/usr/ports/sysutils/xen-tools/work/xen-4.13.0/tools/libfsimage/zfs/../../../tools/libfsimage/zfs/fsys_zfs.h:74:11: note: expanded from macro 'VERIFY_DN_TYPE' + if (type && (dnp)->dn_type != type) { \ + ^ +1 error generated. + +Fix this by not forcing an implicit conversion of the enum into a +boolean and instead comparing with the 0 enumerator. + +Signed-off-by: Roger Pau Monné +Acked-by: Wei Liu +--- + tools/libfsimage/zfs/fsys_zfs.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/tools/libfsimage/zfs/fsys_zfs.h b/tools/libfsimage/zfs/fsys_zfs.h +index 5cd627dbac..721972a05a 100644 +--- a/tools/libfsimage/zfs/fsys_zfs.h ++++ b/tools/libfsimage/zfs/fsys_zfs.h +@@ -71,7 +71,7 @@ typedef unsigned int size_t; + * Can only be used in functions returning non-0 for failure. + */ + #define VERIFY_DN_TYPE(dnp, type) \ +- if (type && (dnp)->dn_type != type) { \ ++ if (type != DMU_OT_NONE && (dnp)->dn_type != type) { \ + return (ERR_FSYS_CORRUPT); \ + } + +@@ -80,7 +80,7 @@ typedef unsigned int size_t; + * Can only be used in functions returning 0 for failure. + */ + #define VERIFY_OS_TYPE(osp, type) \ +- if (type && (osp)->os_type != type) { \ ++ if (type != DMU_OST_NONE && (osp)->os_type != type) { \ + errnum = ERR_FSYS_CORRUPT; \ + return (0); \ + } +-- +2.25.0 + Property changes on: head/sysutils/xen-tools/files/0001-libfsimage-fix-clang-10-build.patch ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property