- Update to 0.94

- Utilize INFO macro
- Fix CONFIGURE_TARGET for a new configure script
- add patch for right geometry calculation in 5.x
- fix patch-dosc_Makefile.in
- New MAINTAINER: sem@ciam.ru

PR:		61938
Submitted by:	Sergey Matveychuk <sem@ciam.ru>
This commit is contained in:
Chris D. Faulhaber 2004-01-26 15:36:54 +00:00
parent 842e6a5ca6
commit 7a47a4192f
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=99203
9 changed files with 98 additions and 57 deletions

View file

@ -6,20 +6,21 @@
# #
PORTNAME= grub PORTNAME= grub
PORTVERSION= 0.92 PORTVERSION= 0.94
CATEGORIES= sysutils CATEGORIES= sysutils
MASTER_SITES= http://www.gnu.org/software/grub/ MASTER_SITES= ftp://alpha.gnu.org/gnu/grub/
MAINTAINER= jedgar@FreeBSD.org MAINTAINER= sem@ciam.ru
COMMENT= GRand Unified Bootloader COMMENT= GRand Unified Bootloader
GNU_CONFIGURE= yes GNU_CONFIGURE= yes
USE_GMAKE= yes USE_GMAKE= yes
CONFIGURE_TARGET= ${MACHINE_ARCH}-freebsd-freebsd${OSREL} CONFIGURE_TARGET= --build=${MACHINE_ARCH}-freebsd-freebsd${OSREL}
ONLY_FOR_ARCHS= i386 ONLY_FOR_ARCHS= i386
MAN1= mbchk.1 MAN1= mbchk.1
MAN8= grub.8 grub-install.8 grub-md5-crypt.8 MAN8= grub.8 grub-install.8 grub-md5-crypt.8
INFO= grub multiboot
#.if defined(WITH_SPLASHIMAGE) #.if defined(WITH_SPLASHIMAGE)
#PATCH_SITES= http://people.redhat.com/~katzj/grub/patches/ #PATCH_SITES= http://people.redhat.com/~katzj/grub/patches/
@ -35,12 +36,7 @@ MAN8= grub.8 grub-install.8 grub-md5-crypt.8
# @sleep 2 # @sleep 2
#.endif #.endif
.include <bsd.port.pre.mk>
pre-build:
@${RM} -f ${WRKSRC}/docs/grub.info
post-install: post-install:
@${CAT} ${PKGMESSAGE} @${CAT} ${PKGMESSAGE}
.include <bsd.port.post.mk> .include <bsd.port.mk>

View file

@ -1 +1 @@
MD5 (grub-0.92.tar.gz) = 50f2786e7bf96b1115ee82b9c101a816 MD5 (grub-0.94.tar.gz) = 299672a99cf59656e653d8ffd7851b56

View file

@ -0,0 +1,11 @@
--- docs/Makefile.in.orig Sun Oct 19 21:28:23 2003
+++ docs/Makefile.in Mon Jan 26 15:23:34 2004
@@ -79,7 +79,7 @@
MAINT = @MAINT@
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
-MAKEINFO = @MAKEINFO@
+MAKEINFO = @MAKEINFO@ --no-split
NETBOOT_DRIVERS = @NETBOOT_DRIVERS@
NETBOOT_SUPPORT_FALSE = @NETBOOT_SUPPORT_FALSE@
NETBOOT_SUPPORT_TRUE = @NETBOOT_SUPPORT_TRUE@

View file

@ -1,11 +0,0 @@
--- docs/Makefile.in.orig Thu Jul 5 07:29:56 2001
+++ docs/Makefile.in Wed Oct 24 09:09:39 2001
@@ -248,7 +248,7 @@
MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
$(TEXI2DVI) $<
-MAKEINFO = @MAKEINFO@
+MAKEINFO = @MAKEINFO@ --no-split
TEXI2DVI = texi2dvi
DVIPS = dvips
.dvi.ps:

View file

