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
This commit is contained in:
Vladimir Druzenko 2025-01-07 21:10:22 +03:00
parent 8d72823b38
commit c9b6fc0d29
5 changed files with 10 additions and 12 deletions

View file

@ -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' >> \

View file

@ -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 && \

View file

@ -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 *);
+

View file

@ -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;

View file

@ -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;