[arch-commits] Commit in gpart/repos (7 files)

Eric Bélanger eric at archlinux.org
Wed Apr 8 04:53:12 UTC 2009


    Date: Wednesday, April 8, 2009 @ 00:53:12
  Author: eric
Revision: 34201

Fixed svn conflict

Added:
  gpart/repos/extra-x86_64/gpart-0.1h-PIC.patch
    (from rev 34200, gpart/trunk/gpart-0.1h-PIC.patch)
  gpart/repos/extra-x86_64/gpart-0.1h-errno.patch
    (from rev 34200, gpart/trunk/gpart-0.1h-errno.patch)
  gpart/repos/extra-x86_64/gpart-0.1h-no-_syscall.patch
    (from rev 34200, gpart/trunk/gpart-0.1h-no-_syscall.patch)
  gpart/repos/extra-x86_64/gpart-0.1h-ntfs.patch
    (from rev 34200, gpart/trunk/gpart-0.1h-ntfs.patch)
  gpart/repos/extra-x86_64/gpart-0.1h-vfat.patch
    (from rev 34200, gpart/trunk/gpart-0.1h-vfat.patch)
Modified:
  gpart/repos/extra-x86_64/	(properties)
  gpart/repos/extra-x86_64/PKGBUILD

------------------------------+
 PKGBUILD                     |   29 +++++++++------
 gpart-0.1h-PIC.patch         |   20 ++++++++++
 gpart-0.1h-errno.patch       |   20 ++++++++++
 gpart-0.1h-no-_syscall.patch |   15 ++++++++
 gpart-0.1h-ntfs.patch        |   75 +++++++++++++++++++++++++++++++++++++++++
 gpart-0.1h-vfat.patch        |   17 +++++++++
 6 files changed, 165 insertions(+), 11 deletions(-)


Property changes on: gpart/repos/extra-x86_64
___________________________________________________________________
Modified: svnmerge-integrated
   - /gpart/trunk:1
   + /gpart/trunk:1-34200

Modified: extra-x86_64/PKGBUILD
===================================================================
--- extra-x86_64/PKGBUILD	2009-04-08 04:51:41 UTC (rev 34200)
+++ extra-x86_64/PKGBUILD	2009-04-08 04:53:12 UTC (rev 34201)
@@ -4,20 +4,27 @@
 
 pkgname=gpart
 pkgver=0.1h
-pkgrel=2
+pkgrel=3
 pkgdesc="Gpart is a tool which tries to guess the primary partition table of a PC-type hard disk in case the primary partition table in sector 0 is damaged"
+arch=('i686' 'x86_64')
 url="http://www.stud.uni-hannover.de/user/76201/gpart/"
