aboutsummaryrefslogtreecommitdiffstats
path: root/emulators
diff options
context:
space:
mode:
authordecke <decke@FreeBSD.org>2011-03-17 21:29:04 +0800
committerdecke <decke@FreeBSD.org>2011-03-17 21:29:04 +0800
commit6737e3265e48f9cb2a041e27fc5e706580bada63 (patch)
treec46a3aeddfbda8a97af856ab30fa532dddd3d136 /emulators
parent87f1cf28401db0de95d42f49ab2deaa3b51d47d7 (diff)
downloadfreebsd-ports-gnome-6737e3265e48f9cb2a041e27fc5e706580bada63.tar.gz
freebsd-ports-gnome-6737e3265e48f9cb2a041e27fc5e706580bada63.tar.zst
freebsd-ports-gnome-6737e3265e48f9cb2a041e27fc5e706580bada63.zip
- Enable createrawvmdk -relative under FreeBSD
- Bump PORTREVISION PR: ports/155236 Submitted by: Dmitry Pryanishnikov <lynx.ripe@gmail.com>
Diffstat (limited to 'emulators')
-rw-r--r--emulators/virtualbox-ose-legacy/Makefile1
-rw-r--r--emulators/virtualbox-ose-legacy/files/patch-src-VBox-Frontends-VBoxManage-VBoxInternalManage.cpp48
-rw-r--r--emulators/virtualbox-ose/Makefile1
-rw-r--r--emulators/virtualbox-ose/files/patch-src-VBox-Frontends-VBoxManage-VBoxInternalManage.cpp48
4 files changed, 98 insertions, 0 deletions
diff --git a/emulators/virtualbox-ose-legacy/Makefile b/emulators/virtualbox-ose-legacy/Makefile
index 688804e6dd7b..a8e96b066394 100644
--- a/emulators/virtualbox-ose-legacy/Makefile
+++ b/emulators/virtualbox-ose-legacy/Makefile
@@ -7,6 +7,7 @@
PORTNAME= virtualbox-ose
DISTVERSION= 3.2.12
+PORTREVISION= 1
CATEGORIES= emulators
MASTER_SITES= http://tmp.chruetertee.ch/ \
http://freebsd.unixfreunde.de/sources/ \
diff --git a/emulators/virtualbox-ose-legacy/files/patch-src-VBox-Frontends-VBoxManage-VBoxInternalManage.cpp b/emulators/virtualbox-ose-legacy/files/patch-src-VBox-Frontends-VBoxManage-VBoxInternalManage.cpp
new file mode 100644
index 000000000000..fdffb0aab896
--- /dev/null
+++ b/emulators/virtualbox-ose-legacy/files/patch-src-VBox-Frontends-VBoxManage-VBoxInternalManage.cpp
@@ -0,0 +1,48 @@
+--- src/VBox/Frontends/VBoxManage/VBoxInternalManage.cpp.orig 2010-12-01 18:09:24.000000000 +0100
++++ src/VBox/Frontends/VBoxManage/VBoxInternalManage.cpp 2011-03-16 10:58:37.000000000 +0100
+@@ -178,8 +178,9 @@
+ " (the partitioning information in the MBR file is ignored).\n"
+ " The diskname is on Linux e.g. /dev/sda, and on Windows e.g.\n"
+ " \\\\.\\PhysicalDrive0).\n"
+- " On Linux host the parameter -relative causes a VMDK file to be created\n"
+- " which refers to individual partitions instead to the entire disk.\n"
++ " On Linux or FreeBSD host the parameter -relative causes a VMDK file to\n"
++ " be created which refers to individual partitions instead to the entire\n"
++ " disk.\n"
+ " Optionally the created image can be immediately registered.\n"
+ " The necessary partition numbers can be queried with\n"
+ " VBoxManage internalcommands listpartitions\n"
+@@ -926,12 +927,12 @@
+ {
+ fRegister = true;
+ }
+-#ifdef RT_OS_LINUX
++#if defined(RT_OS_LINUX) || defined(RT_OS_FREEBSD)
+ else if (strcmp(argv[i], "-relative") == 0)
+ {
+ fRelative = true;
+ }
+-#endif /* RT_OS_LINUX */
++#endif /* RT_OS_LINUX || RT_OS_FREEBSD */
+ else
+ {
+ return errorSyntax(USAGE_CREATERAWVMDK, "Invalid parameter '%s'", Utf8Str(argv[i]).raw());
+@@ -1280,10 +1281,16 @@
+ {
+ if (fRelative)
+ {
+-#ifdef RT_OS_LINUX
++#if defined(RT_OS_LINUX) || defined(RT_OS_FREEBSD)
+ /* Refer to the correct partition and use offset 0. */
+ char *psz;
+- vrc = RTStrAPrintf(&psz, "%s%u", rawdisk.raw(),
++ vrc = RTStrAPrintf(&psz,
++#if defined(RT_OS_LINUX)
++ "%s%u",
++#elif defined(RT_OS_FREEBSD)
++ "%ss%u",
++#endif
++ rawdisk.raw(),
+ partitions.aPartitions[i].uIndex);
+ if (RT_FAILURE(vrc))
+ {
diff --git a/emulators/virtualbox-ose/Makefile b/emulators/virtualbox-ose/Makefile
index 688804e6dd7b..a8e96b066394 100644
--- a/emulators/virtualbox-ose/Makefile
+++ b/emulators/virtualbox-ose/Makefile
@@ -7,6 +7,7 @@
PORTNAME= virtualbox-ose
DISTVERSION= 3.2.12
+PORTREVISION= 1
CATEGORIES= emulators
MASTER_SITES= http://tmp.chruetertee.ch/ \
http://freebsd.unixfreunde.de/sources/ \
diff --git a/emulators/virtualbox-ose/files/patch-src-VBox-Frontends-VBoxManage-VBoxInternalManage.cpp b/emulators/virtualbox-ose/files/patch-src-VBox-Frontends-VBoxManage-VBoxInternalManage.cpp
new file mode 100644
index 000000000000..fdffb0aab896
--- /dev/null
+++ b/emulators/virtualbox-ose/files/patch-src-VBox-Frontends-VBoxManage-VBoxInternalManage.cpp
@@ -0,0 +1,48 @@
+--- src/VBox/Frontends/VBoxManage/VBoxInternalManage.cpp.orig 2010-12-01 18:09:24.000000000 +0100
++++ src/VBox/Frontends/VBoxManage/VBoxInternalManage.cpp 2011-03-16 10:58:37.000000000 +0100
+@@ -178,8 +178,9 @@
+ " (the partitioning information in the MBR file is ignored).\n"
+ " The diskname is on Linux e.g. /dev/sda, and on Windows e.g.\n"
+ " \\\\.\\PhysicalDrive0).\n"
+- " On Linux host the parameter -relative causes a VMDK file to be created\n"
+- " which refers to individual partitions instead to the entire disk.\n"
++ " On Linux or FreeBSD host the parameter -relative causes a VMDK file to\n"
++ " be created which refers to individual partitions instead to the entire\n"
++ " disk.\n"
+ " Optionally the created image can be immediately registered.\n"
+ " The necessary partition numbers can be queried with\n"
+ " VBoxManage internalcommands listpartitions\n"
+@@ -926,12 +927,12 @@
+ {
+ fRegister = true;
+ }
+-#ifdef RT_OS_LINUX
++#if defined(RT_OS_LINUX) || defined(RT_OS_FREEBSD)
+ else if (strcmp(argv[i], "-relative") == 0)
+ {
+ fRelative = true;
+ }
+-#endif /* RT_OS_LINUX */
++#endif /* RT_OS_LINUX || RT_OS_FREEBSD */
+ else
+ {
+ return errorSyntax(USAGE_CREATERAWVMDK, "Invalid parameter '%s'", Utf8Str(argv[i]).raw());
+@@ -1280,10 +1281,16 @@
+ {
+ if (fRelative)
+ {
+-#ifdef RT_OS_LINUX
++#if defined(RT_OS_LINUX) || defined(RT_OS_FREEBSD)
+ /* Refer to the correct partition and use offset 0. */
+ char *psz;
+- vrc = RTStrAPrintf(&psz, "%s%u", rawdisk.raw(),
++ vrc = RTStrAPrintf(&psz,
++#if defined(RT_OS_LINUX)
++ "%s%u",
++#elif defined(RT_OS_FREEBSD)
++ "%ss%u",
++#endif
++ rawdisk.raw(),
+ partitions.aPartitions[i].uIndex);
+ if (RT_FAILURE(vrc))
+ {