pkgsrc-WIP-changes archive

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

qemu-virtfs-netbsd: enable virtfs in the build



Module Name:	pkgsrc-wip
Committed By:	Tobias Nygren <tnn%NetBSD.org@localhost>
Pushed By:	tnn
Date:		Sun Sep 17 12:51:41 2023 +0200
Changeset:	3bc621b108cbdcc5ad618c2bb79e910c65b37caa

Modified Files:
	qemu-virtfs-netbsd/distinfo
	qemu-virtfs-netbsd/options.mk
	qemu-virtfs-netbsd/patches/patch-meson.build
Added Files:
	qemu-virtfs-netbsd/patches/patch-fsdev_meson.build

Log Message:
qemu-virtfs-netbsd: enable virtfs in the build

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=3bc621b108cbdcc5ad618c2bb79e910c65b37caa

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 qemu-virtfs-netbsd/distinfo                        |  3 ++-
 qemu-virtfs-netbsd/options.mk                      |  2 ++
 qemu-virtfs-netbsd/patches/patch-fsdev_meson.build | 14 +++++++++++++
 qemu-virtfs-netbsd/patches/patch-meson.build       | 24 ++++++++++++++++++++++
 4 files changed, 42 insertions(+), 1 deletion(-)

diffs:
diff --git a/qemu-virtfs-netbsd/distinfo b/qemu-virtfs-netbsd/distinfo
index 070b101a99..ca18c6b7e6 100644
--- a/qemu-virtfs-netbsd/distinfo
+++ b/qemu-virtfs-netbsd/distinfo
@@ -7,6 +7,7 @@ BLAKE2s (qemu-8.1.0.tar.xz) = 1cc9e5b6997ea9700a6dead14fa02cfa18a72e74f6c4a92c28
 SHA512 (qemu-8.1.0.tar.xz) = c5f5e7ce2d8e3c93a02012b136c866e8577df07da4705a0045916c71caeaa21fa1b2d59a4b22a660789a4159b192e12a443e7cbb0724ee85fea258251731724c
 Size (qemu-8.1.0.tar.xz) = 123550284 bytes
 SHA1 (patch-audio_jackaudio.c) = 771c2779e565242a500adc0223ef6b1ae5b2b91f
+SHA1 (patch-fsdev_meson.build) = 39cbbcabae262f7ecfd77e5c2d61da4f37340dfe
 SHA1 (patch-hw-mips-Kconfig) = c7199ad26ac45116ab4d38252db4234ae93bdf9a
 SHA1 (patch-hw-mips-mipssim.c) = 1f682b74b34398b3ff15f9e7f24a85f4b8bb4853
 SHA1 (patch-hw_display_omap__dss.c) = 68f6f5e86335114de64b397959a2238de84fcde2
@@ -16,7 +17,7 @@ SHA1 (patch-hw_net_xilinx__axienet.c) = ebcd2676d64ce6f31e4a8c976d4fdf530ad5e8b7
 SHA1 (patch-hw_rtc_mc146818rtc.c) = cc7a3b28010966b65b7a16db756226ac2669f310
 SHA1 (patch-hw_scsi_scsi-disk.c) = fdbf2f962a6dcb1a115a7f8a5b8790ff9295fb33
 SHA1 (patch-hw_usb_dev-mtp.c) = 94ddf53a41cc75810cfece1b8aef1831fab4ce43
-SHA1 (patch-meson.build) = edece4d8e02193230732de390bebeac43fba7d5f
+SHA1 (patch-meson.build) = f412bef8b9d42f6a4fc5a2ebe0085283cca7c367
 SHA1 (patch-roms_u-boot-sam460ex_Makefile) = 3a1bbf19b1422c10ebdd819eb0b711fafc78e2f2
 SHA1 (patch-target_arm_tcg_translate-sve.c) = b5eeb08331e61a16b2cf4b7ab9b668755aa9a04e
 SHA1 (patch-target_i386_cpu.c) = afa8a2f83399b2d142709322eb88d1112f1547e4
diff --git a/qemu-virtfs-netbsd/options.mk b/qemu-virtfs-netbsd/options.mk
index 2b16c63122..2347db3705 100644
--- a/qemu-virtfs-netbsd/options.mk
+++ b/qemu-virtfs-netbsd/options.mk
@@ -79,6 +79,8 @@ PLIST.virtfs-proxy-helper=	yes
 CONFIGURE_ARGS+=		--enable-virtfs
 .elif ${OPSYS} == "Darwin"
 CONFIGURE_ARGS+=		--enable-virtfs