@ -0,0 +1,11 @@
--- grub/asmstub.c.orig Sat Jan 24 01:52:56 2004
+++ grub/asmstub.c Sat Jan 24 19:11:23 2004
@@ -779,7 +779,7 @@
if (disks[drive].flags == -1)
{
- if (read_only || errno == EACCES || errno == EROFS)
+ if (read_only || errno == EACCES || errno == EROFS || errno == EPERM)
{
disks[drive].flags = open (devname, O_RDONLY);
if (disks[drive].flags == -1)

View file

@ -1,6 +1,66 @@
--- lib/device.c.orig Sat Oct 13 00:20:05 2001 --- lib/device.c.orig Sat Jan 24 01:52:56 2004
+++ lib/device.c Sun Mar 24 10:31:41 2002 +++ lib/device.c Sun Jan 25 00:07:02 2004
@@ -209,7 +209,7 @@ @@ -78,6 +78,12 @@
# include <sys/ioctl.h> /* ioctl */
# include <sys/disklabel.h>
# include <sys/cdio.h> /* CDIOCCLRDEBUG */
+#if defined(__FreeBSD__)
+#include <sys/param.h>
+#if __FreeBSD_version >= 500040
+#include <sys/disk.h>
+#endif
+#endif
#endif /* __FreeBSD__ || __NetBSD__ || __OpenBSD__ */
#ifdef HAVE_OPENDISK
@@ -123,6 +129,7 @@
/* FreeBSD, NetBSD or OpenBSD */
{
struct disklabel hdg;
+#if __FreeBSD_version < 500040
if (ioctl (fd, DIOCGDINFO, &hdg))
goto fail;
@@ -131,6 +138,38 @@
geom->sectors = hdg.d_nsectors;
geom->total_sectors = hdg.d_secperunit;
+#else
+ u_int u, secsize;
+ off_t mediasize;
+
+ if(ioctl(fd, DIOCGSECTORSIZE, &secsize) != 0)
+ secsize = 512;
+
+ if (ioctl(fd, DIOCGMEDIASIZE, &mediasize) != 0)
+ goto fail;
+
+ hdg.d_secperunit = mediasize / secsize;
+
+ if (ioctl(fd, DIOCGFWSECTORS, &u) == 0)
+ hdg.d_nsectors = u;
+ else
+ hdg.d_nsectors = 63;
+ if (ioctl(fd, DIOCGFWHEADS, &u) == 0)
+ hdg.d_ntracks = u;
+ else if (hdg.d_secperunit <= 63*1*1024)
+ hdg.d_ntracks = 1;
+ else if (hdg.d_secperunit <= 63*16*1024)
+ hdg.d_ntracks = 16;
+ else
+ hdg.d_ntracks = 255;
+ hdg.d_secpercyl = hdg.d_ntracks * hdg.d_nsectors;
+ hdg.d_ncylinders = hdg.d_secperunit / hdg.d_secpercyl;
+
+ geom->cylinders = hdg.d_ncylinders;
+ geom->heads = hdg.d_ntracks;
+ geom->sectors = hdg.d_nsectors;
+ geom->total_sectors = hdg.d_secperunit;
+#endif
close (fd);
return;
}
@@ -233,7 +272,7 @@
#elif defined(__FreeBSD__) #elif defined(__FreeBSD__)
/* FreeBSD */ /* FreeBSD */
# if __FreeBSD__ >= 4 # if __FreeBSD__ >= 4
@ -9,12 +69,15 @@
# else /* __FreeBSD__ <= 3 */ # else /* __FreeBSD__ <= 3 */
sprintf (name, "/dev/rwd%d", unit); sprintf (name, "/dev/rwd%d", unit);
# endif /* __FreeBSD__ <= 3 */ # endif /* __FreeBSD__ <= 3 */
@@ -245,7 +245,7 @@ @@ -274,7 +313,11 @@
sprintf (name, "/dev/sd%d", unit); sprintf (name, "/dev/sd%d", unit);
#elif defined(__FreeBSD__) #elif defined(__FreeBSD__)
/* FreeBSD */ /* FreeBSD */
- sprintf (name, "/dev/rda%d", unit); +# if __FreeBSD__ >= 4
+ sprintf (name, "/dev/da%d", unit); + sprintf (name, "/dev/da%d", unit);
+# else /* __FreeBSD__ <= 3 */
sprintf (name, "/dev/rda%d", unit);
+# endif /* __FreeBSD__ <= 3 */
#elif defined(__NetBSD__) && defined(HAVE_OPENDISK) #elif defined(__NetBSD__) && defined(HAVE_OPENDISK)
/* NetBSD */ /* NetBSD */
char shortname[16]; char shortname[16];

View file

@ -1,11 +0,0 @@
--- stage2/fsys_reiserfs.c.orig Tue Jan 6 11:05:27 2004
+++ stage2/fsys_reiserfs.c Tue Jan 6 11:05:59 2004
@@ -112,7 +112,7 @@
/* offset in the log of where to start replay after a crash */
__u32 j_first_unflushed_offset;
/* mount id to detect very old transactions */
- __u32 long j_mount_id;
+ __u32 j_mount_id;
};
/* magic string to find desc blocks in the journal */

View file

@ -1,13 +0,0 @@
--- stage2/xfs.h.orig Sat Oct 27 12:04:25 2001
+++ stage2/xfs.h Tue Jul 9 16:03:40 2002
@@ -33,7 +33,9 @@
* http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
*/
-#ifndef _BITS_TYPES_H
+#include <sys/types.h>
+
+#if 0
typedef signed char __int8_t;
typedef unsigned char __uint8_t;
typedef short __int16_t;

View file

@ -1,13 +1,8 @@
bin/mbchk bin/mbchk
@unexec install-info --delete %D/info/grub.info %D/info/dir
@unexec install-info --delete %D/info/multiboot.info %D/info/dir
info/grub.info
info/multiboot.info
@exec install-info %D/info/multiboot.info %D/info/dir
@exec install-info %D/info/grub.info %D/info/dir
sbin/grub sbin/grub
sbin/grub-install sbin/grub-install
sbin/grub-md5-crypt sbin/grub-md5-crypt
sbin/grub-terminfo
share/grub/i386-freebsd/e2fs_stage1_5 share/grub/i386-freebsd/e2fs_stage1_5
share/grub/i386-freebsd/fat_stage1_5 share/grub/i386-freebsd/fat_stage1_5
share/grub/i386-freebsd/ffs_stage1_5 share/grub/i386-freebsd/ffs_stage1_5