Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 7 Jan 2025 18:17:17 GMT
From:      Vladimir Druzenko <vvd@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: c9b6fc0d29fb - main - emulators/virtualbox-ose{,-additions}-legacy: Unification of patches with ports emulators/virtualbox-ose{,-additions}
Message-ID:  <202501071817.507IHHeY030361@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by vvd:

URL: https://cgit.FreeBSD.org/ports/commit/?id=c9b6fc0d29fba9262f6b6af6316e14703add2a10

commit c9b6fc0d29fba9262f6b6af6316e14703add2a10
Author:     Vladimir Druzenko <vvd@FreeBSD.org>
AuthorDate: 2025-01-07 18:10:22 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2025-01-07 18:16:55 +0000

    emulators/virtualbox-ose{,-additions}-legacy: Unification of patches with ports emulators/virtualbox-ose{,-additions}
    
    Replace REINPLACE_CMD in Makefiles with patches in files/*.
    
    PR:     272991 279257
    MFH:    2025Q1
---
 emulators/virtualbox-ose-additions-legacy/Makefile             |  4 ----
 emulators/virtualbox-ose-legacy/Makefile                       |  4 ----
 .../files/patch-src_VBox_Additions_freebsd_vboxvfs_vboxvfs.h   | 10 ++++++++--
 .../patch-src_VBox_Additions_freebsd_vboxvfs_vboxvfs__vfsops.c |  2 +-
 .../patch-src_VBox_Additions_freebsd_vboxvfs_vboxvfs__vnops.c  |  2 +-
 5 files changed, 10 insertions(+), 12 deletions(-)

diff --git a/emulators/virtualbox-ose-additions-legacy/Makefile b/emulators/virtualbox-ose-additions-legacy/Makefile
index 32c53d9680a1..54e77f8d41b3 100644
--- a/emulators/virtualbox-ose-additions-legacy/Makefile
+++ b/emulators/virtualbox-ose-additions-legacy/Makefile
@@ -134,10 +134,6 @@ post-patch:
 .if ${PORT_OPTIONS:MPAE}
 	@${ECHO_CMD} 'VBOX_FREEBSD = -DPAE' >> ${WRKSRC}/LocalConfig.kmk
 .endif
-.if ${OPSYS} == FreeBSD && ${OSVERSION} >= 1400093
-	@${REINPLACE_CMD} -e 's|enum vtype|enum enum_vtype_uint8|g' \
-		${WRKSRC}/src/VBox/Additions/freebsd/vboxvfs/vboxvfs*.[ch]
-.endif
 
 post-patch-X11-on:
 	@${ECHO_CMD} 'VBOX_USE_SYSTEM_XORG_HEADERS = 1' >> \
diff --git a/emulators/virtualbox-ose-legacy/Makefile b/emulators/virtualbox-ose-legacy/Makefile
index 6c0563b2759c..2f18be4feb48 100644
--- a/emulators/virtualbox-ose-legacy/Makefile
+++ b/emulators/virtualbox-ose-legacy/Makefile
@@ -301,10 +301,6 @@ post-patch:
 	@${REINPLACE_CMD} \
 	    -e 's|^versions =.*|versions = ["${PYTHON_VER}${PYTHON_ABIVER}"]|' \
 	    ${WRKSRC}/src/libs/xpcom18a4/python/gen_python_deps.py
-.if ${OPSYS} == FreeBSD && ${OSVERSION} >= 1400093
-	@${REINPLACE_CMD} -e 's|enum vtype|enum enum_vtype_uint8|g' \
-	    ${WRKSRC}/src/VBox/Additions/freebsd/vboxvfs/vboxvfs*.[ch]
-.endif
 
 do-build:
 	cd ${WRKSRC} && ${SH} -c '. ${WRKSRC}/env.sh && \
diff --git a/emulators/virtualbox-ose-legacy/files/patch-src_VBox_Additions_freebsd_vboxvfs_vboxvfs.h b/emulators/virtualbox-ose-legacy/files/patch-src_VBox_Additions_freebsd_vboxvfs_vboxvfs.h
index 09bb8575898e..1bf14e4782f3 100644
--- a/emulators/virtualbox-ose-legacy/files/patch-src_VBox_Additions_freebsd_vboxvfs_vboxvfs.h
+++ b/emulators/virtualbox-ose-legacy/files/patch-src_VBox_Additions_freebsd_vboxvfs_vboxvfs.h
@@ -9,7 +9,7 @@
  /*
   * Copyright (C) 2010-2017 Oracle Corporation
   *
-@@ -21,72 +16,413 @@
+@@ -21,72 +16,419 @@
  #define VBOXVFS_VFSNAME "vboxvfs"
  #define VBOXVFS_VERSION 1
  
@@ -176,6 +176,12 @@
 -    int             didrele;
 +#include <VBox/VBoxGuestLibSharedFolders.h>
 +
++#if __FreeBSD_version >= 1400093
++typedef __enum_uint8(vtype) enum_vtype_t;
++#else
++typedef enum vtype enum_vtype_t;
++#endif
++
 +#define	VBOXVFS_DEBUG(lvl, ...)	do {					\
 +	if (vboxvfs_debug >= (lvl)) {					\
 +		printf("VBOXVFS[%u]: ", lvl);				\
@@ -365,7 +371,7 @@
 +void vboxfs_free_vp(struct vnode *);
 +
 +int vboxfs_alloc_node(struct mount *, struct vboxfs_mnt *, const char*,
-+    enum vtype, uid_t, gid_t, mode_t, struct vboxfs_node *,
++    enum_vtype_t, uid_t, gid_t, mode_t, struct vboxfs_node *,
 +    struct vboxfs_node **);
 +void vboxfs_free_node(struct vboxfs_mnt *, struct vboxfs_node *);
 +
diff --git a/emulators/virtualbox-ose-legacy/files/patch-src_VBox_Additions_freebsd_vboxvfs_vboxvfs__vfsops.c b/emulators/virtualbox-ose-legacy/files/patch-src_VBox_Additions_freebsd_vboxvfs_vboxvfs__vfsops.c
index 6843bcd87c12..277cb4e7d4bb 100644
--- a/emulators/virtualbox-ose-legacy/files/patch-src_VBox_Additions_freebsd_vboxvfs_vboxvfs__vfsops.c
+++ b/emulators/virtualbox-ose-legacy/files/patch-src_VBox_Additions_freebsd_vboxvfs_vboxvfs__vfsops.c
@@ -131,7 +131,7 @@
 + */
 +int
 +vboxfs_alloc_node(struct mount *mp, struct vboxfs_mnt *vsfmp, const char *fullpath,
-+    enum vtype type, uid_t uid, gid_t gid, mode_t mode, struct vboxfs_node *parent,
++    enum_vtype_t type, uid_t uid, gid_t gid, mode_t mode, struct vboxfs_node *parent,
 +    struct vboxfs_node **node)
  {
 -    struct vboxvfs_mount_info args;
diff --git a/emulators/virtualbox-ose-legacy/files/patch-src_VBox_Additions_freebsd_vboxvfs_vboxvfs__vnops.c b/emulators/virtualbox-ose-legacy/files/patch-src_VBox_Additions_freebsd_vboxvfs_vboxvfs__vnops.c
index b6c04f48e3cd..b37af4edac49 100644
--- a/emulators/virtualbox-ose-legacy/files/patch-src_VBox_Additions_freebsd_vboxvfs_vboxvfs__vnops.c
+++ b/emulators/virtualbox-ose-legacy/files/patch-src_VBox_Additions_freebsd_vboxvfs_vboxvfs__vnops.c
@@ -420,7 +420,7 @@
 + */
 +static int
 +vboxfs_alloc_file(struct vboxfs_mnt *vboxfsmp, const char *fullpath,
-+    enum vtype type, mode_t mode, struct vboxfs_node *parent,
++    enum_vtype_t type, mode_t mode, struct vboxfs_node *parent,
 +    int lkflag, struct vnode **vpp)
  {
 -    return 0;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202501071817.507IHHeY030361>