+.elif ${OPSYS} == "NetBSD"
+CONFIGURE_ARGS+=		--enable-virtfs
 .else
 CONFIGURE_ARGS+=		--disable-virtfs
 .endif
diff --git a/qemu-virtfs-netbsd/patches/patch-fsdev_meson.build b/qemu-virtfs-netbsd/patches/patch-fsdev_meson.build
new file mode 100644
index 0000000000..a69fb512d2
--- /dev/null
+++ b/qemu-virtfs-netbsd/patches/patch-fsdev_meson.build
@@ -0,0 +1,14 @@
+$NetBSD$
+
+Add NetBSD support.
+
+--- fsdev/meson.build.orig	2023-08-22 15:34:01.000000000 +0000
++++ fsdev/meson.build
+@@ -8,6 +8,7 @@ fsdev_ss.add(when: ['CONFIG_FSDEV_9P'], 
+ ), if_false: files('qemu-fsdev-dummy.c'))
+ system_ss.add_all(when: 'CONFIG_LINUX', if_true: fsdev_ss)
+ system_ss.add_all(when: 'CONFIG_DARWIN', if_true: fsdev_ss)
++system_ss.add_all(when: 'CONFIG_BSD', if_true: fsdev_ss)
+ 
+ if have_virtfs_proxy_helper
+   executable('virtfs-proxy-helper',
diff --git a/qemu-virtfs-netbsd/patches/patch-meson.build b/qemu-virtfs-netbsd/patches/patch-meson.build
index c521e1e630..50fe11b205 100644
--- a/qemu-virtfs-netbsd/patches/patch-meson.build
+++ b/qemu-virtfs-netbsd/patches/patch-meson.build
@@ -3,6 +3,7 @@ $NetBSD: patch-meson.build,v 1.13 2023/09/10 16:16:14 jperkin Exp $
 * Detect iconv in libc properly for pkgsrc (pkgsrc removes -liconv)
   to fix qemu-system-aarch64 link.
 * Detect curses (non-ncurses{,w} too)
+* Enable p9fs on NetBSD
 
 --- meson.build.orig	2023-08-22 15:34:02.000000000 +0000
 +++ meson.build
@@ -33,6 +34,29 @@ $NetBSD: patch-meson.build,v 1.13 2023/09/10 16:16:14 jperkin Exp $
        # Programs will be linked with glib and this will bring in libiconv on FreeBSD.
        # We need to use libiconv if available because mixing libiconv's headers with
        # the system libc does not work.
+@@ -1986,17 +1986,17 @@ dbus_display = get_option('dbus_display'
+   .allowed()
+ 
+ have_virtfs = get_option('virtfs') \
+-    .require(targetos == 'linux' or targetos == 'darwin',
+-             error_message: 'virtio-9p (virtfs) requires Linux or macOS') \
+-    .require(targetos == 'linux' or cc.has_function('pthread_fchdir_np'),
++    .require(targetos == 'linux' or targetos == 'darwin' or targetos == 'netbsd',
++             error_message: 'virtio-9p (virtfs) requires Linux or macOS or NetBSD') \
++    .require(targetos == 'linux' or targetos == 'netbsd' or cc.has_function('pthread_fchdir_np'),
+              error_message: 'virtio-9p (virtfs) on macOS requires the presence of pthread_fchdir_np') \
+-    .require(targetos == 'darwin' or libattr.found(),
++    .require(targetos == 'darwin' or targetos == 'netbsd' or libattr.found(),
+              error_message: 'virtio-9p (virtfs) on Linux requires libattr-devel') \
+     .disable_auto_if(not have_tools and not have_system) \
+     .allowed()
+ 
+ have_virtfs_proxy_helper = get_option('virtfs_proxy_helper') \
+-    .require(targetos != 'darwin', error_message: 'the virtfs proxy helper is incompatible with macOS') \
++    .require(targetos != 'darwin' and targetos != 'netbsd', error_message: 'the virtfs proxy helper is incompatible with macOS') \
+     .require(have_virtfs, error_message: 'the virtfs proxy helper requires that virtfs is enabled') \
+     .disable_auto_if(not have_tools) \
+     .require(libcap_ng.found(), error_message: 'the virtfs proxy helper requires libcap-ng') \
 @@ -2056,7 +2056,7 @@ have_slirp_smbd = get_option('slirp_smbd
  if have_slirp_smbd
    smbd_path = get_option('smbd')


Home | Main Index | Thread Index | Old Index