-source=(http://www.stud.uni-hannover.de/user/76201/gpart/$pkgname-$pkgver.tar.gz)
-[ "$CARCH" = "x86_64" ] && source=(${source[@]} gpart-0.1h-ntfs.patch)
-md5sums=('ee3a2d2dde70bcf404eb354b3d1ee6d4')
-[ "$CARCH" = "x86_64" ] && md5sums=(${md5sums[@]} '8161c02116ee4575906587eb09e35bde')
+license=('GPL')
+depends=('glibc')
+source=(http://www.stud.uni-hannover.de/user/76201/gpart/$pkgname-$pkgver.tar.gz \
+        gpart-0.1h-errno.patch gpart-0.1h-vfat.patch gpart-0.1h-ntfs.patch
+        gpart-0.1h-PIC.patch gpart-0.1h-no-_syscall.patch)
+md5sums=('ee3a2d2dde70bcf404eb354b3d1ee6d4' '81eee5d9985df9bf9c23624e46cf945f'\
+         'ae6d86b0268618d34e618824dcd82754' '8161c02116ee4575906587eb09e35bde'\
+         'd3f5b05d12816375f5dcd9a251f72f61' 'f811c6e132b2c0cd2d9cb0fd4933063a')
 
 build() {
-	cd $startdir/src/$pkgname-$pkgver
+  cd $srcdir/$pkgname-$pkgver
+  patch -p1 < ../gpart-0.1h-errno.patch || return 1
+  patch -p1 < ../gpart-0.1h-vfat.patch || return 1
+  patch -p1 < ../gpart-0.1h-ntfs.patch || return 1
+  patch -p1 < ../gpart-0.1h-PIC.patch || return 1
+  patch -p0 < ../gpart-0.1h-no-_syscall.patch || return 1
 
-        #arch64 fix from Gentoo, maybe more are needed.
-        [ "$CARCH" == "x86_64" ] && patch -Np1 -i ../gpart-0.1h-ntfs.patch	
-
-	make || return 1
-	make prefix=$startdir/pkg/usr install
+  make || return 1
+  make prefix=$pkgdir/usr mandir=$pkgdir/usr/share/man install || return 1
 }

Copied: gpart/repos/extra-x86_64/gpart-0.1h-PIC.patch (from rev 34200, gpart/trunk/gpart-0.1h-PIC.patch)
===================================================================
--- extra-x86_64/gpart-0.1h-PIC.patch	                        (rev 0)
+++ extra-x86_64/gpart-0.1h-PIC.patch	2009-04-08 04:53:12 UTC (rev 34201)
@@ -0,0 +1,20 @@
+--- gpart-0.1h/src/l64seek.c
++++ gpart-0.1h/src/l64seek.c
+@@ -26,7 +26,7 @@
+ } ostck[OSTACKLEN];
+ static int		osptr = -1;
+ 
+-#if defined(__linux__) && defined(__i386__)
++#if defined(__linux__) && defined(__i386__) && ! defined(__PIC__)
+ _syscall5(int,_llseek,uint,fd,ulong,hi,ulong,lo,loff_t *,res,uint,wh)
+ #endif
+ 
+@@ -36,7 +36,7 @@
+ {
+ 	off64_t		ret = (off64_t)-1;
+ 
+-#if defined(__linux__) && defined(__i386__)
++#if defined(__linux__) && defined(__i386__) && ! defined(__PIC__)
+ 	int		iret;
+ 	unsigned long	ohi, olo;
+ 

Copied: gpart/repos/extra-x86_64/gpart-0.1h-errno.patch (from rev 34200, gpart/trunk/gpart-0.1h-errno.patch)
===================================================================
--- extra-x86_64/gpart-0.1h-errno.patch	                        (rev 0)
+++ extra-x86_64/gpart-0.1h-errno.patch	2009-04-08 04:53:12 UTC (rev 34201)
@@ -0,0 +1,20 @@
+--- gpart-0.1h/src/l64seek.c
++++ gpart-0.1h-working/src/l64seek.c
+@@ -16,6 +16,7 @@
+ 
+ #include "l64seek.h"
+ 
++#include <errno.h>
+ 
+ #define OSTACKLEN	16
+ static struct
+--- gpart-0.1h/src/disku.c
++++ gpart-0.1h-working/src/disku.c
+@@ -20,6 +20,7 @@
+ #include <string.h>
+ #include <sys/ioctl.h>
+ #include "gpart.h"
++#include <errno.h>
+ 
+ #if defined(__linux__)
+ #include <sys/mount.h>

Copied: gpart/repos/extra-x86_64/gpart-0.1h-no-_syscall.patch (from rev 34200, gpart/trunk/gpart-0.1h-no-_syscall.patch)
===================================================================
--- extra-x86_64/gpart-0.1h-no-_syscall.patch	                        (rev 0)
+++ extra-x86_64/gpart-0.1h-no-_syscall.patch	2009-04-08 04:53:12 UTC (rev 34201)
@@ -0,0 +1,15 @@
+use syscall() rather than _syscall#()
+
+http://bugs.gentoo.org/163800
+
+--- src/l64seek.c
++++ src/l64seek.c
+@@ -27,7 +27,7 @@
+ static int		osptr = -1;
+ 
+ #if defined(__linux__) && defined(__i386__) && ! defined(__PIC__)
+-_syscall5(int,_llseek,uint,fd,ulong,hi,ulong,lo,loff_t *,res,uint,wh)
++#define _llseek(fd,hi,lo,res,wh) syscall(__NR__llseek,fd,hi,lo,res,wh)
+ #endif
+ 
+ 

Copied: gpart/repos/extra-x86_64/gpart-0.1h-ntfs.patch (from rev 34200, gpart/trunk/gpart-0.1h-ntfs.patch)
===================================================================
--- extra-x86_64/gpart-0.1h-ntfs.patch	                        (rev 0)
+++ extra-x86_64/gpart-0.1h-ntfs.patch	2009-04-08 04:53:12 UTC (rev 34201)
@@ -0,0 +1,75 @@
+Ripped out of debian
+
+--- gpart-0.1h.orig/src/gm_ntfs.h
++++ gpart-0.1h/src/gm_ntfs.h
+@@ -14,6 +14,9 @@
+  *
+  */
+ 
++#include <stdint.h>
++#include <asm/byteorder.h>
++
+ #ifndef _GM_NTFS_H
+ #define _GM_NTFS_H
+ 
+@@ -29,32 +32,38 @@
+ /* 'NTFS' in little endian */
+ #define NTFS_SUPER_MAGIC	0x5346544E
+ 
+-#if defined(i386) || defined(__i386__) || defined(__alpha__)
+-
+ /* unsigned integral types */
+ #ifndef NTFS_INTEGRAL_TYPES
+ #define NTFS_INTEGRAL_TYPES
+-typedef unsigned char		ntfs_u8;
+-typedef unsigned short		ntfs_u16;
+-typedef unsigned int		ntfs_u32;
+-typedef s64_t			ntfs_u64;
++typedef uint8_t			ntfs_u8;
++typedef uint16_t		ntfs_u16;
++typedef uint32_t		ntfs_u32;
++typedef uint64_t		ntfs_u64;
++typedef int8_t			ntfs_s8;
++typedef int16_t			ntfs_s16;
+ #endif /* NTFS_INTEGRAL_TYPES */
+-#endif /* defined(i386) || defined(__i386__) || defined(__alpha__) */
+-
+-
+-/* Macros reading unsigned integers from a byte pointer */
+-/* these should work for all little endian machines */
+-#define NTFS_GETU8(p)		(*(ntfs_u8*)(p))
+-#define NTFS_GETU16(p)		(*(ntfs_u16*)(p))
+-#define NTFS_GETU24(p)		(NTFS_GETU32(p) & 0xFFFFFF)
+-#define NTFS_GETU32(p)		(*(ntfs_u32*)(p))
+-#define NTFS_GETU64(p)		(*(ntfs_u64*)(p))
+-
+-/* Macros reading signed integers, returning int */
+-#define NTFS_GETS8(p)		((int)(*(char*)(p)))
+-#define NTFS_GETS16(p)		((int)(*(short*)(p)))
+-#define NTFS_GETS24(p)		(NTFS_GETU24(p) < 0x800000 ? (int)NTFS_GETU24(p) :
+-
+ 
++#define CPU_TO_LE16(a) __cpu_to_le16(a)
++#define CPU_TO_LE32(a) __cpu_to_le32(a)
++#define CPU_TO_LE64(a) __cpu_to_le64(a)
++
++#define LE16_TO_CPU(a) __cpu_to_le16(a)
++#define LE32_TO_CPU(a) __cpu_to_le32(a)
++#define LE64_TO_CPU(a) __cpu_to_le64(a)
++
++/* Macros reading unsigned integers */
++#define NTFS_GETU8(p)      (*(ntfs_u8*)(p))
++#define NTFS_GETU16(p)     ((ntfs_u16)LE16_TO_CPU(*(ntfs_u16*)(p)))
++#define NTFS_GETU24(p)     ((ntfs_u32)NTFS_GETU16(p) | \
++		           ((ntfs_u32)NTFS_GETU8(((char*)(p)) + 2) << 16))
++#define NTFS_GETU32(p)     ((ntfs_u32)LE32_TO_CPU(*(ntfs_u32*)(p)))
++#define NTFS_GETU64(p)     ((ntfs_u64)LE64_TO_CPU(*(ntfs_u64*)(p)))
++
++/* Macros reading signed integers */
++#define NTFS_GETS8(p)        ((*(ntfs_s8*)(p)))
++#define NTFS_GETS16(p)       ((ntfs_s16)LE16_TO_CPU(*(short*)(p)))
++#define NTFS_GETS24(p)       (NTFS_GETU24(p) < 0x800000 ? \
++	                                (int)NTFS_GETU24(p) : \
++					(int)(NTFS_GETU24(p) - 0x1000000))
+ 
+ #endif /* _GM_NTFS_H */

Copied: gpart/repos/extra-x86_64/gpart-0.1h-vfat.patch (from rev 34200, gpart/trunk/gpart-0.1h-vfat.patch)
===================================================================
--- extra-x86_64/gpart-0.1h-vfat.patch	                        (rev 0)
+++ extra-x86_64/gpart-0.1h-vfat.patch	2009-04-08 04:53:12 UTC (rev 34201)
@@ -0,0 +1,17 @@
+Ripped out of debian
+
+--- gpart-0.1h.orig/src/gm_fat.h
++++ gpart-0.1h/src/gm_fat.h
+@@ -60,6 +60,10 @@
+ 	__u16	info_sector;	/* filesystem info sector */
+ 	__u16	backup_boot;	/* backup boot sector */
+ 	__u16	reserved2[6];	/* Unused */
+-};
+-
++} __attribute__ ((packed));
++/*  "__attribute__ ((packed))" 
++    added by davidc at debian.org,
++    as suggested by falk at zxmjz18.extern.uni-tuebingen.de 
++    Fri Jul 07 18:04:15 2000
++    in debian bug report #66893 "FAT detection broken on Alpha" */
+ #endif /* _GM_FAT_H */




More information about the arch-commits mailing list