summaryrefslogtreecommitdiff
path: root/sys-fs
diff options
context:
space:
mode:
authorJoseph Jezak <josejx@gentoo.org>2007-04-07 16:27:25 +0000
committerJoseph Jezak <josejx@gentoo.org>2007-04-07 16:27:25 +0000
commitf6f06743a1c6a859d0c099812b8539f98d236bf8 (patch)
treec5b3cbf6bd06fb2bf7e294b8b00e7c3e19bfc4d1 /sys-fs
parentStable on ppc wrt bug 173623 (diff)
downloadgentoo-2-f6f06743a1c6a859d0c099812b8539f98d236bf8.tar.gz
gentoo-2-f6f06743a1c6a859d0c099812b8539f98d236bf8.tar.bz2
gentoo-2-f6f06743a1c6a859d0c099812b8539f98d236bf8.zip
Added patch for amd64.
(Portage version: 2.1.2.3)
Diffstat (limited to 'sys-fs')
-rw-r--r--sys-fs/mac-fdisk/ChangeLog6
-rw-r--r--sys-fs/mac-fdisk/files/mac-fdisk-amd64.patch193
-rw-r--r--sys-fs/mac-fdisk/mac-fdisk-0.1-r6.ebuild9
3 files changed, 204 insertions, 4 deletions
diff --git a/sys-fs/mac-fdisk/ChangeLog b/sys-fs/mac-fdisk/ChangeLog
index bd5e96e38661..17f2059beece 100644
--- a/sys-fs/mac-fdisk/ChangeLog
+++ b/sys-fs/mac-fdisk/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for sys-fs/mac-fdisk
# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-fs/mac-fdisk/ChangeLog,v 1.18 2007/02/13 21:15:30 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/mac-fdisk/ChangeLog,v 1.19 2007/04/07 16:27:25 josejx Exp $
+
+ 07 Apr 2007; Joseph Jezak <josejx@gentoo.org>
+ +files/mac-fdisk-amd64.patch, mac-fdisk-0.1-r6.ebuild:
+ Added patch for amd64.
13 Feb 2007; Chris Gianelloni <wolf31o2@gentoo.org>
mac-fdisk-0.1-r6.ebuild:
diff --git a/sys-fs/mac-fdisk/files/mac-fdisk-amd64.patch b/sys-fs/mac-fdisk/files/mac-fdisk-amd64.patch
new file mode 100644
index 000000000000..ecc37a19a68e
--- /dev/null
+++ b/sys-fs/mac-fdisk/files/mac-fdisk-amd64.patch
@@ -0,0 +1,193 @@
+diff -Naur mac-fdisk-0.1.bak/fdisklabel.c mac-fdisk-0.1/fdisklabel.c
+--- mac-fdisk-0.1.bak/fdisklabel.c 2007-03-16 10:56:26.000000000 -0400
++++ mac-fdisk-0.1/fdisklabel.c 2007-03-16 10:56:13.000000000 -0400
+@@ -72,7 +72,7 @@
+ static int bsd_readlabel (struct partition *p, struct disklabel *d);
+ static int bsd_writelabel (struct partition *p, struct disklabel *d);
+ static void sync_disks (void);
+-#if defined (i386)
++#if defined (i386) || defined (__amd64)
+ static int bsd_translate_fstype (int linux_type);
+ static void bsd_link_part (void);
+ #endif
+@@ -82,7 +82,7 @@
+
+ static struct disklabel bsd_dlabel;
+ static char buffer[BSD_BBSIZE];
+-#if defined (i386)
++#if defined (i386) || defined (__amd64)
+ static struct partition *bsd_part;
+ static int bsd_part_index;
+ #endif
+@@ -99,13 +99,13 @@
+ " n add a new BSD partition\n"
+ " p print BSD partition table\n"
+ " q quit without saving changes\n"
+-#if defined (i386)
++#if defined (i386) || defined (__amd64)
+ " r return to main menu\n"
+ #endif
+ " s show complete disklabel\n"
+ " t change a partition's filesystem id\n"
+ " w write disklabel to disk\n"
+-#if defined (i386)
++#if defined (i386) || defined (__amd64)
+ " x link BSD partition to non-BSD partition"
+ #endif
+ );
+@@ -114,7 +114,7 @@
+ void
+ bselect (void)
+ {
+-#if defined (i386)
++#if defined (i386) || defined (__amd64)
+ int t;
+
+ for (t=0; t<4; t++)
+@@ -185,7 +185,7 @@
+ case 'w':
+ bsd_write_disklabel ();
+ break;
+-#if defined (i386)
++#if defined (i386) || defined (__amd64)
+ case 'r':
+ return;
+ case 'x':
+@@ -223,7 +223,7 @@
+ if (!bsd_check_new_partition (&i))
+ return;
+
+-#if defined (i386)
++#if defined (i386) || defined (__amd64)
+ begin = bsd_part -> start_sect;
+ end = begin + bsd_part -> nr_sects - 1;
+ #elif defined (__alpha__) || defined (__powerpc__)
+@@ -257,7 +257,7 @@
+
+ if (show_all)
+ {
+-#if defined (i386)
++#if defined (i386) || defined (__amd64)
+ fprintf(f, "# %s%d:\n", disk_device, bsd_part_index+1);
+ #elif defined (__alpha__) || defined (__powerpc__)
+ fprintf(f, "# %s:\n", disk_device);
+@@ -352,7 +352,7 @@
+ static void
+ bsd_write_disklabel (void)
+ {
+-#if defined (i386)
++#if defined (i386) || defined (__amd64)
+ printf ("Writing disklabel to %s%d.\n", disk_device, bsd_part_index+1);
+ bsd_writelabel (bsd_part, &bsd_dlabel);
+ #elif defined (__alpha__) || defined (__powerpc__)
+@@ -366,7 +366,7 @@
+ {
+ char c;
+
+-#if defined (i386)
++#if defined (i386) || defined(__amd64)
+ fprintf (stderr, "%s%d contains no disklabel.\n",
+ disk_device, bsd_part_index+1);
+ #elif defined (__alpha__) || defined (__powerpc__)
+@@ -376,7 +376,7 @@
+ while (1)
+ if ((c = tolower (read_char ("Do you want to create a disklabel? (y/n) "))) == 'y')
+ {
+-#if defined (i386)
++#if defined (i386) || defined(__amd64)
+ if (bsd_initlabel (bsd_part, &bsd_dlabel, bsd_part_index) == 1)
+ #elif defined (__alpha__) || defined (__powerpc__) || defined (__mc68000__)
+ if (bsd_initlabel (NULL, &bsd_dlabel, 0) == 1)
+@@ -507,7 +507,7 @@
+
+ bcopy (&dl, d, sizeof (struct disklabel));
+
+-#if defined (i386)
++#if defined (i386) || defined (__amd64)
+ sector = bsd_part -> start_sect;
+ #elif defined (__powerpc__)
+ sector = 0;
+@@ -521,7 +521,7 @@
+ if (BSD_BBSIZE != write (fd, buffer, BSD_BBSIZE))
+ fatal (unable_to_write);
+
+-#if defined (i386)
++#if defined (i386) || defined (__amd64)
+ printf ("Bootstrap installed on %s%d.\n", disk_device, bsd_part_index+1);
+ #elif defined (__alpha__) || defined (__powerpc__)
+ printf ("Bootstrap installed on %s.\n", disk_device);
+@@ -625,7 +625,7 @@
+ d -> d_subtype = BSD_DSTYPE_INDOSPART & pindex;
+ #endif
+
+-#if defined (i386)
++#if defined (i386) || defined (__amd64)
+ d -> d_flags = BSD_D_DOSPART;
+ #else
+ d -> d_flags = 0;
+@@ -648,7 +648,7 @@
+ d -> d_bbsize = BSD_BBSIZE;
+ d -> d_sbsize = BSD_SBSIZE;
+
+-#if defined (i386)
++#if defined (i386) || defined (__amd64)
+ d -> d_npartitions = 4;
+ pp = &d -> d_partitions[2]; /* Partition C should be the NetBSD partition */
+ pp -> p_offset = p -> start_sect;
+@@ -674,7 +674,7 @@
+ {
+ int t, sector;
+
+-#if defined (i386)
++#if defined (i386) || defined (__amd64)
+ sector = p -> start_sect;
+ #elif defined (__alpha__) || defined (__powerpc__)
+ sector = 0;
+@@ -708,7 +708,7 @@
+ {
+ int sector;
+
+-#if defined (i386)
++#if defined (i386) || defined (__amd64)
+ sector = p -> start_sect + BSD_LABELSECTOR;
+ #elif defined (__alpha__) || defined (__powerpc__)
+ sector = BSD_LABELSECTOR;
+@@ -749,7 +749,7 @@
+ sleep (4);
+ }
+
+-#if defined (i386)
++#if defined (i386) || defined (__amd64)
+ static int
+ bsd_translate_fstype (int linux_type)
+ {
+diff -Naur mac-fdisk-0.1.bak/fdisklabel.h mac-fdisk-0.1/fdisklabel.h
+--- mac-fdisk-0.1.bak/fdisklabel.h 2007-03-16 10:56:26.000000000 -0400
++++ mac-fdisk-0.1/fdisklabel.h 2007-03-16 10:56:13.000000000 -0400
+@@ -35,7 +35,7 @@
+ #define BSD_MAXPARTITIONS 8
+ #define BSD_LINUX_BOOTDIR "/usr/ucb/mdec"
+
+-#if defined (i386)
++#if defined (i386) || defined(__amd64)
+ #define BSD_LABELSECTOR 1
+ #define BSD_LABELOFFSET 0
+ #define BSD_BBSIZE 8192 /* size of boot area, with label */
+diff -Naur mac-fdisk-0.1.bak/kernel-defs.h mac-fdisk-0.1/kernel-defs.h
+--- mac-fdisk-0.1.bak/kernel-defs.h 2007-03-16 10:56:26.000000000 -0400
++++ mac-fdisk-0.1/kernel-defs.h 2007-03-16 10:56:13.000000000 -0400
+@@ -15,8 +15,14 @@
+ /* from asm/ioctl.h */
+ #define _IOC_NRBITS 8
+ #define _IOC_TYPEBITS 8
++
++#ifndef _IOC_SIZEBITS
+ #define _IOC_SIZEBITS 13
++#endif
++
++#ifndef _IOC_DIRBITS
+ #define _IOC_DIRBITS 3
++#endif
+
+ #define _IOC_NRMASK ((1 << _IOC_NRBITS)-1)
+ #define _IOC_TYPEMASK ((1 << _IOC_TYPEBITS)-1)
diff --git a/sys-fs/mac-fdisk/mac-fdisk-0.1-r6.ebuild b/sys-fs/mac-fdisk/mac-fdisk-0.1-r6.ebuild
index 5b6addc81745..e1c1f3dd4d28 100644
--- a/sys-fs/mac-fdisk/mac-fdisk-0.1-r6.ebuild
+++ b/sys-fs/mac-fdisk/mac-fdisk-0.1-r6.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-fs/mac-fdisk/mac-fdisk-0.1-r6.ebuild,v 1.6 2007/02/13 21:15:30 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/mac-fdisk/mac-fdisk-0.1-r6.ebuild,v 1.7 2007/04/07 16:27:25 josejx Exp $
inherit eutils
@@ -21,13 +21,16 @@ src_unpack() {
unpack mac-fdisk_${PV}.orig.tar.gz
mv mac-fdisk-${PV}.orig ${P}
cd "${S}"
- epatch "${DISTDIR}"/mac-fdisk_${PV}-${DEBRV}.diff.gz
+ epatch "${DISTDIR}"/${PN}_${PV}-${DEBRV}.diff.gz
epatch "${FILESDIR}"/largerthan2gb.patch
epatch "${FILESDIR}"/${P}-headers.patch
### Patch for bug #142737
- epatch ${FILESDIR}/mac-fdisk-0.1-r6-ppc64.patch
+ epatch ${FILESDIR}/${PN}-0.1-r6-ppc64.patch
+
+ ### Patch for building on amd64
+ epatch ${FILESDIR}/${PN}-amd64.patch
}
src_install() {