Fixed compile for ppc
authorJon Nall <nall@gentoo.org>
Sat, 2 Nov 2002 21:07:33 +0000 (21:07 +0000)
committerJon Nall <nall@gentoo.org>
Sat, 2 Nov 2002 21:07:33 +0000 (21:07 +0000)
sys-apps/reiserfsprogs/ChangeLog
sys-apps/reiserfsprogs/files/digest-reiserfsprogs-3.6.4-r1 [new file with mode: 0644]
sys-apps/reiserfsprogs/files/reiserfsprogs-3.6.4-bitops.patch [new file with mode: 0644]
sys-apps/reiserfsprogs/reiserfsprogs-3.6.4-r1.ebuild [new file with mode: 0644]

index 0e410a6ab4114100f0f03d9983ca35acbff70de7..bef1db567a694b792595923abf05ecd2574858c8 100644 (file)
@@ -1,6 +1,12 @@
 # ChangeLog for sys-apps/reiserfsprogs
 # Copyright 2002 Gentoo Technologies, Inc.; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/reiserfsprogs/ChangeLog,v 1.6 2002/10/28 02:30:06 lostlogic Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/reiserfsprogs/ChangeLog,v 1.7 2002/11/02 21:07:33 nall Exp $
+
+*reiserfsprogs-3.6.4-r1 (02 Nov 2002)
+  
+  02 Nov 2002; Jon Nall <nall@gentoo.org> reiserfsprogs-3.6.4-r1.ebuild,
+  files/reiserfsprogs-3.6.4-bitops.patch :
+  Fixed compile for ppc
 
 *reiserfsprogs-3.6.4 (27 Oct 2002)
 
diff --git a/sys-apps/reiserfsprogs/files/digest-reiserfsprogs-3.6.4-r1 b/sys-apps/reiserfsprogs/files/digest-reiserfsprogs-3.6.4-r1
new file mode 100644 (file)
index 0000000..f117af3
--- /dev/null
@@ -0,0 +1 @@
+MD5 02d9377b38d6879bfa7bebff6718a9e1 reiserfsprogs-3.6.4.tar.gz 332584
diff --git a/sys-apps/reiserfsprogs/files/reiserfsprogs-3.6.4-bitops.patch b/sys-apps/reiserfsprogs/files/reiserfsprogs-3.6.4-bitops.patch
new file mode 100644 (file)
index 0000000..7996616
--- /dev/null
@@ -0,0 +1,41 @@
+--- include/io.h.orig  2002-11-02 11:55:50.000000000 -0600
++++ include/io.h       2002-11-02 14:02:08.000000000 -0600
+@@ -3,6 +3,10 @@
+  */
+ 
+ 
++#define __KERNEL__
++#include <asm/bitops.h> /* needed for test_bit/set_bit */
++#undef __KERNEL__
++
+ struct buffer_head {
+     unsigned long b_blocknr;
+     unsigned short b_dev;
+--- include/misc.h.orig        2002-11-02 14:17:31.000000000 -0600
++++ include/misc.h     2002-11-02 14:19:44.000000000 -0600
+@@ -49,7 +49,10 @@
+ int uuid_is_correct (unsigned char * uuid);
+ int set_uuid (const unsigned char * text, unsigned char * UUID);
+ 
++#define __KERNEL__
+ #include <asm/bitops.h>
++#undef __KERNEL__
++
+ #if __BYTE_ORDER == __LITTLE_ENDIAN
+ int le_set_bit (int nr, void * addr);
+ int le_clear_bit (int nr, void * addr);
+@@ -64,12 +67,14 @@
+ # define le64_to_cpu(val)                 (val)
+ #elif __BYTE_ORDER == __BIG_ENDIAN
+ 
++#ifndef cpu_to_le16
+ # define cpu_to_le16(val)                 swab16(val)
+ # define le16_to_cpu(val)                 swab16(val)
+ # define cpu_to_le32(val)                 swab32(val)
+ # define le32_to_cpu(val)                 swab32(val)
+ # define cpu_to_le64(val)                 swab64(val)
+ # define le64_to_cpu(val)                 swab64(val)
++#endif
+ #else
+ # error "nuxi/pdp-endian archs are not supported"
+ #endif
diff --git a/sys-apps/reiserfsprogs/reiserfsprogs-3.6.4-r1.ebuild b/sys-apps/reiserfsprogs/reiserfsprogs-3.6.4-r1.ebuild
new file mode 100644 (file)
index 0000000..0830ab7
--- /dev/null
@@ -0,0 +1,47 @@
+# Copyright 1999-2002 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/reiserfsprogs/reiserfsprogs-3.6.4-r1.ebuild,v 1.1 2002/11/02 21:07:33 nall Exp $
+
+S=${WORKDIR}/${P}
+DESCRIPTION="Reiserfs Utilities"
+SRC_URI="ftp://ftp.namesys.com/pub/reiserfsprogs/${P}.tar.gz"
+HOMEPAGE="http://www.namesys.com"
+KEYWORDS="~x86 ~ppc ~sparc ~sparc64 ~alpha"
+SLOT="0"
+LICENSE="GPL-2"
+
+DEPEND="virtual/glibc"
+
+src_unpack() {
+       unpack ${A}
+
+       # NOTE: this patch needs to be applied to any architecture that has
+       # /usr/include/asm/bitops.h entirely wrapped with #ifdef __KERNEL__.
+       # This is needed because asm-i386/bitops.h is broken and reiserfsprogs
+       # relies on the fact that it is broken. the reiserfsprogs people have
+       # been made aware of this fact. hopefully this patch won't be needed
+       # in future versions.
+       # I bet sparc needs this patch too, but I don't have a machine to test on.
+       if [ "${ARCH}" = "ppc" ]; then
+               cd ${S}
+               einfo "Applying asm/bitops.h patch"
+               patch -p0 < ${FILESDIR}/reiserfsprogs-3.6.4-bitops.patch || die
+       fi
+}
+
+src_compile() {
+       cd ${S}
+       ./configure --prefix=/ || die
+       emake || die
+}
+
+src_install() {
+       make DESTDIR=${D} install || die
+       dodir /usr/share
+       dodoc AUTHORS COPYING ChangeLog INSTALL NEWS README
+
+       cd ${D}
+       mv man usr/share
+       dosym /sbin/reiserfsck /sbin/fsck.reiserfs
+}
+