aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils
diff options
context:
space:
mode:
authordanfe <danfe@FreeBSD.org>2017-09-05 16:59:07 +0800
committerdanfe <danfe@FreeBSD.org>2017-09-05 16:59:07 +0800
commit75892df6b291191806984183cb020c4e6296771f (patch)
treeace0f537f84071239f34205fe21f77df54a1df1f /sysutils
parent0285093b14d82aac723f76d180533bdcca8065b5 (diff)
downloadfreebsd-ports-gnome-75892df6b291191806984183cb020c4e6296771f.tar.gz
freebsd-ports-gnome-75892df6b291191806984183cb020c4e6296771f.tar.zst
freebsd-ports-gnome-75892df6b291191806984183cb020c4e6296771f.zip
- Rephrase the comment about why we're calling getvfsbyname(3) to make
more sense: saving a few CPU cycles by comparing integers instead of strings is just a nice collateral bonus and not really important - Fix free disk space calculation in unetbootin::checkifoutofspace(); previously it was totally bogus (multiplying `f_bavail' and `f_bfree' fields of `struct statfs', really?), and bump threshold to 1024 KB from the original 1024 bytes (sic) - Add a `pkg-message' suggesting a work-around for a common problem of getting "Boot error" message when booting off MBR-partitioned drives - Couple of cosmetic changes: move NO_WRKSUBDIR line where it normally belongs and sort USE_QT4 values; extend port description text a bit
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/unetbootin/Makefile7
-rw-r--r--sysutils/unetbootin/files/patch-unetbootin.cpp32
-rw-r--r--sysutils/unetbootin/pkg-descr3
-rw-r--r--sysutils/unetbootin/pkg-message3
4 files changed, 32 insertions, 13 deletions
diff --git a/sysutils/unetbootin/Makefile b/sysutils/unetbootin/Makefile
index 9f54c25f31c0..1408c7e20b70 100644
--- a/sysutils/unetbootin/Makefile
+++ b/sysutils/unetbootin/Makefile
@@ -3,6 +3,7 @@
PORTNAME= unetbootin
PORTVERSION= 655
+PORTREVISION= 1
CATEGORIES= sysutils
MASTER_SITES= SF/${PORTNAME}/UNetbootin/${PORTVERSION}
DISTNAME= ${PORTNAME}-source-${PORTVERSION}
@@ -16,12 +17,12 @@ RUN_DEPENDS= 7z:archivers/p7zip \
syslinux:sysutils/syslinux \
mke2fs:sysutils/e2fsprogs
-NO_WRKSUBDIR= yes
-
-USE_QT4= moc_build qmake_build linguisttools_build uic_build \
+USE_QT4= linguisttools_build moc_build qmake_build uic_build \
corelib gui network
QMAKE_ARGS= DEFINES+=LOCALBASE=\\\\\\\"${LOCALBASE}\\\\\\\"
+NO_WRKSUBDIR= yes
+
post-patch:
@${REINPLACE_CMD} -e 's,/usr/share,${PREFIX}/share,g' \
${WRKSRC}/main.cpp
diff --git a/sysutils/unetbootin/files/patch-unetbootin.cpp b/sysutils/unetbootin/files/patch-unetbootin.cpp
index b1cf4e229868..7d64a05b9ac3 100644
--- a/sysutils/unetbootin/files/patch-unetbootin.cpp
+++ b/sysutils/unetbootin/files/patch-unetbootin.cpp
@@ -24,10 +24,10 @@
+ struct statfs *fslist;
+
+ /*
-+ * Find out VFS number assigned by kernel for MSDOSFS,
-+ * because it's faster to compare numbers than strings.
-+ * This also helps to ensure that it is configured in
-+ * the kernel.
++ * Find out VFS number assigned by kernel for MSDOSFS.
++ * This helps to ensure that it is configured with the
++ * kernel. As a nice side effect, this also allows to
++ * compare a number instead of "msdosfs" string later.
+ */
+ if (getvfsbyname("msdosfs", &fsconf) == -1)
+ goto out;
@@ -81,7 +81,21 @@
return fulldrivelist;
}
-@@ -3412,21 +3469,36 @@ void unetbootin::instIndvfl(QString srcfName, QString
+@@ -1100,7 +1157,12 @@ bool unetbootin::checkifoutofspace(QString destindir)
+ struct statfs diskstatS;
+ if (!statfs(QString(destindir+"/.").toAscii(), &diskstatS))
+ {
+- if (diskstatS.f_bavail * diskstatS.f_bfree < 1024)
++ /*
++ * Refuse to work if available disk space is less than 1MB
++ * (1024KB). Even this seems very low, but original value
++ * of 1024 bytes was simply ridiculous.
++ */
++ if (diskstatS.f_bsize / 1024 * diskstatS.f_bavail < 1024)
+ outofspace = true;
+ }
+ #endif
+@@ -3412,21 +3474,36 @@ void unetbootin::instIndvfl(QString srcfName, QString
srcF.setFileName(QFile::exists("/usr/share/syslinux/memdisk") ? "/usr/share/syslinux/memdisk" : "/usr/lib/syslinux/memdisk");
else if (srcfName == "menu.c32")
{
@@ -118,7 +132,7 @@
}
else if (srcfName == "mbr.bin")
{
-@@ -3516,11 +3588,19 @@ void unetbootin::runinst()
+@@ -3516,11 +3593,19 @@ void unetbootin::runinst()
}
if (installType == tr("USB Drive"))
{
@@ -138,7 +152,7 @@
}
#ifdef Q_OS_LINUX
if (targetDev.contains(QRegExp("p\\d$")))
-@@ -3528,7 +3608,7 @@ void unetbootin::runinst()
+@@ -3528,7 +3613,7 @@ void unetbootin::runinst()
else
rawtargetDev = QString(targetDev).remove(QRegExp("\\d$"));
#endif
@@ -147,7 +161,7 @@
rawtargetDev = QString(targetDev).remove(QRegExp("s\\d$"));
#endif
#endif
-@@ -4281,21 +4361,47 @@ void unetbootin::runinstusb()
+@@ -4281,21 +4366,47 @@ void unetbootin::runinstusb()
instIndvfl("libutil.c32", QString("%1libutil.c32").arg(targetPath));
instIndvfl("libcom32.c32", QString("%1libcom32.c32").arg(targetPath));
}
@@ -206,7 +220,7 @@
if (this->persistenceSpaceMB > 0)
{
pdesc1->setText(tr("Setting up persistence"));
-@@ -4334,6 +4440,20 @@ void unetbootin::fininstall()
+@@ -4334,6 +4445,20 @@ void unetbootin::fininstall()
rmFile(mke2fscommand);
#endif
}
diff --git a/sysutils/unetbootin/pkg-descr b/sysutils/unetbootin/pkg-descr
index c1c4ee25b956..1c3243a715fb 100644
--- a/sysutils/unetbootin/pkg-descr
+++ b/sysutils/unetbootin/pkg-descr
@@ -1,5 +1,6 @@
UNetbootin allows to create bootable Live USB drives for Ubuntu, Fedora,
and other Linux distributions without burning a CD. This is useful when
-supplied ISO image cannot be directly written to USB drive or SD card.
+supplied ISO image cannot be directly written to USB drive or SD card to
+get a bootable media.
WWW: http://unetbootin.sourceforge.net/
diff --git a/sysutils/unetbootin/pkg-message b/sysutils/unetbootin/pkg-message
new file mode 100644
index 000000000000..0d461173cf3b
--- /dev/null
+++ b/sysutils/unetbootin/pkg-message
@@ -0,0 +1,3 @@
+ If SysLinux refuses to boot with a "Boot error" message when written to
+ a PC partition (slice), try to reformat the drive in raw (or dedicated)
+ mode (that is, without a partition table), then reinstall things again.