summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkos Chandras <hwoarang@gentoo.org>2009-12-19 11:46:13 +0000
committerMarkos Chandras <hwoarang@gentoo.org>2009-12-19 11:46:13 +0000
commitee1de85fee73e152f80af0fda6ef48b4ff83a094 (patch)
treef0c16b18056c48e1e57e01f43bb6c65f9fa10d60 /sys-block/gpart
parentVersion bump. Depend on dev-perl/Try-Tiny (diff)
downloadgentoo-2-ee1de85fee73e152f80af0fda6ef48b4ff83a094.tar.gz
gentoo-2-ee1de85fee73e152f80af0fda6ef48b4ff83a094.tar.bz2
gentoo-2-ee1de85fee73e152f80af0fda6ef48b4ff83a094.zip
Apply amd64 patches. Fixes bug #293955
(Portage version: 2.2_rc59/cvs/Linux x86_64)
Diffstat (limited to 'sys-block/gpart')
-rw-r--r--sys-block/gpart/ChangeLog11
-rw-r--r--sys-block/gpart/files/gpart-0.1h-l64seek.patch71
-rw-r--r--sys-block/gpart/files/gpart-0.1h-openmode.patch11
-rw-r--r--sys-block/gpart/gpart-0.1h-r2.ebuild36
4 files changed, 127 insertions, 2 deletions
diff --git a/sys-block/gpart/ChangeLog b/sys-block/gpart/ChangeLog
index 20dbf0785416..a61e3bb07a9c 100644
--- a/sys-block/gpart/ChangeLog
+++ b/sys-block/gpart/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for sys-block/gpart
-# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-block/gpart/ChangeLog,v 1.5 2007/03/03 05:34:51 vapier Exp $
+# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-block/gpart/ChangeLog,v 1.6 2009/12/19 11:46:13 hwoarang Exp $
+
+*gpart-0.1h-r2 (19 Dec 2009)
+
+ 19 Dec 2009; <hwoarang@gentoo.org> +gpart-0.1h-r2.ebuild,
+ +files/gpart-0.1h-l64seek.patch, +files/gpart-0.1h-openmode.patch:
+ Apply amd64 patches. Thanks to Fabio Rossi <rossi.f@inwind.it>. Fixes bug
+ #293955
03 Mar 2007; Mike Frysinger <vapier@gentoo.org>
+files/gpart-0.1h-no-_syscall.patch, gpart-0.1h-r1.ebuild:
diff --git a/sys-block/gpart/files/gpart-0.1h-l64seek.patch b/sys-block/gpart/files/gpart-0.1h-l64seek.patch
new file mode 100644
index 000000000000..8a14411a5ccc
--- /dev/null
+++ b/sys-block/gpart/files/gpart-0.1h-l64seek.patch
@@ -0,0 +1,71 @@
+--- gpart-0.1h.orig/src/l64seek.c
++++ gpart-0.1h/src/l64seek.c
+@@ -25,30 +25,11 @@
+ } ostck[OSTACKLEN];
+ static int osptr = -1;
+
+-#if defined(__linux__) && defined(__i386__)
+-_syscall5(int,_llseek,uint,fd,ulong,hi,ulong,lo,loff_t *,res,uint,wh)
+-#endif
+-
+-
+-
+ off64_t l64seek(int fd,off64_t offset,int whence)
+ {
+ off64_t ret = (off64_t)-1;
+
+-#if defined(__linux__) && defined(__i386__)
+- int iret;
+- unsigned long ohi, olo;
+-
+- ohi = (unsigned long)((offset >> 32) & 0xFFFFFFFF);
+- olo = (unsigned long)(offset & 0xFFFFFFFF);
+- iret = _llseek(fd,ohi,olo,&ret,whence);
+- if (iret == -1)
+- ret = (off64_t)-1;
+-#endif
+-
+-#if defined(__FreeBSD__) || (defined(__linux__) && defined(__alpha__))
+ ret = lseek(fd,offset,whence);
+-#endif
+
+ return (ret);
+ }
+--- gpart-0.1h.orig/src/l64seek.h
++++ gpart-0.1h/src/l64seek.h
+@@ -17,6 +17,8 @@
+ #ifndef _L64SEEK_H
+ #define _L64SEEK_H
+
++#include <sys/stat.h>
++#include <sys/types.h>
+ #include <unistd.h>
+
+ /*
+@@ -25,19 +27,7 @@
+ * offsets.
+ */
+
+-
+-#if defined(__linux__)
+-# include <linux/unistd.h>
+-# include <sys/types.h>
+- typedef int64_t off64_t;
+-#endif
+-
+-
+-#if defined(__FreeBSD__)
+- typedef off_t off64_t;
+-#endif
+-
+-
++typedef loff_t off64_t;
+ typedef off64_t s64_t;
+
+ off64_t l64seek(int fd, off64_t offset, int whence);
+@@ -45,5 +35,4 @@
+ int l64opush(int);
+ s64_t l64opop(int);
+
+-
+ #endif
diff --git a/sys-block/gpart/files/gpart-0.1h-openmode.patch b/sys-block/gpart/files/gpart-0.1h-openmode.patch
new file mode 100644
index 000000000000..ca13cc9420e6
--- /dev/null
+++ b/sys-block/gpart/files/gpart-0.1h-openmode.patch
@@ -0,0 +1,11 @@
+--- gpart.orig/src/gpart.c 2008-10-19 15:06:06.000000000 +0000
++++ gpart/src/gpart.c 2008-11-25 07:34:47.000000000 +0000
+@@ -1221,7 +1221,7 @@ static int make_mbr_backup(disk_desc *d,
+ {
+ int fd, ret = 0;
+
+- if ((fd = open(bfile,O_WRONLY|O_CREAT)) < 0)
++ if ((fd = open(bfile,O_WRONLY|O_CREAT, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH)) < 0)
+ return (ret);
+
+ if (write(fd,d->d_pt.t_boot,512) == 512)
diff --git a/sys-block/gpart/gpart-0.1h-r2.ebuild b/sys-block/gpart/gpart-0.1h-r2.ebuild
new file mode 100644
index 000000000000..8aa2ec799462
--- /dev/null
+++ b/sys-block/gpart/gpart-0.1h-r2.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-block/gpart/gpart-0.1h-r2.ebuild,v 1.1 2009/12/19 11:46:13 hwoarang Exp $
+
+inherit eutils
+
+DESCRIPTION="Partition table rescue/guessing tool"
+HOMEPAGE="http://www.stud.uni-hannover.de/user/76201/gpart/"
+SRC_URI="http://www.stud.uni-hannover.de/user/76201/gpart/${P}.tar.gz
+ ftp://ftp.namesys.com/pub/misc-patches/gpart-0.1h-reiserfs-3.6.patch.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~x86"
+IUSE=""
+
+RDEPEND=""
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${P}-errno.patch
+ epatch "${FILESDIR}"/${P}-vfat.patch
+ epatch "${FILESDIR}"/${P}-ntfs.patch
+ epatch "${WORKDIR}"/gpart-0.1h-reiserfs-3.6.patch
+ epatch "${FILESDIR}"/${P}-l64seek.patch
+ epatch "${FILESDIR}"/${P}-openmode.patch
+ sed -i -e "/^CFLAGS/s: -O2 : ${CFLAGS} :" make.defs
+ sed -i -e "/^LDFLAGS/s:=:=${LDFLAGS} :" make.defs
+}
+
+src_install() {
+ dobin src/gpart || die
+ doman man/gpart.8
+ dodoc README Changes INSTALL LSM
+}