[oe-commits] org.oe.dev hfsplusutils: Add package hfsplusutils, thanks to timtimred

nail commit openembedded-commits at lists.openembedded.org
Thu Mar 15 20:31:53 UTC 2007


hfsplusutils: Add package hfsplusutils, thanks to timtimred

Author: nail at nslu2-linux.org
Branch: org.openembedded.dev
Revision: b0dc2a747fc038d95cf3b5d4e1e741671ad239f6
ViewMTN: http://monotone.openembedded.org/revision.psp?id=b0dc2a747fc038d95cf3b5d4e1e741671ad239f6
Files:
1
packages/hfsplusutils
packages/hfsplusutils/hfsplusutils-1.0.4-4
packages/hfsplusutils/hfsplusutils-1.0.4-4/hfsplusutils-1.0.4-errno.patch
packages/hfsplusutils/hfsplusutils-1.0.4-4/hfsplusutils-1.0.4-gcc4.patch
packages/hfsplusutils/hfsplusutils-1.0.4-4/hfsplusutils-1.0.4-glob.patch
packages/hfsplusutils/hfsplusutils-1.0.4-4/hfsplusutils-1.0.4-string.patch
packages/hfsplusutils/hfsplusutils_1.0.4-4.bb
Diffs:

#
# mt diff -rf7c301a3ecbc0c91d157361ade8268ee0709601b -rb0dc2a747fc038d95cf3b5d4e1e741671ad239f6
#
# 
# 
# add_dir "packages/hfsplusutils"
# 
# add_dir "packages/hfsplusutils/hfsplusutils-1.0.4-4"
# 
# add_file "packages/hfsplusutils/hfsplusutils-1.0.4-4/hfsplusutils-1.0.4-errno.patch"
#  content [6d71276991eea42a2932be31181d47af1ac8cc63]
# 
# add_file "packages/hfsplusutils/hfsplusutils-1.0.4-4/hfsplusutils-1.0.4-gcc4.patch"
#  content [779734cf26a9938de9bd9aee565e9bfd44102cf4]
# 
# add_file "packages/hfsplusutils/hfsplusutils-1.0.4-4/hfsplusutils-1.0.4-glob.patch"
#  content [fa69b4e5c99c9dd0d477c2dad237adcfeb186a4f]
# 
# add_file "packages/hfsplusutils/hfsplusutils-1.0.4-4/hfsplusutils-1.0.4-string.patch"
#  content [20632763a3391d52a2288da02959c5e3bd8b4095]
# 
# add_file "packages/hfsplusutils/hfsplusutils_1.0.4-4.bb"
#  content [06e7428553f96126e75e05efd970cefdf6e3fec5]
# 
============================================================
--- packages/hfsplusutils/hfsplusutils-1.0.4-4/hfsplusutils-1.0.4-errno.patch	6d71276991eea42a2932be31181d47af1ac8cc63
+++ packages/hfsplusutils/hfsplusutils-1.0.4-4/hfsplusutils-1.0.4-errno.patch	6d71276991eea42a2932be31181d47af1ac8cc63
@@ -0,0 +1,19 @@
+diff -ruN hfsplus.orig/src/hpmkdir.c hfsplus-1.0.4/src/hpmkdir.c
+--- hfsplus.orig/src/hpmkdir.c	2003-03-30 20:09:59.000000000 +0200
++++ hfsplus-1.0.4/src/hpmkdir.c	2003-03-30 20:11:15.000000000 +0200
+@@ -46,8 +46,9 @@
+ # include <string.h>
+ # include <time.h>
+ # include <ctype.h>
+-# include <errno.h>
+ */
++# include <errno.h>
++
+ # include <stdio.h>
+ # include <stdlib.h>
+ 
+@@ -164,3 +165,4 @@
+     hfsputil_perrorp(argv0);
+     return -1;
+ }
++
============================================================
--- packages/hfsplusutils/hfsplusutils-1.0.4-4/hfsplusutils-1.0.4-gcc4.patch	779734cf26a9938de9bd9aee565e9bfd44102cf4
+++ packages/hfsplusutils/hfsplusutils-1.0.4-4/hfsplusutils-1.0.4-gcc4.patch	779734cf26a9938de9bd9aee565e9bfd44102cf4
@@ -0,0 +1,132 @@
+--- hfsplus-1.0.4/libhfsp/src/btree.c~	2002-03-05 19:50:28.000000000 +0000
++++ hfsplus-1.0.4/libhfsp/src/btree.c	2005-04-30 12:48:48.000000000 +0100
+@@ -393,7 +393,7 @@ static int btree_init(btree* bt, volume*
+ 	{
+ 	    p = volume_readfromfork(vol, nodebuf, fork, 0, bt->blkpernode,
+ 		 HFSP_EXTENT_DATA, bt->cnid);
+-	    ((char*) p) += HEADER_RESERVEDOFFSET; // skip header
++	    p += HEADER_RESERVEDOFFSET; // skip header
+ 	}
+ 	
+ 	bt->alloc_bits = malloc(alloc_size);
+--- hfsplus-1.0.4/libhfsp/src/swab.h~	2002-03-05 19:50:29.000000000 +0000
++++ hfsplus-1.0.4/libhfsp/src/swab.h	2005-04-30 12:48:05.000000000 +0100
+@@ -36,28 +36,28 @@
+ 
+ #define bswabU16(val) bswap_16(val)
+ 
+-#define bswabU16_inc(ptr) bswap_16(*((UInt16*) (ptr))++)
+-#define bswabU32_inc(ptr) bswap_32(*((UInt32*) (ptr))++)
+-#define bswabU64_inc(ptr) bswap_64(*((UInt64*) (ptr))++)
+-
+-#define bstoreU16_inc(ptr, val) (*((UInt16*) (ptr))++) = bswap_16(val)
+-#define bstoreU32_inc(ptr, val) (*((UInt32*) (ptr))++) = bswap_32(val)
+-#define bstoreU64_inc(ptr, val) (*((UInt64*) (ptr))++) = bswap_64(val)
++#define bswabU16_inc(ptr) bswap_16(*(*((UInt16**) (void *)(&ptr)))++)
++#define bswabU32_inc(ptr) bswap_32(*(*((UInt32**) (void *)(&ptr)))++)
++#define bswabU64_inc(ptr) bswap_64(*(*((UInt64**) (void *)(&ptr)))++)
++
++#define bstoreU16_inc(ptr, val) (*(*((UInt16**) (void *)(&ptr)))++) = bswap_16(val)
++#define bstoreU32_inc(ptr, val) (*(*((UInt32**) (void *)(&ptr)))++) = bswap_32(val)
++#define bstoreU64_inc(ptr, val) (*(*((UInt64**) (void *)(&ptr)))++) = bswap_64(val)
+ 
+ #else // BYTE_ORDER == BIG_ENDIAN
+ 
+ #define bswabU16(val) val
+ 
+-#define bswabU16_inc(ptr) (*((UInt16*) (ptr))++)
+-#define bswabU32_inc(ptr) (*((UInt32*) (ptr))++)
+-#define bswabU64_inc(ptr) (*((UInt64*) (ptr))++)
+-
+-#define bstoreU16_inc(ptr, val) (*((UInt16*) (ptr))++) = val
+-#define bstoreU32_inc(ptr, val) (*((UInt32*) (ptr))++) = val
+-#define bstoreU64_inc(ptr, val) (*((UInt64*) (ptr))++) = val
++#define bswabU16_inc(ptr) (*(*((UInt16**) (void *)(&ptr)))++)
++#define bswabU32_inc(ptr) (*(*((UInt32**) (void *)(&ptr)))++)
++#define bswabU64_inc(ptr) (*(*((UInt64**) (void *)(&ptr)))++)
++
++#define bstoreU16_inc(ptr, val) (*(*((UInt16**) (void *)(&ptr)))++) = val
++#define bstoreU32_inc(ptr, val) (*(*((UInt32**) (void *)(&ptr)))++) = val
++#define bstoreU64_inc(ptr, val) (*(*((UInt64**) (void *)(&ptr)))++) = val
+ 
+ #endif
+ 
+ /* for the sake of compleetness and readability */
+-#define bswabU8_inc(ptr)	(*((UInt8*) (ptr))++)
+-#define bstoreU8_inc(ptr,val)	(*((UInt8*) (ptr))++) = val
++#define bswabU8_inc(ptr)	(*(*((UInt8**) (void *)(&ptr)))++)
++#define bstoreU8_inc(ptr,val)	(*(*((UInt8**) (void *)(&ptr)))++) = val
+--- hfsplus-1.0.4/libhfsp/src/btreecheck.c~	2002-03-05 19:50:29.000000000 +0000
++++ hfsplus-1.0.4/libhfsp/src/btreecheck.c	2005-04-30 12:49:22.000000000 +0100
+@@ -264,7 +264,7 @@ static int fscheck_btree_init(btree* bt,
+ 	{
+ 	    p = volume_readfromfork(vol, nodebuf, fork, 0, bt->blkpernode,
+ 		 HFSP_EXTENT_DATA, bt->cnid);
+-	    ((char*) p) += HEADER_RESERVEDOFFSET; // skip header
++	    p += HEADER_RESERVEDOFFSET; // skip header
+ 	}
+ 	
+ 	bt->alloc_bits = malloc(alloc_size);
+--- hfsplus-1.0.4/libhfsp/src/fscheck.c~	2002-03-25 15:48:37.000000000 +0000
++++ hfsplus-1.0.4/libhfsp/src/fscheck.c	2005-04-30 12:50:26.000000000 +0100
+@@ -230,7 +230,7 @@ static int fscheck_volume_readbuf(volume
+     vh->write_count	= bswabU32_inc(p);
+     vh->encodings_bmp	= bswabU64_inc(p);
+     memcpy(vh->finder_info, p, 32); 
+-    ((char*) p) += 32; // So finderinfo must be swapped later, ***
++    p += 32; // So finderinfo must be swapped later, ***
+     p = volume_readfork(p, &vh->alloc_file );
+     p = volume_readfork(p, &vh->ext_file   );
+     p = volume_readfork(p, &vh->cat_file   );
+@@ -277,12 +277,12 @@ static int fscheck_read_wrapper(volume *
+ 	    printf("Volume is wrapped in HFS volume "
+ 		   " (use hfsck to check this)\n");
+ 
+-	((char*) p) += 0x12;		/* skip unneded HFS vol fields */
++	p += 0x12;		/* skip unneded HFS vol fields */
+ 	drAlBlkSiz = bswabU32_inc(p);	/* offset 0x14 */
+-	((char*) p) += 0x4;		/* skip unneded HFS vol fields */
++	p += 0x4;		/* skip unneded HFS vol fields */
+ 	drAlBlSt    = bswabU16_inc(p);	/* offset 0x1C */
+ 	
+-	((char*) p) += 0x5E;		/* skip unneded HFS vol fields */
++	p += 0x5E;		/* skip unneded HFS vol fields */
+ 	signature = bswabU16_inc(p);	/* offset 0x7C, drEmbedSigWord */
+ 	if (signature != HFSP_VOLHEAD_SIG)
+ 	    HFSP_ERROR(-1, "This looks like a normal HFS volume");
+--- hfsplus-1.0.4/libhfsp/src/volume.c~	2002-03-26 18:00:29.000000000 +0000
++++ hfsplus-1.0.4/libhfsp/src/volume.c	2005-04-30 12:51:41.000000000 +0100
+@@ -345,7 +345,7 @@ static int volume_readbuf(hfsp_vh* vh, v
+     vh->write_count	= bswabU32_inc(p);
+     vh->encodings_bmp	= bswabU64_inc(p);
+     memcpy(vh->finder_info, p, 32); 
+-    ((char*) p) += 32; // finderinfo is not used by now
++    p += 32; // finderinfo is not used by now
+     p = volume_readfork(p, &vh->alloc_file );
+     p = volume_readfork(p, &vh->ext_file   );
+     p = volume_readfork(p, &vh->cat_file   );
+@@ -381,7 +381,7 @@ static int volume_writebuf(hfsp_vh* vh, 
+     bstoreU32_inc(p, vh->write_count	);
+     bstoreU64_inc(p, vh->encodings_bmp	);
+     memcpy(p, vh->finder_info, 32); 
+-    ((char*) p) += 32; // finderinfo is not used by now
++    p += 32; // finderinfo is not used by now
+     p = volume_writefork(p, &vh->alloc_file );
+     p = volume_writefork(p, &vh->ext_file   );
+     p = volume_writefork(p, &vh->cat_file   );
+@@ -417,12 +417,12 @@ static int volume_read_wrapper(volume * 
+   
+ 	UInt16	embeds, embedl;		/* Start/lenght of embedded area in blocks */
+ 	
+-	((char*) p) += 0x12;		/* skip unneeded HFS vol fields */
++	p += 0x12;		/* skip unneeded HFS vol fields */
+ 	drAlBlkSiz = bswabU32_inc(p);	/* offset 0x14 */
+-	((char*) p) += 0x4;		/* skip unneeded HFS vol fields */
++	p += 0x4;		/* skip unneeded HFS vol fields */
+ 	drAlBlSt    = bswabU16_inc(p);	/* offset 0x1C */
+ 	
+-	((char*) p) += 0x5E;		/* skip unneeded HFS vol fields */
++	p += 0x5E;		/* skip unneeded HFS vol fields */
+ 	signature = bswabU16_inc(p);	/* offset 0x7C, drEmbedSigWord */
+ 	if (signature != HFSP_VOLHEAD_SIG)
+ 	    HFSP_ERROR(-1, "This looks like a normal HFS volume");
============================================================
--- packages/hfsplusutils/hfsplusutils-1.0.4-4/hfsplusutils-1.0.4-glob.patch	fa69b4e5c99c9dd0d477c2dad237adcfeb186a4f
+++ packages/hfsplusutils/hfsplusutils-1.0.4-4/hfsplusutils-1.0.4-glob.patch	fa69b4e5c99c9dd0d477c2dad237adcfeb186a4f
@@ -0,0 +1,12 @@
+--- hfsplus-1.0.4/src/glob.c.orig	2002-10-09 08:02:31.000000000 -0500
++++ hfsplus-1.0.4/src/glob.c	2002-10-09 08:02:46.000000000 -0500
+@@ -48,7 +48,7 @@
+ 
+ 	switch (*pat)
+ 	{
+-	    case NULL:	// pattern at end
++	    case '\0':	// pattern at end
+ 		return (!*str); // String at end ?
+ 
+ 	    case '*':  // match all
+
============================================================
--- packages/hfsplusutils/hfsplusutils-1.0.4-4/hfsplusutils-1.0.4-string.patch	20632763a3391d52a2288da02959c5e3bd8b4095
+++ packages/hfsplusutils/hfsplusutils-1.0.4-4/hfsplusutils-1.0.4-string.patch	20632763a3391d52a2288da02959c5e3bd8b4095
@@ -0,0 +1,11 @@
+--- hfsplus-1.0.4/libhfsp/src/unicode.c.bak	2007-01-08 17:14:44.000000000 -0500
++++ hfsplus-1.0.4/libhfsp/src/unicode.c	2007-01-08 17:14:52.000000000 -0500
+@@ -16,7 +16,7 @@
+ #include <stdlib.h>
+ #include <endian.h>
+ #include <byteswap.h>
+-#include <linux/string.h>
++#include <string.h>
+ 
+ #define __USE_GNU
+     /* need wcsrtomb */
============================================================
--- packages/hfsplusutils/hfsplusutils_1.0.4-4.bb	06e7428553f96126e75e05efd970cefdf6e3fec5
+++ packages/hfsplusutils/hfsplusutils_1.0.4-4.bb	06e7428553f96126e75e05efd970cefdf6e3fec5
@@ -0,0 +1,26 @@
+DESCRIPTION = "HFS plus file system utilities"
+SECTION = "base"
+LICENSE = "GPL"
+PR = "r1"
+
+S="${WORKDIR}/${P}"
+
+inherit kernel-arch autotools pkgconfig
+
+DEPENDS = " rpm2cpio-native"
+
+SRC_URI = "http://penguinppc.org/historical/hfsplus/hfsplusutils-1.0.4-4.src.rpm \
+	   file://hfsplusutils-1.0.4-errno.patch;patch=1 \
+	   file://hfsplusutils-1.0.4-gcc4.patch;patch=1 \
+	   file://hfsplusutils-1.0.4-glob.patch;patch=1 \
+	   file://hfsplusutils-1.0.4-string.patch;patch=1 \
+		"
+
+do_unpack() {
+        if ! test -f hfsplus.tz2 ; then
+                rpm2cpio.pl ${DL_DIR}/${P}.src.rpm | cpio -i --make-directories
+                bunzip2 hfsplus.tz2
+		tar -xf hfsplus.tz2.out
+		mv hfsplus ${P}
+        fi
+}






More information about the Openembedded-commits mailing list