Index: head/sysutils/grub2-pcbsd/Makefile =================================================================== --- head/sysutils/grub2-pcbsd/Makefile (revision 374755) +++ head/sysutils/grub2-pcbsd/Makefile (revision 374756) @@ -1,95 +1,95 @@ # Created by: kmoore@FreeBSD.org # $FreeBSD$ PORTNAME= grub2-pcbsd PORTVERSION= 2.02p -PORTREVISION= 14 +PORTREVISION= 15 CATEGORIES= sysutils MASTER_SITES= http://www.pcbsd.org/~kris/software/ \ ftp://ftp.pcbsd.org/pub/software/ DISTNAME= grub-2.02_3 MAINTAINER= kmoore@FreeBSD.org COMMENT= Multiboot boot loader LICENSE= GPLv3 BUILD_DEPENDS= ${LOCALBASE}/bin/flex:${PORTSDIR}/textproc/flex \ ${LOCALBASE}/bin/bash:${PORTSDIR}/shells/bash \ help2man:${PORTSDIR}/misc/help2man WRKSRC= ${WRKDIR}/grub-2.02 CONFLICTS= grub-0* grub2-2* SSP_UNSAFE= yes USE_GCC= yes USE_AUTOTOOLS= automake aclocal autoconf ACLOCAL_ARGS= -Im4 GNU_CONFIGURE= yes USES= bison gettext gmake makeinfo python tar:xz ONLY_FOR_ARCHS= i386 amd64 INFO= grub grub-dev MAKE_JOBS_UNSAFE= yes CONFIGURE_ARGS= --disable-werror --localedir=${PREFIX}/share/locale CONFIGURE_ENV= CPP="${CC} -E" \ LEX=${LOCALBASE}/bin/flex SUB_FILES= 00_header 10_kfreebsd 10_ktrueos 30_os-prober OPTIONS_DEFINE= MKFONT FUSE OPTIONS_DEFAULT=MKFONT MKFONT_DESC= Build grub-mkfont (require freetype2) FUSE_DESC= Build grub-mount (require FUSE) .include .if ${ARCH} != "amd64" EFIEMU= "@comment " .endif PLIST_SUB+= EFIEMU=${EFIEMU} .if ${PORT_OPTIONS:MMKFONT} LIB_DEPENDS+= libfreetype.so:${PORTSDIR}/print/freetype2 BUILD_DEPENDS+= ${LOCALBASE}/lib/X11/fonts/dejavu/DejaVuSans.ttf:${PORTSDIR}/x11-fonts/dejavu \ ${LOCALBASE}/lib/X11/fonts/local/unifont.pcf.gz:${PORTSDIR}/x11-fonts/gnu-unifont MAN1+= grub-mkfont.1 CONFIGURE_ARGS+= --enable-grub-mkfont .else CONFIGURE_ARGS+= --disable-grub-mkfont MKFONT= "@comment " .endif PLIST_SUB+= MKFONT=${MKFONT} .if ${PORT_OPTIONS:MFUSE} LIB_DEPENDS+= libfuse.so:${PORTSDIR}/sysutils/fusefs-libs CONFIGURE_ARGS+= --enable-grub-mount .else CONFIGURE_ARGS+= --disable-grub-mount FUSE= "@comment " .endif PLIST_SUB+= FUSE=${FUSE} post-patch: @${TOUCH} -t 200001010000 ${WRKSRC}/Makefile.util.def pre-configure: @${REINPLACE_CMD} -e 's|python|${PYTHON_CMD}|g' ${WRKSRC}/autogen.sh cd ${WRKSRC} && ./autogen.sh post-configure: @${LN} -sfh /usr/include/machine /usr/include/sys /usr/include/x86 ${WRKSRC}/grub-core post-install: @${RM} -rf ${STAGEDIR}${PREFIX}/lib/charset.alias @${INSTALL_SCRIPT} ${WRKDIR}/00_header ${STAGEDIR}${PREFIX}/etc/grub.d/ @${INSTALL_SCRIPT} ${WRKDIR}/10_kfreebsd ${STAGEDIR}${PREFIX}/etc/grub.d/ @${INSTALL_SCRIPT} ${WRKDIR}/10_ktrueos ${STAGEDIR}${PREFIX}/etc/grub.d/ @${INSTALL_SCRIPT} ${WRKDIR}/30_os-prober ${STAGEDIR}${PREFIX}/etc/grub.d/ @${MV} ${STAGEDIR}${PREFIX}/etc/grub.d/40_custom ${STAGEDIR}/${PREFIX}/etc/grub.d/40_custom.dist .include RUN_DEPENDS:= ${RUN_DEPENDS:Ngcc*} Index: head/sysutils/grub2-pcbsd/files/30_os-prober.in =================================================================== --- head/sysutils/grub2-pcbsd/files/30_os-prober.in (revision 374755) +++ head/sysutils/grub2-pcbsd/files/30_os-prober.in (revision 374756) @@ -1,61 +1,61 @@ #!/bin/sh # # Copyright 2013 iXsystems (Kris Moore) # All rights reserved # # Redistribution and use in source and binary forms, with or without # modification, are permitted providing that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY # DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING # IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. # Script to detect other NON BSD OS's and add to grub.cfg check_ntfs_part() { local disk="$1" fs_label=`grub-probe --device /dev/${disk} --target=fs_label` # Check for common windows NTFS labels for bootable partitions - if [ "$fs_label" != "System Reserved" -a "$fs_label" != "SYSTEM RESERVED" -a "$fs_label" != "eMachines" -a "$fs_label" != "OS" -a "$fs_label" != "SYSTEM" ] ; then return; fi + if [ "$fs_label" != "System Reserved" -a "$fs_label" != "SYSTEM RESERVED" -a "$fs_label" != "eMachines" -a "$fs_label" != "OS" -a "$fs_label" != "SYSTEM" -a "$fs_label" != "SYSTEM_DRV" ] ; then return; fi fs_uuid=`grub-probe --device /dev/${disk} --target=fs_uuid` if [ -z "$fs_uuid" ] ; then echo "Warning: Could not get fs_uuid for $disk" return fi cat << EOF menuentry "Microsoft Windows ($disk)" { search --no-floppy --fs-uuid --set=root $fs_uuid chainloader +1 } EOF } # Start by looking for disks for disk in `cd /dev/ && ls ada[0-9]s[0-9] da[0-9]s[0-9] ada[0-9]p[0-9] da[0-9]p[0-9] 2>/dev/null` do # Start checking for NTFS fs_type=`grub-probe --device /dev/${disk} --target=fs 2>/dev/null` case $fs_type in ntfs) check_ntfs_part "$disk" ;; *) ;; # Unknown for now, add more! esac done