hfsplus utilityies, allows readonly access to hfs(plus) paritions. ok brad@

This commit is contained in:
drahn 2002-03-30 20:46:26 +00:00
parent 189e7b813b
commit bb111997c8
10 changed files with 143 additions and 0 deletions

34
misc/hfsplus/Makefile Normal file
View File

@ -0,0 +1,34 @@
# $OpenBSD: Makefile,v 1.1.1.1 2002/03/30 20:46:26 drahn Exp $
COMMENT= "hfsplus filesystem access tool"
PKGNAME= hfsplus-1.0.2
DISTNAME= hfsplus_1.0.2.orig
WRKDIST= ${WRKDIR}/hfsplus
CATEGORIES= misc
NEED_VERSION= 1.402
PERMIT_DISTFILES_FTP= No
PERMIT_DISTFILES_CDROM= No
PERMIT_PACKAGE_FTP= No
PERMIT_PACKAGE_CDROM= No
MAINTAINER= Dale Rahn <drahn@openbsd.org>
BUILD_DEPENDS= ::devel/autoconf \
::devel/automake
LIB_DEPENDS= utf8::misc/libutf8
USE_GMAKE= Yes
HOMEPAGE= http://ftp.penguinppc.org/projects/hfsplus/
MASTER_SITES= http://ftp.penguinppc.org/projects/hfsplus/
# actually uses automake/autoheader, but that is done in pre-configure now
CONFIGURE_STYLE= gnu
MODGNU_CONFIG_GUESS_DIRS= ${WRKSRC}
pre-configure:
@cd ${WRKDIST} && ${MAKE_PROGRAM} -f Makefile.cvs all
.include <bsd.port.mk>

3
misc/hfsplus/distinfo Normal file
View File

@ -0,0 +1,3 @@
MD5 (hfsplus_1.0.2.orig.tar.gz) = 9cf99270ca891be1fd89cf8153193ad5
RMD160 (hfsplus_1.0.2.orig.tar.gz) = c635022b6c245d29ab8fbba90831c39c0248bd1e
SHA1 (hfsplus_1.0.2.orig.tar.gz) = 69c8e8642141471b5fedf15ece078367dbe603cb

View File

@ -0,0 +1,11 @@
$OpenBSD: patch-libhfsp_src_Makefile_am,v 1.1.1.1 2002/03/30 20:46:26 drahn Exp $
--- libhfsp/src/Makefile.am.orig Tue Oct 17 00:58:46 2000
+++ libhfsp/src/Makefile.am Mon Mar 25 21:12:58 2002
@@ -28,6 +28,7 @@ libhfsp_la_SOURCES = \
record.c volume.c
CFLAGS = -O2 -Wall
+INCLUDES = -I/usr/local/include
# I need to clean up this header first becore i can distribute them ...
# include_HEADERS = apple.h hfs.h hfsp.h libhfsp.h

View File

@ -0,0 +1,17 @@
$OpenBSD: patch-libhfsp_src_swab_h,v 1.1.1.1 2002/03/30 20:46:26 drahn Exp $
--- libhfsp/src/swab.h.orig Mon Mar 25 12:04:01 2002
+++ libhfsp/src/swab.h Mon Mar 25 12:03:46 2002
@@ -23,8 +23,13 @@
* $Id: patch-libhfsp_src_swab_h,v 1.1.1.1 2002/03/30 20:46:26 drahn Exp $
*/
+#if defined(__OpenBSD__)
+#include <sys/types.h>
+#include <sys/endian.h>
+#else
#include <endian.h>
#include <byteswap.h>
+#endif
/* basic fuction:
value = swab_inc(ptr);

View File

@ -0,0 +1,24 @@
$OpenBSD: patch-libhfsp_src_unicode_c,v 1.1.1.1 2002/03/30 20:46:26 drahn Exp $
--- libhfsp/src/unicode.c.orig Tue Oct 10 06:14:05 2000
+++ libhfsp/src/unicode.c Mon Mar 25 13:41:47 2002
@@ -13,6 +13,12 @@
# include "config.h"
# endif
+#if defined(__OpenBSD__)
+#include <sys/types.h>
+#include <sys/endian.h>
+#include <stddef.h>
+#include <libutf8.h>
+#else
#include <stdlib.h>
#include <endian.h>
#include <byteswap.h>
@@ -21,6 +27,7 @@
#define __USE_GNU
/* need wcsrtomb */
#include <wchar.h>
+#endif
#include "libhfsp.h"

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-src_Makefile_am,v 1.1.1.1 2002/03/30 20:46:26 drahn Exp $
--- src/Makefile.am.orig Wed Oct 25 06:40:58 2000
+++ src/Makefile.am Mon Mar 25 21:06:06 2002
@@ -27,7 +27,7 @@ hpcopy_SOURCES = hpcopy.c hpcache.c char
hpfsck_SOURCES = hpfsck.c hfsputil.c glob.c dstring.c dlist.c
-LDADD = ../libhfsp/src/libhfsp.la
+LDADD = ../libhfsp/src/libhfsp.la -L/usr/local/lib -lutf8
# dynamically linked tools dont work, yet ..
# LDADD = ../libhfsp/src/libhfsp.la

View File

@ -0,0 +1,21 @@
$OpenBSD: patch-src_hpls_c,v 1.1.1.1 2002/03/30 20:46:26 drahn Exp $
--- src/hpls.c.orig Tue Oct 10 06:14:05 2000
+++ src/hpls.c Mon Mar 25 21:44:04 2002
@@ -412,7 +412,7 @@ void showmisc(record *ent, int flags)
{
size = ent->record.u.file.data_fork.total_size +
ent->record.u.file.res_fork.total_size;
- printf("%4Lu ", size / 1024 + (size % 1024 != 0));
+ printf("%4llu ", size / 1024 + (size % 1024 != 0));
}
}
@@ -471,7 +471,7 @@ void show_long(int sz, queueent *ents, c
else
{
hfsp_cat_file* f = &ent->record.u.file;
- printf("%c%c %4.4s/%4.4s %9Lu %9Lu %s %s\n",
+ printf("%c%c %4.4s/%4.4s %9llu %9llu %s %s\n",
f->flags & HFSP_FILE_LOCKED ? 'F' : 'f',
f->user_info.fdFlags & HFS_FNDR_ISINVISIBLE ? 'i' : ' ',
(char*) &f->user_info.fdType, (char*) &f->user_info.fdCreator,

7
misc/hfsplus/pkg/DESCR Normal file
View File

@ -0,0 +1,7 @@
This package is a set of tools that allow acces to HFS+ fomatted
volumes. HFS+ is a modernized version of Apple Computers HFS
Filesystem. In addition in contains the library "libhfsp" which
you may use for your own experiments, all the tools are based
on this library. (A bit of understanding is still needed however).
WWW: ${HOMEPAGE}

View File

@ -0,0 +1,3 @@
@comment $OpenBSD: PFRAG.shared,v 1.1.1.1 2002/03/30 20:46:26 drahn Exp $
lib/libhfsp.so.0.0
DYNLIBDIR(%B)

11
misc/hfsplus/pkg/PLIST Normal file
View File

@ -0,0 +1,11 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2002/03/30 20:46:26 drahn Exp $
bin/hpcd
bin/hpcopy
bin/hpfsck
bin/hpls
bin/hpmount
bin/hppwd
bin/hpumount
lib/libhfsp.a
lib/libhfsp.la
%%SHARED%%