Index: head/sysutils/unetbootin/Makefile =================================================================== --- head/sysutils/unetbootin/Makefile (revision 453224) +++ head/sysutils/unetbootin/Makefile (revision 453225) @@ -1,47 +1,46 @@ # Created by: Alexey Dokuchaev # $FreeBSD$ PORTNAME= unetbootin -PORTVERSION= 655 -PORTREVISION= 1 +PORTVERSION= 657 CATEGORIES= sysutils MASTER_SITES= SF/${PORTNAME}/UNetbootin/${PORTVERSION} DISTNAME= ${PORTNAME}-source-${PORTVERSION} MAINTAINER= danfe@FreeBSD.org COMMENT= Bootable Live USB creator for various Linux distributions LICENSE= GPLv2+ RUN_DEPENDS= 7z:archivers/p7zip \ syslinux:sysutils/syslinux \ mke2fs:sysutils/e2fsprogs 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 do-configure: ${LUPDATE} ${WRKSRC}/unetbootin.pro ${LRELEASE} ${WRKSRC}/unetbootin.pro cd ${WRKSRC} && ${QMAKE_ENV} ${QMAKE} ${QMAKE_ARGS} do-install: ${INSTALL_PROGRAM} ${WRKSRC}/unetbootin ${STAGEDIR}${PREFIX}/bin ${INSTALL_DATA} ${WRKSRC}/unetbootin.xpm \ ${STAGEDIR}${PREFIX}/share/pixmaps @${MKDIR} ${STAGEDIR}${DATADIR} ${INSTALL_DATA} ${WRKSRC}/unetbootin_*.qm ${STAGEDIR}${DATADIR} .for n in 16 22 24 32 48 64 128 192 256 512 @${MKDIR} ${STAGEDIR}${PREFIX}/share/icons/hicolor/${n}x${n}/apps ${INSTALL_DATA} ${WRKSRC}/unetbootin_${n}.png \ ${STAGEDIR}${PREFIX}/share/icons/hicolor/${n}x${n}/apps/unetbootin.png .endfor .include Index: head/sysutils/unetbootin/distinfo =================================================================== --- head/sysutils/unetbootin/distinfo (revision 453224) +++ head/sysutils/unetbootin/distinfo (revision 453225) @@ -1,3 +1,3 @@ -TIMESTAMP = 1500449397 -SHA256 (unetbootin-source-655.tar.gz) = 700125b0ea45805a22f729986c59377b1ff0c0a66ea6f01b29cd3cf60bfbaa79 -SIZE (unetbootin-source-655.tar.gz) = 749246 +TIMESTAMP = 1508836950 +SHA256 (unetbootin-source-657.tar.gz) = eacf0d8e7d712a34ae41f01c9a4c03cf01dd9a36284cd67475670c0ab5787690 +SIZE (unetbootin-source-657.tar.gz) = 749244 Index: head/sysutils/unetbootin/files/patch-unetbootin.cpp =================================================================== --- head/sysutils/unetbootin/files/patch-unetbootin.cpp (revision 453224) +++ head/sysutils/unetbootin/files/patch-unetbootin.cpp (revision 453225) @@ -1,243 +1,243 @@ --- unetbootin.cpp.orig 2017-07-14 08:54:12 UTC +++ unetbootin.cpp @@ -301,8 +301,13 @@ bool unetbootin::ubninitialize(QListcurrentText(); devluid = getdevluid(targetDev); ginstallDir = ""; installDir = ginstallDir; targetDrive = QString("%1/").arg(locatemountpoint(targetDev)); +#endif +#ifdef Q_OS_FREEBSD + QStringList driveinfo = driveselect->currentText().split(":"); + targetDev = driveinfo.at(0); + installDir = ginstallDir = ""; + targetDrive = QString("%1/").arg(driveinfo.at(1)); +#endif } #ifdef Q_OS_LINUX if (targetDev.contains(QRegExp("p\\d$"))) @@ -3528,7 +3613,7 @@ void unetbootin::runinst() else rawtargetDev = QString(targetDev).remove(QRegExp("\\d$")); #endif -#ifdef Q_OS_MAC +#ifdef Q_OS_UNIX rawtargetDev = QString(targetDev).remove(QRegExp("s\\d$")); #endif #endif @@ -4281,21 +4366,47 @@ void unetbootin::runinstusb() instIndvfl("libutil.c32", QString("%1libutil.c32").arg(targetPath)); instIndvfl("libcom32.c32", QString("%1libcom32.c32").arg(targetPath)); } + setuppersspace(); +#ifdef Q_OS_FREEBSD + /* + * On FreeBSD, we only support installing on MSDOSFS (no + * extlinux in the ports). This also simplifies things + * a bit, and that's what most users usually want anyway. + * + * Because of syslinux' stupidity, we have to remove any + * existing ldlinux.c32 and ldlinux.sys files, otherwise + * it will fail to install loader (even with -f switch). + * Then we have to unmount the filesystem to avoid the + * "Operation not permitted" error, and must enforce it + * because syslinux expects a block device, and, well, + * there are no "block devices" in FreeBSD. + */ + rmFile(targetPath + "ldlinux.c32"); + rmFile(targetPath + "ldlinux.sys"); + callexternapp("umount", targetDev); + callexternapp(syslinuxcommand, "-i -f " + targetDev); + + if (rawtargetDev != targetDev) + { + /* + * We have partition table (not operating on raw + * disk), so we need to install MBR and mark our + * partition as active. Assume our targetDev is + * /dev/{da,mmcsd}XsY and use the last digit as + * partition index for gpart(8). + */ + QString idx = targetDev.right(1); + callexternapp("gpart", + "bootcode -b /boot/mbr " + rawtargetDev); + callexternapp("gpart", "set -a " + "active -i " + idx + " " + rawtargetDev); + } +#endif fininstall(); } -void unetbootin::killApplication() +void unetbootin::setuppersspace() { - exit(0); -} - -void unetbootin::fininstall() -{ - #ifdef Q_OS_UNIX - this->tprogress->setValue(this->tprogress->maximum()*2/3); - pdesc1->setText(tr("Syncing filesystems")); - callexternapp("sync", ""); - #endif if (this->persistenceSpaceMB > 0) { pdesc1->setText(tr("Setting up persistence")); @@ -4334,6 +4445,20 @@ void unetbootin::fininstall() rmFile(mke2fscommand); #endif } +} + +void unetbootin::killApplication() +{ + exit(0); +} + +void unetbootin::fininstall() +{ + #ifdef Q_OS_UNIX + this->tprogress->setValue(this->tprogress->maximum()*2/3); + pdesc1->setText(tr("Syncing filesystems")); + callexternapp("sync", ""); + #endif pdesc1->setText(""); progresslayer->setEnabled(false); progresslayer->hide();