summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Jezak <josejx@gentoo.org>2009-07-22 15:18:55 +0000
committerJoseph Jezak <josejx@gentoo.org>2009-07-22 15:18:55 +0000
commitcf9e89475b2efe147c433115b1baad3e3ef9d087 (patch)
tree337ae3795cea5a20c65812047efff5c0d0a4397a /sys-fs/mac-fdisk
parentarm/sh/sparc stable wrt #271253 (diff)
downloadgentoo-2-cf9e89475b2efe147c433115b1baad3e3ef9d087.tar.gz
gentoo-2-cf9e89475b2efe147c433115b1baad3e3ef9d087.tar.bz2
gentoo-2-cf9e89475b2efe147c433115b1baad3e3ef9d087.zip
Added patch for bug #199430.
(Portage version: 2.1.6.13/cvs/Linux x86_64)
Diffstat (limited to 'sys-fs/mac-fdisk')
-rw-r--r--sys-fs/mac-fdisk/ChangeLog10
-rw-r--r--sys-fs/mac-fdisk/files/big_pt.patch80
-rw-r--r--sys-fs/mac-fdisk/mac-fdisk-0.1-r6.ebuild9
-rw-r--r--sys-fs/mac-fdisk/mac-fdisk-0.1-r7.ebuild55
4 files changed, 148 insertions, 6 deletions
diff --git a/sys-fs/mac-fdisk/ChangeLog b/sys-fs/mac-fdisk/ChangeLog
index 1546509d97ab..3170933e8017 100644
--- a/sys-fs/mac-fdisk/ChangeLog
+++ b/sys-fs/mac-fdisk/ChangeLog
@@ -1,6 +1,12 @@
# 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.21 2007/06/25 15:58:51 josejx Exp $
+# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/mac-fdisk/ChangeLog,v 1.22 2009/07/22 15:18:55 josejx Exp $
+
+*mac-fdisk-0.1-r7 (22 Jul 2009)
+
+ 22 Jul 2009; Joseph Jezak <josejx@gentoo.org> +files/big_pt.patch,
+ +mac-fdisk-0.1-r7.ebuild, mac-fdisk-0.1-r6.ebuild:
+ Added patch for bug #199430. Fixed variable quoting.
25 Jun 2007; Joseph Jezak <josejx@gentoo.org>
-files/mac-fdisk-0.1-r3-ppc64.patch, -mac-fdisk-0.1-r3.ebuild,
diff --git a/sys-fs/mac-fdisk/files/big_pt.patch b/sys-fs/mac-fdisk/files/big_pt.patch
new file mode 100644
index 000000000000..f8951412516b
--- /dev/null
+++ b/sys-fs/mac-fdisk/files/big_pt.patch
@@ -0,0 +1,80 @@
+--- partition_map.c 2009-07-22 15:06:58.739072858 +0000
++++ /home/jjezak/partition_map.c 2009-07-22 15:10:01.069051603 +0000
+@@ -25,6 +25,11 @@
+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
++//
++// Defines
++//
++// #define TEST_COMPUTE
++
+ #include <stdio.h>
+ #include <string.h>
+ #include <stdlib.h>
+@@ -36,6 +41,10 @@
+ #include <sys/ioctl.h>
+ #include "kernel-defs.h"
+ #include <sys/stat.h>
++#ifdef TEST_COMPUTE
++#include <linux/fs.h>
++#endif
++
+ #endif
+
+ #include "partition_map.h"
+@@ -45,10 +54,6 @@
+ #include "errors.h"
+
+
+-//
+-// Defines
+-//
+-// #define TEST_COMPUTE
+
+
+ //
+@@ -666,7 +671,7 @@
+ loff_t pos;
+ #endif
+ char* data;
+- unsigned long l, r, x;
++ unsigned long long l, r, x;
+ int valid;
+
+ #ifdef TEST_COMPUTE
+@@ -720,9 +725,11 @@
+ } else {
+ r = r * 2;
+ }
+- if (r >= (1024*1024*1024)) {
+- break;
+- }
++// There's no explanation for this, but I suspect the author was trying to
++// prevent going over the 32 bit size
++// if (r >= (1024*1024*1024*2)) {
++// break;
++// }
+ }
+ // binary search for end
+ while (l <= r) {
+@@ -740,11 +747,17 @@
+ if (valid != 0) {
+ x = x + 1;
+ }
+- // printf("size in blocks = %d\n", x);
++#ifdef TEST_COMPUTE
++ printf("size in blocks = %d\n", x);
++#endif
+ free(data);
+ }
++
++ // Add a warning just in case...
++ if(x > 0x80000000)
++ printf("Warning: Large disks may not work with this tool!\n");
+
+- return x;
++ return (unsigned long) x;
+ }
+
+
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 fdd6fb60b933..7b95d4c68bde 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
+# Copyright 1999-2009 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.9 2007/06/25 15:58:51 josejx Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/mac-fdisk/mac-fdisk-0.1-r6.ebuild,v 1.10 2009/07/22 15:18:55 josejx Exp $
inherit eutils toolchain-funcs
@@ -16,6 +16,7 @@ KEYWORDS="amd64 ppc ppc64 x86"
IUSE=""
DEPEND=""
+RDEPEND="${DEPEND}"
src_unpack() {
unpack mac-fdisk_${PV}.orig.tar.gz
@@ -27,10 +28,10 @@ src_unpack() {
epatch "${FILESDIR}"/${P}-headers.patch
### Patch for bug #142737
- epatch ${FILESDIR}/${PN}-0.1-r6-ppc64.patch
+ epatch "${FILESDIR}"/${PN}-0.1-r6-ppc64.patch
### Patch for building on amd64
- epatch ${FILESDIR}/${PN}-amd64.patch
+ epatch "${FILESDIR}"/${PN}-amd64.patch
}
src_compile() {
diff --git a/sys-fs/mac-fdisk/mac-fdisk-0.1-r7.ebuild b/sys-fs/mac-fdisk/mac-fdisk-0.1-r7.ebuild
new file mode 100644
index 000000000000..80f8cfaf8a89
--- /dev/null
+++ b/sys-fs/mac-fdisk/mac-fdisk-0.1-r7.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2009 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-r7.ebuild,v 1.1 2009/07/22 15:18:55 josejx Exp $
+
+inherit eutils toolchain-funcs
+
+DEBRV=13
+DESCRIPTION="Mac/PowerMac disk partitioning utility"
+HOMEPAGE="ftp://ftp.mklinux.apple.com/pub/Other_Tools/"
+SRC_URI="mirror://debian/pool/main/m/mac-fdisk/${PN}_${PV}.orig.tar.gz
+ mirror://debian/pool/main/m/mac-fdisk/${PN}_${PV}-${DEBRV}.diff.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND="${DEPEND}"
+
+src_unpack() {
+ unpack mac-fdisk_${PV}.orig.tar.gz
+ mv mac-fdisk-${PV}.orig ${P}
+ cd "${S}"
+ epatch "${DISTDIR}"/${PN}_${PV}-${DEBRV}.diff.gz
+
+ epatch "${FILESDIR}"/largerthan2gb.patch
+ epatch "${FILESDIR}"/${P}-headers.patch
+
+ ### Patch for bug #142737
+ epatch "${FILESDIR}"/${PN}-0.1-r6-ppc64.patch
+
+ ### Patch for building on amd64
+ epatch "${FILESDIR}"/${PN}-amd64.patch
+
+ ### Patch for large (>550GB disks)
+ ### Note that >=2TB disks may not work due to limitations of the Mac
+ ### Partition Table structure, this needs to be investigated
+ epatch "${FILESDIR}"/big_pt.patch
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)" || die "emake failed!"
+}
+
+src_install() {
+ into /
+ newsbin pdisk mac-fdisk || die
+ newsbin fdisk pmac-fdisk || die
+
+ into /usr
+ newman mac-fdisk.8.in mac-fdisk.8
+ newman pmac-fdisk.8.in pmac-fdisk.8
+ dodoc README HISTORY
+}