--- hfsplus-1.0.4.orig/debian/docs
+++ hfsplus-1.0.4/debian/docs
@@ -0,0 +1,2 @@
+NEWS
+README
--- hfsplus-1.0.4.orig/debian/libhfsp0.postinst
+++ hfsplus-1.0.4/debian/libhfsp0.postinst
@@ -0,0 +1,3 @@
+#! /bin/sh -e 
+
+#DEBHELPER#
--- hfsplus-1.0.4.orig/debian/hprm.sgml
+++ hfsplus-1.0.4/debian/hprm.sgml
@@ -0,0 +1,109 @@
+<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
+  <!ENTITY debian   "<productname>Debian GNU/Linux</productname>">
+  <!ENTITY hfsplus  "<productname>hfsplus</productname>">
+  <!ENTITY hfsutils "<productname>hfsutils</productname>">
+]>
+
+<refentry>
+  <refentryinfo>
+    <address>
+      <email>jensen@debian.org</email>
+    </address>
+    <author>
+      <firstname>Jens</firstname>
+      <surname>Schmalzing</surname>
+    </author>
+    <date>Jul 19 2002</date>
+  </refentryinfo>
+  <refmeta>
+    <refentrytitle>hprm</refentrytitle>
+    <manvolnum>1</manvolnum>
+  </refmeta>
+  <refnamediv>
+    <refname>hprm</refname>
+    <refpurpose>remove a file or directory on an HFS+ volume</refpurpose>
+  </refnamediv>
+  <refsynopsisdiv>
+    <cmdsynopsis>
+      <command>hprm</command>
+      <arg choice="opt"><option>-R</option></arg>
+      <arg choice="opt"><option>-f</option></arg>
+      <arg choice="plain"> <replaceable>hfs-path</replaceable></arg>
+    </cmdsynopsis>
+  </refsynopsisdiv>
+
+  <refsect1>
+    <title>Description</title>
+    
+    <para>
+      <command>hprm</command> removes the file or directory specified
+      by <parameter>hfs-path</parameter>.  Since write access to HFS+
+      volumes is still experimental, the program prints a warning
+      message and prompts the user before writing anything to the file
+      system.
+    </para>
+
+    <para>
+      <command>hprm</command> accepts the following options:
+    </para>
+
+    <variablelist>
+      <varlistentry>
+	<term><option>-R</option></term>
+	<listitem>
+	  <para>
+	    recursively remove the contents of a directory.
+	  </para>
+	</listitem>
+      </varlistentry>
+      <varlistentry>
+	<term><option>-f</option></term>
+	<listitem>
+	  <para>
+	    one day, this option will probably disable prompting.  For
+	    the time being, prompting is always enabled.
+	  </para>
+	</listitem>
+      </varlistentry>
+    </variablelist>
+  </refsect1>
+  
+  <refsect1>
+    <title>See also</title>
+
+    <para>
+      hfsplus(7), hpmount(1), hpls(1), hppwd(1), hpmkdir(1), hpcd(1), hpcopy(1), hpumount(1), hpfsck(1).
+    </para>
+  </refsect1>
+
+  <refsect1>
+    <title>Author</title>
+
+    <para>
+      This manual page was written by Jens Schmalzing
+      <email>&lt;jensen@debian.org&gt;</email> for &debian; using the
+      manual page by Klaus Halfmann
+      <email>&lt;halfmann@libra.de&gt;</email> that comes with the
+      source code and documentation from the <productname>Tech Info
+      Library</productname>.
+    </para>
+  </refsect1>
+
+</refentry>
+
+<!-- Keep this comment at the end of the file
+Local variables:
+mode: sgml
+sgml-omittag:t
+sgml-shorttag:t
+sgml-minimize-attributes:nil
+sgml-always-quote-attributes:t
+sgml-indent-step:2
+sgml-indent-data:t
+sgml-parent-document:nil
+sgml-default-dtd-file:nil
+sgml-exposed-tags:nil
+sgml-local-catalogs:nil
+sgml-local-ecat-files:nil
+End:
+-->
--- hfsplus-1.0.4.orig/debian/hfsplus.sgml
+++ hfsplus-1.0.4/debian/hfsplus.sgml
@@ -0,0 +1,95 @@
+<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
+  <!ENTITY debian   "<productname>Debian GNU/Linux</productname>">
+  <!ENTITY hfsplus  "<productname>hfsplus</productname>">
+  <!ENTITY hfsutils "<productname>hfsutils</productname>">
+]>
+
+<refentry>
+  <refentryinfo>
+    <address>
+      <email>jensen@debian.org</email>
+    </address>
+    <author>
+      <firstname>Jens</firstname>
+      <surname>Schmalzing</surname>
+    </author>
+    <date>Mar 13 2001</date>
+  </refentryinfo>
+  <refmeta>
+    <refentrytitle>hfsplus</refentrytitle>
+    <manvolnum>7</manvolnum>
+  </refmeta>
+  <refnamediv>
+    <refname>hfsplus</refname>
+    <refpurpose>a set of tools to access HFS+ file systems</refpurpose>
+  </refnamediv>
+
+  <refsect1>
+    <title>Description</title>
+
+    <para>
+      HFS+, also known as the Macintosh Extended Format, was
+      introduced by Apple Computer in 1998 with the release of MacOS
+      8.1.  It contains many improvements over the old HFS file
+      system, most notably the ability to allocate up to 2&caret;64
+      blocks, resulting in much more efficient storage of many small
+      files on large disks.
+    </para>
+
+    <para>
+      The &hfsplus; collection allows to access volumes formatted with
+      the HFS+ file system from &debian; and related operating
+      systems.  The collection contains tools to mount and unmount
+      HFS+ volumes, to change and list directories, and to copy
+      files to and from HFS+ volumes.
+    </para>
+
+    <para>
+      Note that unlike its cousin, the &hfsutils; collection used for
+      accessing HFS file systems, &hfsplus; does not use the Macintosh
+      pathname syntax with &quot;:&quot; as delimiter.  Instead, it
+      mimicks the unix notation, delimiting the names of volumes,
+      directories and files in a path with &quot;/&quot;, and also
+      understands &quot;.&quot; and &quot;..&quot; to some extent.
+      </para>
+
+  </refsect1>
+
+  <refsect1>
+    <title>See also</title>
+
+    <para>
+      hpmount(1), hpls(1), hpcd(1), hppwd(1), hpcopy(1), hprm(1), hpmkdir(1), hpumount(1), hpfsck(1).
+    </para>
+  </refsect1>
+
+  <refsect1>
+    <title>Author</title>
+
+    <para>
+      This manual page was written by Jens Schmalzing
+      <email>&lt;jensen@debian.org&gt;</email> for &debian; using the
+      manual page by Klaus Halfmann
+      <email>&lt;halfmann@libra.de&gt;</email> that comes with the
+      source code and documentation from the <productname>Tech Info
+      Library</productname>.
+    </para>
+  </refsect1>
+</refentry>
+
+<!-- Keep this comment at the end of the file
+Local variables:
+mode: sgml
+sgml-omittag:t
+sgml-shorttag:t
+sgml-minimize-attributes:nil
+sgml-always-quote-attributes:t
+sgml-indent-step:2
+sgml-indent-data:t
+sgml-parent-document:nil
+sgml-default-dtd-file:nil
+sgml-exposed-tags:nil
+sgml-local-catalogs:nil
+sgml-local-ecat-files:nil
+End:
+-->
--- hfsplus-1.0.4.orig/debian/hpumount.sgml
+++ hfsplus-1.0.4/debian/hpumount.sgml
@@ -0,0 +1,83 @@
+<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
+  <!ENTITY debian   "<productname>Debian GNU/Linux</productname>">
+  <!ENTITY hfsplus  "<productname>hfsplus</productname>">
+  <!ENTITY hfsutils "<productname>hfsutils</productname>">
+]>
+
+<refentry>
+  <refentryinfo>
+    <address>
+      <email>jensen@debian.org</email>
+    </address>
+    <author>
+      <firstname>Jens</firstname>
+      <surname>Schmalzing</surname>
+    </author>
+    <date>Mar 13 2001</date>
+  </refentryinfo>
+  <refmeta>
+    <refentrytitle>hpumount</refentrytitle>
+    <manvolnum>1</manvolnum>
+  </refmeta>
+  <refnamediv>
+    <refname>hpumount</refname>
+    <refpurpose>unmount an HFS+ volume</refpurpose>
+  </refnamediv>
+  <refsynopsisdiv>
+    <cmdsynopsis>
+      <command>hpumount</command>
+    </cmdsynopsis>
+  </refsynopsisdiv>
+
+  <refsect1>
+    <title>Description</title>
+    
+    <para>
+      <command>hpumount</command> is used to forget about a previously
+      mounted HFS+ volume.  However, the command does not change the
+      volume itself, it simply removes the
+      <filename>.hfsplusvolume</filename> file in the user's home
+      directory.
+    </para>
+  </refsect1>
+  
+  <refsect1>
+    <title>See also</title>
+
+    <para>
+      hfsplus(7), hpmount(1), hpls(1), hpcd(1), hppwd(1), hpcopy(1), hprm(1), hpmkdir(1), hpfsck(1).
+
+    </para>
+  </refsect1>
+
+  <refsect1>
+    <title>Author</title>
+
+    <para>
+      This manual page was written by Jens Schmalzing
+      <email>&lt;jensen@debian.org&gt;</email> for &debian; using the
+      manual page by Klaus Halfmann
+      <email>&lt;halfmann@libra.de&gt;</email> that comes with the
+      source code and documentation from the <productname>Tech Info
+      Library</productname>.
+    </para>
+  </refsect1>
+
+</refentry>
+
+<!-- Keep this comment at the end of the file
+Local variables:
+mode: sgml
+sgml-omittag:t
+sgml-shorttag:t
+sgml-minimize-attributes:nil
+sgml-always-quote-attributes:t
+sgml-indent-step:2
+sgml-indent-data:t
+sgml-parent-document:nil
+sgml-default-dtd-file:nil
+sgml-exposed-tags:nil
+sgml-local-catalogs:nil
+sgml-local-ecat-files:nil
+End:
+-->
--- hfsplus-1.0.4.orig/debian/hppwd.sgml
+++ hfsplus-1.0.4/debian/hppwd.sgml
@@ -0,0 +1,82 @@
+<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
+  <!ENTITY debian   "<productname>Debian GNU/Linux</productname>">
+  <!ENTITY hfsplus  "<productname>hfsplus</productname>">
+  <!ENTITY hfsutils "<productname>hfsutils</productname>">
+]>
+
+<refentry>
+  <refentryinfo>
+    <address>
+      <email>jensen@debian.org</email>
+    </address>
+    <author>
+      <firstname>Jens</firstname>
+      <surname>Schmalzing</surname>
+    </author>
+    <date>Mar 13 2001</date>
+  </refentryinfo>
+  <refmeta>
+    <refentrytitle>hppwd</refentrytitle>
+    <manvolnum>1</manvolnum>
+  </refmeta>
+  <refnamediv>
+    <refname>hppwd</refname>
+    <refpurpose>print the current working directory on an HFS+ volume</refpurpose>
+  </refnamediv>
+  <refsynopsisdiv>
+    <cmdsynopsis>
+      <command>hppwd</command>
+    </cmdsynopsis>
+  </refsynopsisdiv>
+
+  <refsect1>
+    <title>Description</title>
+    
+    <para>
+      <command>hppwd</command> prints the absolute pathname to the
+      current directory on the previously mounted HFS+ volume.  Note
+      that individual volume and directory names in the path are
+      separated with slashes &quot;/&quot; instead of the
+      Macintosh-style colons &quot;:&quot;.
+    </para>
+  </refsect1>
+  
+  <refsect1>
+    <title>See also</title>
+
+    <para>
+      hfsplus(7), hpmount(1), hpls(1), hpcd(1), hprm(1), hpmkdir(1), hpcopy(1), hpumount(1), hpfsck(1).
+    </para>
+  </refsect1>
+
+  <refsect1>
+    <title>Author</title>
+
+    <para>
+      This manual page was written by Jens Schmalzing
+      <email>&lt;jensen@debian.org&gt;</email> for &debian; using the
+      manual page by Klaus Halfmann
+      <email>&lt;halfmann@libra.de&gt;</email> that comes with the
+      source code and documentation from the <productname>Tech Info
+      Library</productname>.
+    </para>
+  </refsect1>
+
+</refentry>
+
+<!-- Keep this comment at the end of the file
+Local variables:
+mode: sgml
+sgml-omittag:t
+sgml-shorttag:t
+sgml-minimize-attributes:nil
+sgml-always-quote-attributes:t
+sgml-indent-step:2
+sgml-indent-data:t
+sgml-parent-document:nil
+sgml-default-dtd-file:nil
+sgml-exposed-tags:nil
+sgml-local-catalogs:nil
+sgml-local-ecat-files:nil
+End:
+-->
--- hfsplus-1.0.4.orig/debian/hpls.sgml
+++ hfsplus-1.0.4/debian/hpls.sgml
@@ -0,0 +1,345 @@
+<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
+  <!ENTITY debian   "<productname>Debian GNU/Linux</productname>">
+  <!ENTITY hfsplus  "<productname>hfsplus</productname>">
+  <!ENTITY hfsutils "<productname>hfsutils</productname>">
+]>
+
+<refentry>
+  <refentryinfo>
+    <address>
+      <email>jensen@debian.org</email>
+    </address>
+    <author>
+      <firstname>Jens</firstname>
+      <surname>Schmalzing</surname>
+    </author>
+    <date>Mar 13 2001</date>
+  </refentryinfo>
+  <refmeta>
+    <refentrytitle>hpls</refentrytitle>
+    <manvolnum>1</manvolnum>
+  </refmeta>
+  <refnamediv>
+    <refname>hpls</refname>
+    <refpurpose>list the contents of a directory on an HFS+ volume</refpurpose>
+  </refnamediv>
+  <refsynopsisdiv>
+    <cmdsynopsis>
+      <command>hpls</command>
+      <arg choice="opt"><option>options</option></arg>
+      <arg choice="opt"><replaceable>hfs-path ...</replaceable></arg>
+    </cmdsynopsis>
+  </refsynopsisdiv>
+
+  <refsect1>
+    <title>Description</title>
+    
+    <para>
+      <command>hpls</command> is used to list files and directories on
+      an HFS+ volume.  If one or more arguments are given, each file
+      or directory is shown; otherwise, the contents of the current
+      working directory are displayed.
+    </para>
+    
+  </refsect1>
+
+  <refsect1>
+    <title>Options</title>
+
+    <variablelist>
+
+      <varlistentry>
+	<term><option>-1</option></term>
+	<listitem>
+	  <para>
+	    Each entry appears on a line by itself.  This is the
+	    default if standard output is not a terminal.
+	  </para>
+	</listitem>
+      </varlistentry>
+
+      <varlistentry>
+	<term><option>-a</option></term>
+	<listitem>
+	  <para>
+	    All entries are shown, including &quot;invisible&quot;
+	    files.  The default is to omit invisible files.
+	  </para>
+	</listitem>
+      </varlistentry>
+
+<!-- Whatever this option does, it does *not* what is described here -->
+<!--        <varlistentry> -->
+<!--  	<term><option>-b</option></term> -->
+<!--  	<listitem> -->
+<!--  	  <para> -->
+<!--  	    Special  characters  are  displayed  in  an escaped -->
+<!--  	    backslash notation. Normally special or  non-print- -->
+<!--  	    able  characters  in  filenames  are  replaced by a -->
+<!--  	    question mark (?). -->
+<!--  	  </para> -->
+<!--  	</listitem> -->
+<!--        </varlistentry> -->
+
+      <varlistentry>
+	<term><option>-c</option></term>
+	<listitem>
+	  <para>
+	    Sort and display entries by their creation date, rather
+	    than their modification date.
+	  </para>
+	</listitem>
+      </varlistentry>
+
+      <varlistentry>
+	<term><option>-d</option></term>
+	<listitem>
+	  <para>
+	    List directory entries themselves rather than their
+	    contents. Normally the contents are shown for named
+	    directories on the command-line.
+	  </para>
+	</listitem>
+      </varlistentry>
+
+<!-- This option appears to do nothing -->
+<!--        <varlistentry> -->
+<!--  	<term><option>-f</option></term> -->
+<!--  	<listitem> -->
+<!--  	  <para> -->
+<!--  	    Do not sort directory contents; list them in the order -->
+<!--  	    they appear in the directory.  This option effectively -->
+<!--  	    enables <option>-a</option> and <option>-U</option> and -->
+<!--  	    disables <option>-l</option>, <option>-s</option>, and -->
+<!--  	    <option>-t</option>. -->
+<!--  	  </para> -->
+<!--  	</listitem> -->
+<!--        </varlistentry> -->
+
+      <varlistentry>
+	<term><option>-i</option></term>
+	<listitem>
+	  <para>
+	    Show the catalogue ID for each entry.  Every file and
+	    directory on an HFS+ volume has a unique catalogue ID.
+	  </para>
+	</listitem>
+      </varlistentry>
+
+      <varlistentry>
+	<term><option>-l</option></term>
+	<listitem>
+	  <para>
+	    Display entries in long format.  This format shows the
+	    entry type (&quot;d&quot; for directory, &quot;f&quot; for
+	    file, &quot;F&quot; for locked file), flags (&quot;i&quot;
+	    for invisible), type and creator (four-character strings)
+	    for files only, size (number of items in a directory or
+	    resource and data bytes of a file, respectively), date of
+	    last modification (or creation if the <option>-c</option>
+	    flag is given), and name.
+	  </para>
+	</listitem>
+      </varlistentry>
+
+      <varlistentry>
+	<term><option>-m</option></term>
+	<listitem>
+	  <para>
+	    Display entries in a continuous format separated by
+	    commas.
+	  </para>
+	</listitem>
+      </varlistentry>
+
+      <varlistentry>
+	<term><option>-q</option></term>
+	<listitem>
+	  <para>
+	    Replace special and non-printable characters in displayed
+	    filenames with question marks (?).  This is the default
+	    when standard output is a terminal.
+	  </para>
+	</listitem>
+      </varlistentry>
+
+      <varlistentry>
+	<term><option>-r</option></term>
+	<listitem>
+	  <para>
+	    Sort entries in reverse order before displaying.
+	  </para>
+	</listitem>
+      </varlistentry>
+
+      <varlistentry>
+	<term><option>-s</option></term>
+	<listitem>
+	  <para>
+	    Show the file size for each entry in 1K block units.  The
+	    size includes blocks used for both data and resource
+	    forks.
+	  </para>
+	</listitem>
+      </varlistentry>
+
+      <varlistentry>
+	<term><option>-t</option></term>
+	<listitem>
+	  <para>
+	    Sort and display entries by time.  Normally files will be
+	    sorted by name. This option uses the last modification
+	    date to sort unless <option>-c</option> is also specified.
+	  </para>
+	</listitem>
+      </varlistentry>
+
+      <varlistentry>
+	<term><option>-x</option></term>
+	<listitem>
+	  <para>
+	    Display entries in column format like <option>-C</option>,
+	    but sorted horizontally into rows rather than columns.
+	  </para>
+	</listitem>
+      </varlistentry>
+
+      <varlistentry>
+	<term><option>-w</option> <replaceable>width</replaceable></term>
+	<listitem>
+	  <para>
+	    Format output lines suitable for display in the given
+	    width.  Normally the width will be determined from your
+	    terminal, from the environment variable
+	    <envar>COLUMNS</envar>, or from a default value of 80.
+	  </para>
+	</listitem>
+      </varlistentry>
+
+      <varlistentry>
+	<term><option>-C</option></term>
+	<listitem>
+	  <para>
+	    Display entries in column format with entries sorted
+            vertically.  This is the default output format when
+            standard output is a terminal.
+	  </para>
+	</listitem>
+      </varlistentry>
+
+      <varlistentry>
+	<term><option>-F</option></term>
+	<listitem>
+	  <para>
+	     Cause certain output filenames to be followed by a
+              single-character flag indicating the nature of the
+              entry; directories are followed by a slash &quot;/&quot;
+              and executable Macintosh applications are followed by an
+              asterisk &quot;*&quot;.
+	  </para>
+	</listitem>
+      </varlistentry>
+
+      <varlistentry>
+	<term><option>-N</option></term>
+	<listitem>
+	  <para>
+	    Cause all filenames to be output verbatim without
+	    question-mark substitution.
+	  </para>
+	</listitem>
+      </varlistentry>
+
+<!-- Just like the -b option, this produces just a lot of garbage -->
+<!--        <varlistentry> -->
+<!--  	<term><option>-Q</option></term> -->
+<!--  	<listitem> -->
+<!--  	  <para> -->
+<!--  	    Cause all filenames to be enclosed within double-quotes -->
+<!--  	    (&quot;) and special/non-printable characters to be -->
+<!--  	    properly escaped. -->
+<!--  	  </para> -->
+<!--  	</listitem> -->
+<!--        </varlistentry> -->
+
+      <varlistentry>
+	<term><option>-R</option></term>
+	<listitem>
+	  <para>
+	    For each directory that is encountered in a listing,
+	    recursively descend into and display its contents.
+	  </para>
+	</listitem>
+      </varlistentry>
+
+<!-- This option apparently does not work -->
+<!--        <varlistentry> -->
+<!--  	<term><option>-S</option></term> -->
+<!--  	<listitem> -->
+<!--  	  <para> -->
+<!--  	    Sort  and  display  entries by size. For files, the -->
+<!--  	    combined resource and data lengths are used to com- -->
+<!--  	    pute a file's size. -->
+<!--  	  </para> -->
+<!--  	</listitem> -->
+<!--        </varlistentry> -->
+
+<!-- This option apparently does not work -->
+<!--        <varlistentry> -->
+<!--  	<term><option>-U</option></term> -->
+<!--  	<listitem> -->
+<!--  	  <para> -->
+<!--  	    Do not sort directory contents; list them in the order -->
+<!--  	    they appear in the directory.  On HFS+ volumes, this is -->
+<!--  	    usually an alphabetical case-insensitive ordering, -->
+<!--  	    although there are some idiosyncrasies to the Macintosh -->
+<!--  	    implementation of ordering.  This option does not affect -->
+<!--  	    <option>-a</option>, <option>-l</option>, or -->
+<!--  	    <option>-s</option>. -->
+<!--  	  </para> -->
+<!--  	</listitem> -->
+<!--        </varlistentry> -->
+
+    </variablelist>
+
+  </refsect1>
+  
+  <refsect1>
+    <title>See also</title>
+
+    <para>
+      hfsplus(7), hpmount(1), hpcd(1), hppwd(1), hprm(1), hpmkdir(1), hpcopy(1), hpumount(1), hpfsck(1).
+    </para>
+  </refsect1>
+
+  <refsect1>
+    <title>Author</title>
+
+    <para>
+      This manual page was written by Jens Schmalzing
+      <email>&lt;jensen@debian.org&gt;</email> for &debian; using the
+      manual page by Klaus Halfmann
+      <email>&lt;halfmann@libra.de&gt;</email> that comes with the
+      source code and documentation from the <productname>Tech Info
+      Library</productname>.
+    </para>
+  </refsect1>
+
+</refentry>
+
+<!-- Keep this comment at the end of the file
+Local variables:
+mode: sgml
+sgml-omittag:t
+sgml-shorttag:t
+sgml-minimize-attributes:nil
+sgml-always-quote-attributes:t
+sgml-indent-step:2
+sgml-indent-data:t
+sgml-parent-document:nil
+sgml-default-dtd-file:nil
+sgml-exposed-tags:nil
+sgml-local-catalogs:nil
+sgml-local-ecat-files:nil
+End:
+-->
--- hfsplus-1.0.4.orig/debian/hpfsck.sgml
+++ hfsplus-1.0.4/debian/hpfsck.sgml
@@ -0,0 +1,82 @@
+<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
+  <!ENTITY debian   "<productname>Debian GNU/Linux</productname>">
+  <!ENTITY hfsplus  "<productname>hfsplus</productname>">
+  <!ENTITY hfsutils "<productname>hfsutils</productname>">
+]>
+
+<refentry>
+  <refentryinfo>
+    <address>
+      <email>jensen@debian.org</email>
+    </address>
+    <author>
+      <firstname>Jens</firstname>
+      <surname>Schmalzing</surname>
+    </author>
+    <date>Mar 13 2001</date>
+  </refentryinfo>
+  <refmeta>
+    <refentrytitle>hpfsck</refentrytitle>
+    <manvolnum>1</manvolnum>
+  </refmeta>
+  <refnamediv>
+    <refname>hpfsck</refname>
+    <refpurpose>check integrity of an HFS+ volume</refpurpose>
+  </refnamediv>
+  <refsynopsisdiv>
+    <cmdsynopsis>
+      <command>hpfsck</command>
+      <arg choice="opt"><option>-v</option></arg>
+      <arg choice="plain"><replaceable>source-path</replaceable></arg>
+    </cmdsynopsis>
+  </refsynopsisdiv>
+
+  <refsect1>
+    <title>Description</title>
+    
+    <para>
+      <command>hpfsck</command> checks the integrity of an HFS+
+      volume.  With the <option>-v</option> option, the data contained
+      in the volume header is output as well.
+    </para>
+  </refsect1>
+  
+  <refsect1>
+    <title>See also</title>
+
+    <para>
+      hfsplus(7), hpmount(1), hpls(1), hpcd(1), hprm(1), hpmkdir(1), hppwd(1), hpcopy(1), hpumount(1).
+    </para>
+  </refsect1>
+
+  <refsect1>
+    <title>Author</title>
+
+    <para>
+      This manual page was written by Jens Schmalzing
+      <email>&lt;jensen@debian.org&gt;</email> for &debian; using the
+      manual page by Klaus Halfmann
+      <email>&lt;halfmann@libra.de&gt;</email> that comes with the
+      source code and documentation from the <productname>Tech Info
+      Library</productname>.
+    </para>
+  </refsect1>
+
+</refentry>
+
+<!-- Keep this comment at the end of the file
+Local variables:
+mode: sgml
+sgml-omittag:t
+sgml-shorttag:t
+sgml-minimize-attributes:nil
+sgml-always-quote-attributes:t
+sgml-indent-step:2
+sgml-indent-data:t
+sgml-parent-document:nil
+sgml-default-dtd-file:nil
+sgml-exposed-tags:nil
+sgml-local-catalogs:nil
+sgml-local-ecat-files:nil
+End:
+-->
--- hfsplus-1.0.4.orig/debian/hpcopy.sgml
+++ hfsplus-1.0.4/debian/hpcopy.sgml
@@ -0,0 +1,153 @@
+<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
+  <!ENTITY debian   "<productname>Debian GNU/Linux</productname>">
+  <!ENTITY hfsplus  "<productname>hfsplus</productname>">
+  <!ENTITY hfsutils "<productname>hfsutils</productname>">
+]>
+
+<refentry>
+  <refentryinfo>
+    <address>
+      <email>jensen@debian.org</email>
+    </address>
+    <author>
+      <firstname>Jens</firstname>
+      <surname>Schmalzing</surname>
+    </author>
+    <date>Mar 13 2001</date>
+  </refentryinfo>
+  <refmeta>
+    <refentrytitle>hpcopy</refentrytitle>
+    <manvolnum>1</manvolnum>
+  </refmeta>
+  <refnamediv>
+    <refname>hpcopy</refname>
+    <refpurpose>copy files from an HFS+ volume</refpurpose>
+  </refnamediv>
+  <refsynopsisdiv>
+    <cmdsynopsis>
+      <command>hpcopy</command>
+      <group>
+	<arg choice="opt"><option>-m</option></arg>
+	<arg choice="opt"><option>-b</option></arg>
+	<arg choice="opt"><option>-t</option></arg>
+	<arg choice="opt"><option>-r</option></arg>
+	<arg choice="opt"><option>-a</option></arg>
+      </group>
+      <arg choice="plain" rep="repeat"><replaceable>source-path</replaceable></arg>
+      <arg choice="plain"><replaceable>target-path</replaceable></arg>
+    </cmdsynopsis>
+  </refsynopsisdiv>
+
+  <refsect1>
+    <title>Description</title>
+    
+    <para>
+      <command>hpcopy</command> copies files and directories from an
+      HFS+ volume.  If multiple files are to be copied, the target
+      path must be a directory.
+    </para>
+
+    <para>
+      Since Macintosh files contain two forks, which are not
+      representably in Unix file systems, copies use one of several
+      translation modes:
+    </para>
+
+    <variablelist>
+      <varlistentry>
+	<term><option>-m</option></term>
+	<listitem>
+	  <para>
+	    <productname>Mac Binary II</productname> is a format for
+	    binary file transfer.  Both forks of the Macintosh file
+	    are preserved.  This is the recommended mode for
+	    transferring arbitrary Macintosh files.
+	  </para>
+	</listitem>
+      </varlistentry>
+      <varlistentry>
+	<term><option>-b</option></term>
+	<listitem>
+	  <para>
+	    <productname>BinHex</productname> also preserves both
+	    forks of the Macintosh file.  In addition, the encoded
+	    file contains only ASCII characters, making it suitable
+	    for electronic mail transmission.
+	  </para>
+	</listitem>
+      </varlistentry>
+      <varlistentry>
+	<term><option>-t</option></term>
+	<listitem>
+	  <para>
+	    <productname>Text</productname> copies only the data fork
+	    of the Macintosh file, while the contents of the resource
+	    fork are lost.  In addition, this mode translates
+	    end-of-line characters.  This translation should be used
+	    for text files.
+	  </para>
+	</listitem>
+      </varlistentry>
+      <varlistentry>
+	<term><option>-r</option></term>
+	<listitem>
+	  <para>
+	    <productname>Raw Data</productname> copies only the data
+	    fork of the Macintosh file, while the contents of the
+	    resource fork are lost.
+	  </para>
+	</listitem>
+      </varlistentry>
+      <varlistentry>
+	<term><option>-a</option></term>
+	<listitem>
+	  <para>
+	    <productname>Automatic</productname> mode applies a set of
+	    predefined heuristics to determine the appropriate
+	    translation.  This is the default if no mode is specified.
+	  </para>
+	</listitem>
+      </varlistentry>
+    </variablelist>
+
+  </refsect1>
+  
+  <refsect1>
+    <title>See also</title>
+
+    <para>
+      hfsplus(7), hpmount(1), hpls(1), hpcd(1), hprm(1), hpmkdir(1), hppwd(1), hpumount(1), hpfsck(1).
+    </para>
+  </refsect1>
+
+  <refsect1>
+    <title>Author</title>
+
+    <para>
+      This manual page was written by Jens Schmalzing
+      <email>&lt;jensen@debian.org&gt;</email> for &debian; using the
+      manual page by Klaus Halfmann
+      <email>&lt;halfmann@libra.de&gt;</email> that comes with the
+      source code and documentation from the <productname>Tech Info
+      Library</productname>.
+    </para>
+  </refsect1>
+
+</refentry>
+
+<!-- Keep this comment at the end of the file
+Local variables:
+mode: sgml
+sgml-omittag:t
+sgml-shorttag:t
+sgml-minimize-attributes:nil
+sgml-always-quote-attributes:t
+sgml-indent-step:2
+sgml-indent-data:t
+sgml-parent-document:nil
+sgml-default-dtd-file:nil
+sgml-exposed-tags:nil
+sgml-local-catalogs:nil
+sgml-local-ecat-files:nil
+End:
+-->
--- hfsplus-1.0.4.orig/debian/hpcd.sgml
+++ hfsplus-1.0.4/debian/hpcd.sgml
@@ -0,0 +1,81 @@
+<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
+  <!ENTITY debian   "<productname>Debian GNU/Linux</productname>">
+  <!ENTITY hfsplus  "<productname>hfsplus</productname>">
+  <!ENTITY hfsutils "<productname>hfsutils</productname>">
+]>
+
+<refentry>
+  <refentryinfo>
+    <address>
+      <email>jensen@debian.org</email>
+    </address>
+    <author>
+      <firstname>Jens</firstname>
+      <surname>Schmalzing</surname>
+    </author>
+    <date>Mar 13 2001</date>
+  </refentryinfo>
+  <refmeta>
+    <refentrytitle>hpcd</refentrytitle>
+    <manvolnum>1</manvolnum>
+  </refmeta>
+  <refnamediv>
+    <refname>hpcd</refname>
+    <refpurpose>change directory on an HFS+ volume</refpurpose>
+  </refnamediv>
+  <refsynopsisdiv>
+    <cmdsynopsis>
+      <command>hpcd</command>
+      <arg choice="plain"> <replaceable>hfs-path</replaceable></arg>
+    </cmdsynopsis>
+  </refsynopsisdiv>
+
+  <refsect1>
+    <title>Description</title>
+    
+    <para>
+      <command>hpcd</command> changes the current working directory on
+      the previously mounted HFS+ volume.  Subsequent commands will
+      interpret filenames relative to this directory.
+    </para>
+  </refsect1>
+  
+  <refsect1>
+    <title>See also</title>
+
+    <para>
+      hfsplus(7), hpmount(1), hpls(1), hppwd(1), hprm(1), hpmkdir(1), hpcopy(1), hpumount(1), hpfsck(1).
+    </para>
+  </refsect1>
+
+  <refsect1>
+    <title>Author</title>
+
+    <para>
+      This manual page was written by Jens Schmalzing
+      <email>&lt;jensen@debian.org&gt;</email> for &debian; using the
+      manual page by Klaus Halfmann
+      <email>&lt;halfmann@libra.de&gt;</email> that comes with the
+      source code and documentation from the <productname>Tech Info
+      Library</productname>.
+    </para>
+  </refsect1>
+
+</refentry>
+
+<!-- Keep this comment at the end of the file
+Local variables:
+mode: sgml
+sgml-omittag:t
+sgml-shorttag:t
+sgml-minimize-attributes:nil
+sgml-always-quote-attributes:t
+sgml-indent-step:2
+sgml-indent-data:t
+sgml-parent-document:nil
+sgml-default-dtd-file:nil
+sgml-exposed-tags:nil
+sgml-local-catalogs:nil
+sgml-local-ecat-files:nil
+End:
+-->
--- hfsplus-1.0.4.orig/debian/hpmkdir.sgml
+++ hfsplus-1.0.4/debian/hpmkdir.sgml
@@ -0,0 +1,83 @@
+<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
+  <!ENTITY debian   "<productname>Debian GNU/Linux</productname>">
+  <!ENTITY hfsplus  "<productname>hfsplus</productname>">
+  <!ENTITY hfsutils "<productname>hfsutils</productname>">
+]>
+
+<refentry>
+  <refentryinfo>
+    <address>
+      <email>jensen@debian.org</email>
+    </address>
+    <author>
+      <firstname>Jens</firstname>
+      <surname>Schmalzing</surname>
+    </author>
+    <date>Jul 19 2002</date>
+  </refentryinfo>
+  <refmeta>
+    <refentrytitle>hpmkdir</refentrytitle>
+    <manvolnum>1</manvolnum>
+  </refmeta>
+  <refnamediv>
+    <refname>hpmkdir</refname>
+    <refpurpose>create a directory on an HFS+ volume</refpurpose>
+  </refnamediv>
+  <refsynopsisdiv>
+    <cmdsynopsis>
+      <command>hpmkdir</command>
+      <arg choice="plain"> <replaceable>hfs-path</replaceable></arg>
+    </cmdsynopsis>
+  </refsynopsisdiv>
+
+  <refsect1>
+    <title>Description</title>
+    
+    <para>
+      <command>hpmkdir</command> creates a new directory under the
+      current working directory on the previously mounted HFS+ volume.
+      Since write access to HFS+ volumes is still experimental, the
+      program prints a warning message and prompts the user before
+      writing anything to the file system.
+    </para>
+  </refsect1>
+  
+  <refsect1>
+    <title>See also</title>
+
+    <para>
+      hfsplus(7), hpmount(1), hpls(1), hppwd(1), hprm(1), hpcd(1), hpcopy(1), hpumount(1), hpfsck(1).
+    </para>
+  </refsect1>
+
+  <refsect1>
+    <title>Author</title>
+
+    <para>
+      This manual page was written by Jens Schmalzing
+      <email>&lt;jensen@debian.org&gt;</email> for &debian; using the
+      manual page by Klaus Halfmann
+      <email>&lt;halfmann@libra.de&gt;</email> that comes with the
+      source code and documentation from the <productname>Tech Info
+      Library</productname>.
+    </para>
+  </refsect1>
+
+</refentry>
+
+<!-- Keep this comment at the end of the file
+Local variables:
+mode: sgml
+sgml-omittag:t
+sgml-shorttag:t
+sgml-minimize-attributes:nil
+sgml-always-quote-attributes:t
+sgml-indent-step:2
+sgml-indent-data:t
+sgml-parent-document:nil
+sgml-default-dtd-file:nil
+sgml-exposed-tags:nil
+sgml-local-catalogs:nil
+sgml-local-ecat-files:nil
+End:
+-->
--- hfsplus-1.0.4.orig/debian/hpmount.sgml
+++ hfsplus-1.0.4/debian/hpmount.sgml
@@ -0,0 +1,114 @@
+<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
+  <!ENTITY debian   "<productname>Debian GNU/Linux</productname>">
+  <!ENTITY hfsplus  "<productname>hfsplus</productname>">
+  <!ENTITY hfsutils "<productname>hfsutils</productname>">
+]>
+
+<refentry>
+  <refentryinfo>
+    <address>
+      <email>jensen@debian.org</email>
+    </address>
+    <author>
+      <firstname>Jens</firstname>
+      <surname>Schmalzing</surname>
+    </author>
+    <date>Mar 13 2001</date>
+  </refentryinfo>
+  <refmeta>
+    <refentrytitle>hpmount</refentrytitle>
+    <manvolnum>1</manvolnum>
+  </refmeta>
+  <refnamediv>
+    <refname>hpmount</refname>
+    <refpurpose>change directory on an HFS+ volume</refpurpose>
+  </refnamediv>
+  <refsynopsisdiv>
+    <cmdsynopsis>
+      <command>hpmount</command>
+      <arg choice="opt"><option>-r</option></arg>
+      <arg choice="opt"><option>-p</option><replaceable>n</replaceable></arg>
+      <arg choice="plain"> <replaceable>source-path</replaceable></arg>
+    </cmdsynopsis>
+  </refsynopsisdiv>
+
+  <refsect1>
+    <title>Description</title>
+    
+    <para>
+      <command>hpmount</command> introduces a new HFS+ volume.  The
+      source path may specify a block device or a regular file
+      containing an HFS+ volume image.  Furthermore,
+      <command>hpmount</command> creates the file
+      <filename>.hfsplusvolume</filename> in the user's home
+      directory, where the source path and the catalogue ID of the
+      current working directory are stored.
+    </para>
+
+    <para>
+      <command>hpmount</command> accepts the following options:
+    </para>
+
+   <variablelist>
+      <varlistentry>
+	<term><option>-r</option></term>
+	<listitem>
+	  <para>
+	    mount the volume read-only.  The default is to allow
+	    write-access.
+	  </para>
+	</listitem>
+      </varlistentry>
+      <varlistentry>
+	<term><option>-p</option><replaceable>n</replaceable></term>
+	<listitem>
+	  <para>
+	    mount partition number <parameter>n</parameter>.  The
+	    default is to mount the first partition that looks like it
+	    contains an HFS+ volume.
+	  </para>
+	</listitem>
+      </varlistentry>
+    </variablelist>
+
+  </refsect1>
+  
+  <refsect1>
+    <title>See also</title>
+
+    <para>
+      hfsplus(7), hpls(1), hpcd(1), hppwd(1), hpcopy(1), hprm(1), hpmkdir(1), hpumount(1), hpfsck(1).
+    </para>
+  </refsect1>
+
+  <refsect1>
+    <title>Author</title>
+
+    <para>
+      This manual page was written by Jens Schmalzing
+      <email>&lt;jensen@debian.org&gt;</email> for &debian; using the
+      manual page by Klaus Halfmann
+      <email>&lt;halfmann@libra.de&gt;</email> that comes with the
+      source code and documentation from the <productname>Tech Info
+      Library</productname>.
+    </para>
+  </refsect1>
+
+</refentry>
+
+<!-- Keep this comment at the end of the file
+Local variables:
+mode: sgml
+sgml-omittag:t
+sgml-shorttag:t
+sgml-minimize-attributes:nil
+sgml-always-quote-attributes:t
+sgml-indent-step:2
+sgml-indent-data:t
+sgml-parent-document:nil
+sgml-default-dtd-file:nil
+sgml-exposed-tags:nil
+sgml-local-catalogs:nil
+sgml-local-ecat-files:nil
+End:
+-->
--- hfsplus-1.0.4.orig/debian/hfsplus.dirs
+++ hfsplus-1.0.4/debian/hfsplus.dirs
@@ -0,0 +1,2 @@
+usr/bin
+usr/share/linda/overrides
--- hfsplus-1.0.4.orig/debian/hfsplus.manpages
+++ hfsplus-1.0.4/debian/hfsplus.manpages
@@ -0,0 +1,10 @@
+debian/hfsplus.7
+debian/hpcd.1
+debian/hpcopy.1
+debian/hpfsck.1
+debian/hpls.1
+debian/hpmkdir.1
+debian/hpmount.1
+debian/hppwd.1
+debian/hprm.1
+debian/hpumount.1
--- hfsplus-1.0.4.orig/debian/libhfsp0.dirs
+++ hfsplus-1.0.4/debian/libhfsp0.dirs
@@ -0,0 +1 @@
+usr/lib
--- hfsplus-1.0.4.orig/debian/libhfsp-dev.dirs
+++ hfsplus-1.0.4/debian/libhfsp-dev.dirs
@@ -0,0 +1,2 @@
+usr/include/hfsplus
+usr/lib
--- hfsplus-1.0.4.orig/debian/compat
+++ hfsplus-1.0.4/debian/compat
@@ -0,0 +1 @@
+4
--- hfsplus-1.0.4.orig/debian/copyright
+++ hfsplus-1.0.4/debian/copyright
@@ -0,0 +1,11 @@
+This package was debianized by Jens Schmalzing <jensen@debian.org> on
+Sun, 11 Mar 2001 22:02:06 +0100.
+
+Upstream URL: http://www.penguinppc.org/historical/hfsplus/hfsplus_1.0.4.src.tar.bz2
+
+Upstream Author: Klaus Halfmann <khalfmann@libra.de>
+
+Copyright:
+
+hfsplus is covered under the terms of the GPL.  See the file
+/usr/share/common-licenses/GPL for more information.
--- hfsplus-1.0.4.orig/debian/watch
+++ hfsplus-1.0.4/debian/watch
@@ -0,0 +1,2 @@
+version=3
+http://www.penguinppc.org/historical/hfsplus/hfsplus_(.*)\.src\.tar\.bz2
--- hfsplus-1.0.4.orig/debian/patches/99_types.dpatch
+++ hfsplus-1.0.4/debian/patches/99_types.dpatch
@@ -0,0 +1,51 @@
+#! /bin/sh -e
+## 99_types.dpatch by Aurélien GÉRÔME <ag@roxor.cx>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Use types in asm/types.h instead of compiler defaults.
+
+if [ $# -ne 1 ]; then
+    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+    exit 1
+fi
+case "$1" in
+    -patch) patch -f --no-backup-if-mismatch -p1 < $0;;
+    -unpatch) patch -f --no-backup-if-mismatch -R -p1 < $0;;
+    *)
+        echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+        exit 1;;
+esac
+
+exit 0
+
+diff -x debian -ruN old/hfsplus-1.0.4/libhfsp/src/apple.h hfsplus-1.0.4/libhfsp/src/apple.h
+--- old/hfsplus-1.0.4/libhfsp/src/apple.h	2002-03-10 20:58:09.000000000 +0000
++++ hfsplus-1.0.4/libhfsp/src/apple.h	2006-09-13 20:52:15.000000000 +0000
+@@ -27,16 +27,17 @@
+ 
+ #define APPLE_H
+ 
+-typedef signed char	    Char;
+-typedef unsigned char	    UChar;
+-typedef signed char	    SInt8;
+-typedef unsigned char	    UInt8;
+-typedef signed short	    SInt16;
+-typedef unsigned short	    UInt16;
+-typedef signed long	    SInt32;
+-typedef unsigned long	    UInt32;
+-typedef unsigned long	    OSType;
+-typedef unsigned long long  UInt64;
++#include <asm/types.h>
++typedef __s8    Char;
++typedef __u8    UChar;
++typedef __s8    SInt8;
++typedef __u8    UInt8;
++typedef __s16   SInt16;
++typedef __u16   UInt16;
++typedef __s32   SInt32;
++typedef __u32   UInt32;
++typedef __u32   OSType;
++typedef __u64   UInt64;
+ 
+ #define PARTITION_SIG	    0x504d   /* 'PM' */
+ 
--- hfsplus-1.0.4.orig/debian/patches/147838_sigbus_sparc.dpatch
+++ hfsplus-1.0.4/debian/patches/147838_sigbus_sparc.dpatch
@@ -0,0 +1,49 @@
+#! /bin/sh -e
+## 147838_sigbus_sparc.dpatch by Steve Langasek <vorlon@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Fix SIGBUS on sparc.
+
+if [ $# -ne 1 ]; then
+    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+    exit 1
+fi
+case "$1" in
+    -patch) patch -f --no-backup-if-mismatch -p1 < $0;;
+    -unpatch) patch -f --no-backup-if-mismatch -R -p1 < $0;;
+    *)
+        echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+        exit 1;;
+esac
+
+exit 0
+
+diff -x debian -ruN old/hfsplus-1.0.4/libhfsp/src/swab.h hfsplus-1.0.4/libhfsp/src/swab.h
+--- old/hfsplus-1.0.4/libhfsp/src/swab.h	2002-03-05 19:50:29.000000000 +0000
++++ hfsplus-1.0.4/libhfsp/src/swab.h	2006-09-13 20:52:15.000000000 +0000
+@@ -49,8 +49,25 @@
+ #define bswabU16(val) val
+ 
+ #define bswabU16_inc(ptr) (*((UInt16*) (ptr))++)
++/* Only available as a GCC extension, but required on sparc due to
++   alignment issues in some of the on-disk structs */
++#if defined(__GNUC__) && defined(__sparc__)
++#define bswabU32_inc(ptr) ({			\
++	unsigned char *c = (char*)ptr;		\
++	((UInt32 *)ptr)++;			\
++	((c[0] << 24)+(c[1] << 16)+(c[2] << 8)+c[3]);})
++#define bswabU64_inc(ptr) ({			\
++	unsigned char *c = (char*)ptr;		\
++	UInt64 val = 0;				\
++	int i = 0;				\
++	((UInt64 *)ptr)++;			\
++	while (i < 8)				\
++		val += (c[i] << (8*(7-i++)));	\
++	val;})
++#else
+ #define bswabU32_inc(ptr) (*((UInt32*) (ptr))++)
+ #define bswabU64_inc(ptr) (*((UInt64*) (ptr))++)
++#endif
+ 
+ #define bstoreU16_inc(ptr, val) (*((UInt16*) (ptr))++) = val
+ #define bstoreU32_inc(ptr, val) (*((UInt32*) (ptr))++) = val
--- hfsplus-1.0.4.orig/debian/patches/120137_ftbfs_hppa_gcc3.0.dpatch
+++ hfsplus-1.0.4/debian/patches/120137_ftbfs_hppa_gcc3.0.dpatch
@@ -0,0 +1,32 @@
+#! /bin/sh -e
+## 120137_ftbfs_hppa_gcc3.0.dpatch by James Troup <troup@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Fix FTBFS on hppa with gcc-3.0.
+
+if [ $# -ne 1 ]; then
+    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+    exit 1
+fi
+case "$1" in
+    -patch) patch -f --no-backup-if-mismatch -p1 < $0;;
+    -unpatch) patch -f --no-backup-if-mismatch -R -p1 < $0;;
+    *)
+        echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+        exit 1;;
+esac
+
+exit 0
+
+diff -x debian -ruN old/hfsplus-1.0.4/src/glob.c hfsplus-1.0.4/src/glob.c
+--- old/hfsplus-1.0.4/src/glob.c	2002-03-05 19:50:29.000000000 +0000
++++ hfsplus-1.0.4/src/glob.c	2006-09-13 20:52:15.000000000 +0000
+@@ -48,7 +48,7 @@
+ 
+ 	switch (*pat)
+ 	{
+-	    case NULL:	// pattern at end
++	    case 0:	// pattern at end
+ 		return (!*str); // String at end ?
+ 
+ 	    case '*':  // match all
--- hfsplus-1.0.4.orig/debian/patches/231270_hpmount_destroys_hfs_volume_headers.dpatch
+++ hfsplus-1.0.4/debian/patches/231270_hpmount_destroys_hfs_volume_headers.dpatch
@@ -0,0 +1,35 @@
+#! /bin/sh -e
+## 231270_hpmount_destroys_hfs_volume_headers.dpatch by Frank Lichtenheld <djpig@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Avoid HFS volume headers destruction.
+
+if [ $# -ne 1 ]; then
+    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+    exit 1
+fi
+case "$1" in
+    -patch) patch -f --no-backup-if-mismatch -p1 < $0;;
+    -unpatch) patch -f --no-backup-if-mismatch -R -p1 < $0;;
+    *)
+        echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+        exit 1;;
+esac
+
+exit 0
+
+diff -x debian -ruN old/hfsplus-1.0.4/libhfsp/src/volume.c hfsplus-1.0.4/libhfsp/src/volume.c
+--- old/hfsplus-1.0.4/libhfsp/src/volume.c	2002-03-26 18:00:29.000000000 +0000
++++ hfsplus-1.0.4/libhfsp/src/volume.c	2006-09-13 20:52:15.000000000 +0000
+@@ -508,8 +509,10 @@
+ 
+     vol->flags |= rw & HFSP_MODE_RDWR;
+ 
+-    if (volume_read_wrapper(vol, &vol->vol))
++    if (volume_read_wrapper(vol, &vol->vol)) {
++	vol->flags ^= HFSP_MODE_RDWR;
+ 	return -1;
++    }
+ 
+     if (volume_read(vol, &backup, vol->maxblocks - 2))
+ 	return -1;
--- hfsplus-1.0.4.orig/debian/patches/277810_ftbfs_include_gcc3.4.dpatch
+++ hfsplus-1.0.4/debian/patches/277810_ftbfs_include_gcc3.4.dpatch
@@ -0,0 +1,32 @@
+#! /bin/sh -e
+## 277810_ftbfs_include_gcc3.4.dpatch by Andreas Jochens <aj@andaco.de>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Fix FTBFS with gcc-3.4 due to a missing include.
+
+if [ $# -ne 1 ]; then
+    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+    exit 1
+fi
+case "$1" in
+    -patch) patch -f --no-backup-if-mismatch -p1 < $0;;
+    -unpatch) patch -f --no-backup-if-mismatch -R -p1 < $0;;
+    *)
+        echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+        exit 1;;
+esac
+
+exit 0
+
+diff -x debian -ruN old/hfsplus-1.0.4/libhfsp/src/libhfsp.h hfsplus-1.0.4/libhfsp/src/libhfsp.h
+--- old/hfsplus-1.0.4/libhfsp/src/libhfsp.h	2002-03-25 15:48:37.000000000 +0000
++++ hfsplus-1.0.4/libhfsp/src/libhfsp.h	2006-09-13 20:52:15.000000000 +0000
+@@ -31,7 +31,7 @@
+ # include "hfs.h"
+ # include "hfsp.h"
+ 
+-extern int errno;
++#include <errno.h>
+ /* Last error is eventually found here */
+ extern const char *hfsp_error; 
+ 
--- hfsplus-1.0.4.orig/debian/patches/286366_ftbfs_amd64_gcc4.0.dpatch
+++ hfsplus-1.0.4/debian/patches/286366_ftbfs_amd64_gcc4.0.dpatch
@@ -0,0 +1,171 @@
+#! /bin/sh -e
+## 286366_ftbfs_amd64_gcc4.0.dpatch by Andreas Jochens <aj@andaco.de>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Fix FTBFS on amd64 with gcc-4.0.
+
+if [ $# -ne 1 ]; then
+    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+    exit 1
+fi
+case "$1" in
+    -patch) patch -f --no-backup-if-mismatch -p1 < $0;;
+    -unpatch) patch -f --no-backup-if-mismatch -R -p1 < $0;;
+    *)
+        echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+        exit 1;;
+esac
+
+exit 0
+
+diff -x debian -ruN old/hfsplus-1.0.4/libhfsp/src/btree.c hfsplus-1.0.4/libhfsp/src/btree.c
+--- old/hfsplus-1.0.4/libhfsp/src/btree.c	2002-03-05 19:50:28.000000000 +0000
++++ hfsplus-1.0.4/libhfsp/src/btree.c	2006-09-13 20:52:15.000000000 +0000
+@@ -393,7 +395,7 @@
+ 	{
+ 	    p = volume_readfromfork(vol, nodebuf, fork, 0, bt->blkpernode,
+ 		 HFSP_EXTENT_DATA, bt->cnid);
+-	    ((char*) p) += HEADER_RESERVEDOFFSET; // skip header
++	    p = ((char*) p) + HEADER_RESERVEDOFFSET; // skip header
+ 	}
+ 	
+ 	bt->alloc_bits = malloc(alloc_size);
+diff -x debian -ruN old/hfsplus-1.0.4/libhfsp/src/btreecheck.c hfsplus-1.0.4/libhfsp/src/btreecheck.c
+--- old/hfsplus-1.0.4/libhfsp/src/btreecheck.c	2002-03-05 19:50:29.000000000 +0000
++++ hfsplus-1.0.4/libhfsp/src/btreecheck.c	2006-09-13 20:52:15.000000000 +0000
+@@ -264,7 +264,7 @@
+ 	{
+ 	    p = volume_readfromfork(vol, nodebuf, fork, 0, bt->blkpernode,
+ 		 HFSP_EXTENT_DATA, bt->cnid);
+-	    ((char*) p) += HEADER_RESERVEDOFFSET; // skip header
++	    p = ((char*) p) + HEADER_RESERVEDOFFSET; // skip header
+ 	}
+ 	
+ 	bt->alloc_bits = malloc(alloc_size);
+diff -x debian -ruN old/hfsplus-1.0.4/libhfsp/src/fscheck.c hfsplus-1.0.4/libhfsp/src/fscheck.c
+--- old/hfsplus-1.0.4/libhfsp/src/fscheck.c	2002-03-25 15:48:37.000000000 +0000
++++ hfsplus-1.0.4/libhfsp/src/fscheck.c	2006-09-13 20:52:15.000000000 +0000
+@@ -204,7 +204,8 @@
+  */
+ static int fscheck_volume_readbuf(volume * vol, hfsp_vh* vh, void* p)
+ {
+-    if ( (vh->signature	= bswabU16_inc(p)) != HFSP_VOLHEAD_SIG) 
++    vh->signature	= bswabU16_inc(p);
++    if (vh->signature != HFSP_VOLHEAD_SIG) 
+     {
+ 	printf("Unexpected Volume signature '%2s' expected 'H+'\n",
+ 		(char*) &vh->signature);
+@@ -230,7 +231,7 @@
+     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 = ((char*) 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 +278,12 @@
+ 	    printf("Volume is wrapped in HFS volume "
+ 		   " (use hfsck to check this)\n");
+ 
+-	((char*) p) += 0x12;		/* skip unneded HFS vol fields */
++	p = ((char*) p) + 0x12;		/* skip unneded HFS vol fields */
+ 	drAlBlkSiz = bswabU32_inc(p);	/* offset 0x14 */
+-	((char*) p) += 0x4;		/* skip unneded HFS vol fields */
++	p = ((char*) p) + 0x4;		/* skip unneded HFS vol fields */
+ 	drAlBlSt    = bswabU16_inc(p);	/* offset 0x1C */
+ 	
+-	((char*) p) += 0x5E;		/* skip unneded HFS vol fields */
++	p = ((char*) 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");
+diff -x debian -ruN old/hfsplus-1.0.4/libhfsp/src/swab.h hfsplus-1.0.4/libhfsp/src/swab.h
+--- old/hfsplus-1.0.4/libhfsp/src/swab.h	2002-03-05 19:50:29.000000000 +0000
++++ hfsplus-1.0.4/libhfsp/src/swab.h	2006-09-13 20:52:15.000000000 +0000
+@@ -36,13 +36,13 @@
+ 
+ #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*) (ptr))); ptr = (UInt16*)ptr + 1
++#define bswabU32_inc(ptr) bswap_32(*((UInt32*) (ptr))); ptr = (UInt32*)ptr + 1
++#define bswabU64_inc(ptr) bswap_64(*((UInt64*) (ptr))); ptr = (UInt64*)ptr + 1
++
++#define bstoreU16_inc(ptr, val) *((UInt16*) (ptr)) = bswap_16(val); ptr = (UInt16*)ptr + 1
++#define bstoreU32_inc(ptr, val) *((UInt32*) (ptr)) = bswap_32(val); ptr = (UInt32*)ptr + 1;
++#define bstoreU64_inc(ptr, val) *((UInt64*) (ptr)) = bswap_64(val); ptr = (UInt32*)ptr + 1;
+ 
+ #else // BYTE_ORDER == BIG_ENDIAN
+ 
+@@ -69,12 +69,12 @@
+ #define bswabU64_inc(ptr) (*((UInt64*) (ptr))++)
+ #endif
+ 
+-#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 bstoreU16_inc(ptr, val) *((UInt16*) (ptr)) = val; ptr = (UInt16*)ptr + 1
++#define bstoreU32_inc(ptr, val) *((UInt32*) (ptr)) = val; ptr = (UInt32*)ptr + 1
++#define bstoreU64_inc(ptr, val) *((UInt64*) (ptr)) = val; ptr = (UInt64*)ptr + 1
+ 
+ #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*) (ptr)); ptr = (UInt8*)ptr + 1
++#define bstoreU8_inc(ptr,val)	*((UInt8*) (ptr)) = val; ptr = (UInt8*)ptr + 1
+diff -x debian -ruN old/hfsplus-1.0.4/libhfsp/src/volume.c hfsplus-1.0.4/libhfsp/src/volume.c
+--- old/hfsplus-1.0.4/libhfsp/src/volume.c	2002-03-26 18:00:29.000000000 +0000
++++ hfsplus-1.0.4/libhfsp/src/volume.c	2006-09-13 20:52:15.000000000 +0000
+@@ -323,7 +323,8 @@
+  */
+ static int volume_readbuf(hfsp_vh* vh, void* p)
+ {
+-    if ( (vh->signature	= bswabU16_inc(p)) != HFSP_VOLHEAD_SIG) 
++    vh->signature	= bswabU16_inc(p);
++    if (vh->signature != HFSP_VOLHEAD_SIG) 
+ 	HFSP_ERROR(-1, "This is not a HFS+ volume");
+     vh->version	    	= bswabU16_inc(p);
+     vh->attributes   	= bswabU32_inc(p); 
+@@ -345,7 +346,7 @@
+     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 = ((char*) 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 +382,7 @@
+     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 = ((char*) 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 +418,12 @@
+   
+ 	UInt16	embeds, embedl;		/* Start/lenght of embedded area in blocks */
+ 	
+-	((char*) p) += 0x12;		/* skip unneeded HFS vol fields */
++	p = ((char*) p) + 0x12;		/* skip unneeded HFS vol fields */
+ 	drAlBlkSiz = bswabU32_inc(p);	/* offset 0x14 */
+-	((char*) p) += 0x4;		/* skip unneeded HFS vol fields */
++	p = ((char*) p) + 0x4;		/* skip unneeded HFS vol fields */
+ 	drAlBlSt    = bswabU16_inc(p);	/* offset 0x1C */
+ 	
+-	((char*) p) += 0x5E;		/* skip unneeded HFS vol fields */
++	p = ((char*) 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");
--- hfsplus-1.0.4.orig/debian/patches/300289_ftbfs_ppc64_gcc4.0.dpatch
+++ hfsplus-1.0.4/debian/patches/300289_ftbfs_ppc64_gcc4.0.dpatch
@@ -0,0 +1,54 @@
+#! /bin/sh -e
+## 300289_ftbfs_ppc64_gcc4.0.dpatch by Andreas Jochens <aj@andaco.de>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Fix FTBFS on ppc64 with gcc-4.0.
+
+if [ $# -ne 1 ]; then
+    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+    exit 1
+fi
+case "$1" in
+    -patch) patch -f --no-backup-if-mismatch -p1 < $0;;
+    -unpatch) patch -f --no-backup-if-mismatch -R -p1 < $0;;
+    *)
+        echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+        exit 1;;
+esac
+
+exit 0
+
+diff -x debian -ruN old/hfsplus-1.0.4/libhfsp/src/swab.h hfsplus-1.0.4/libhfsp/src/swab.h
+--- old/hfsplus-1.0.4/libhfsp/src/swab.h	2002-03-05 19:50:29.000000000 +0000
++++ hfsplus-1.0.4/libhfsp/src/swab.h	2006-09-13 20:52:15.000000000 +0000
+@@ -48,25 +48,25 @@
+ 
+ #define bswabU16(val) val
+ 
+-#define bswabU16_inc(ptr) (*((UInt16*) (ptr))++)
++#define bswabU16_inc(ptr) ptr = (UInt16*)ptr + 1
+ /* Only available as a GCC extension, but required on sparc due to
+    alignment issues in some of the on-disk structs */
+ #if defined(__GNUC__) && defined(__sparc__)
+ #define bswabU32_inc(ptr) ({			\
+ 	unsigned char *c = (char*)ptr;		\
+-	((UInt32 *)ptr)++;			\
++	ptr = ((UInt32 *)ptr) + 1;		\
+ 	((c[0] << 24)+(c[1] << 16)+(c[2] << 8)+c[3]);})
+ #define bswabU64_inc(ptr) ({			\
+ 	unsigned char *c = (char*)ptr;		\
+ 	UInt64 val = 0;				\
+ 	int i = 0;				\
+-	((UInt64 *)ptr)++;			\
++	ptr = ((UInt64 *)ptr) + 1;		\
+ 	while (i < 8)				\
+ 		val += (c[i] << (8*(7-i++)));	\
+ 	val;})
+ #else
+-#define bswabU32_inc(ptr) (*((UInt32*) (ptr))++)
+-#define bswabU64_inc(ptr) (*((UInt64*) (ptr))++)
++#define bswabU32_inc(ptr) ptr = (UInt32*)ptr + 1
++#define bswabU64_inc(ptr) ptr = (UInt64*)ptr + 1
+ #endif
+ 
+ #define bstoreU16_inc(ptr, val) *((UInt16*) (ptr)) = val; ptr = (UInt16*)ptr + 1
--- hfsplus-1.0.4.orig/debian/patches/334016_broken_bswab_inc_macros.dpatch
+++ hfsplus-1.0.4/debian/patches/334016_broken_bswab_inc_macros.dpatch
@@ -0,0 +1,116 @@
+#! /bin/sh -e
+## 334016_broken_bswab_inc_macros.dpatch by Piotr Krysiuk <piotras@gmail.com>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Fix broken bswab*_inc macros.
+
+if [ $# -ne 1 ]; then
+    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+    exit 1
+fi
+case "$1" in
+    -patch) patch -f --no-backup-if-mismatch -p1 < $0;;
+    -unpatch) patch -f --no-backup-if-mismatch -R -p1 < $0;;
+    *)
+        echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+        exit 1;;
+esac
+
+exit 0
+
+diff -x debian -ruN old/hfsplus-1.0.4/libhfsp/src/btree.c hfsplus-1.0.4/libhfsp/src/btree.c
+--- old/hfsplus-1.0.4/libhfsp/src/btree.c	2002-03-05 19:50:28.000000000 +0000
++++ hfsplus-1.0.4/libhfsp/src/btree.c	2006-09-13 20:52:15.000000000 +0000
+@@ -95,8 +95,9 @@
+     head->btree_type    = bswabU8_inc(p);
+     head->reserved2	= bswabU8_inc(p);
+     head->attributes    = bswabU32_inc(p);
+-    for (i=0; i < 16; i++)
++    for (i=0; i < 16; i++) {
+ 	head->reserved3[i] = bswabU32_inc(p);
++    }
+     return p;
+ }
+ 
+@@ -121,8 +122,9 @@
+     bstoreU8_inc (p, head->btree_type);
+     bstoreU8_inc (p, head->reserved2);
+     bstoreU32_inc(p, head->attributes);
+-    for (i=0; i < 16; i++)
++    for (i=0; i < 16; i++) {
+ 	bstoreU32_inc(p, head->reserved3[i]);
++    }
+     return p;
+ }
+ 
+diff -x debian -ruN old/hfsplus-1.0.4/libhfsp/src/record.c hfsplus-1.0.4/libhfsp/src/record.c
+--- old/hfsplus-1.0.4/libhfsp/src/record.c	2002-03-17 17:20:01.000000000 +0000
++++ hfsplus-1.0.4/libhfsp/src/record.c	2006-09-13 20:52:15.000000000 +0000
+@@ -60,8 +60,9 @@
+     key->parent_cnid		    = bswabU32_inc(p);
+     key->name.strlen = len	    = bswabU16_inc(p);
+     cp = key->name.name;
+-    for (i=0; i < len; i++, cp++)
++    for (i=0; i < len; i++, cp++) {
+ 	*cp			    = bswabU16_inc(p);
++    }
+ 	/* check if keylenght was correct */
+     if (key_length != ((char*) p) - ((char*) check))
+ 	 HFSP_ERROR(EINVAL, "Invalid key length in record_readkey");
+@@ -93,8 +94,9 @@
+     bstoreU16_inc(p, key_length);
+     bstoreU32_inc(p, key->parent_cnid);
+     bstoreU16_inc(p, len);
+-    for (i=0; i < len; i++, cp++)
++    for (i=0; i < len; i++, cp++) {
+ 	bstoreU16_inc(p, *cp);
++    }
+     return p;	
+   fail:
+     return NULL;
+@@ -477,8 +479,9 @@
+     cp = entry->nodeName.name;
+     if (len > 255)
+ 	HFSP_ERROR(-1, "Invalid key length in record_thread");
+-    for (i=0; i < len; i++, cp++)
++    for (i=0; i < len; i++, cp++) {
+ 	*cp			 = bswabU16_inc(p);
++    }
+     return p;
+   fail:
+     return NULL;
+@@ -497,8 +500,9 @@
+     cp = entry->nodeName.name;
+     if (len > 255)
+ 	HFSP_ERROR(-1, "Invalid key length in record_thread");
+-    for (i=0; i < len; i++, cp++)
++    for (i=0; i < len; i++, cp++) {
+ 	bstoreU16_inc(p, *cp);
++    }
+     return p;
+   fail:
+     return NULL;
+diff -x debian -ruN old/hfsplus-1.0.4/libhfsp/src/swab.h hfsplus-1.0.4/libhfsp/src/swab.h
+--- old/hfsplus-1.0.4/libhfsp/src/swab.h	2002-03-05 19:50:29.000000000 +0000
++++ hfsplus-1.0.4/libhfsp/src/swab.h	2006-09-13 20:52:15.000000000 +0000
+@@ -48,7 +48,7 @@
+ 
+ #define bswabU16(val) val
+ 
+-#define bswabU16_inc(ptr) ptr = (UInt16*)ptr + 1
++#define bswabU16_inc(ptr) *((UInt16*) (ptr)); ptr = (UInt16*)ptr + 1
+ /* Only available as a GCC extension, but required on sparc due to
+    alignment issues in some of the on-disk structs */
+ #if defined(__GNUC__) && defined(__sparc__)
+@@ -65,8 +65,8 @@
+ 		val += (c[i] << (8*(7-i++)));	\
+ 	val;})
+ #else
+-#define bswabU32_inc(ptr) ptr = (UInt32*)ptr + 1
+-#define bswabU64_inc(ptr) ptr = (UInt64*)ptr + 1
++#define bswabU32_inc(ptr) *((UInt32*) (ptr)); ptr = (UInt32*)ptr + 1
++#define bswabU64_inc(ptr) *((UInt64*) (ptr)); ptr = (UInt64*)ptr + 1
+ #endif
+ 
+ #define bstoreU16_inc(ptr, val) *((UInt16*) (ptr)) = val; ptr = (UInt16*)ptr + 1
+
--- hfsplus-1.0.4.orig/debian/patches/00list
+++ hfsplus-1.0.4/debian/patches/00list
@@ -0,0 +1,9 @@
+120137_ftbfs_hppa_gcc3.0
+147838_sigbus_sparc
+231270_hpmount_destroys_hfs_volume_headers
+277810_ftbfs_include_gcc3.4
+286366_ftbfs_amd64_gcc4.0
+300289_ftbfs_ppc64_gcc4.0
+334016_broken_bswab_inc_macros
+396180_remove_unused_header
+99_types
--- hfsplus-1.0.4.orig/debian/patches/396180_remove_unused_header.dpatch
+++ hfsplus-1.0.4/debian/patches/396180_remove_unused_header.dpatch
@@ -0,0 +1,31 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 396180_remove_unused_header.dpatch by Martin Pitt <mpitt@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Fix possible future FTBFS by removing an unused header.
+
+if [ $# -ne 1 ]; then
+    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+    exit 1
+fi
+case "$1" in
+    -patch) patch -f --no-backup-if-mismatch -p1 < $0;;
+    -unpatch) patch -f --no-backup-if-mismatch -R -p1 < $0;;
+    *)
+        echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+        exit 1;;
+esac
+
+exit 0
+
+diff -urNad hfsplus-1.0.4~/libhfsp/src/unicode.c hfsplus-1.0.4/libhfsp/src/unicode.c
+--- hfsplus-1.0.4~/libhfsp/src/unicode.c	2002-03-05 20:50:29.000000000 +0100
++++ hfsplus-1.0.4/libhfsp/src/unicode.c	2006-10-30 18:50:04.181626115 +0100
+@@ -16,7 +16,6 @@
+ #include <stdlib.h>
+ #include <endian.h>
+ #include <byteswap.h>
+-#include <linux/string.h>
+ 
+ #define __USE_GNU
+     /* need wcsrtomb */
--- hfsplus-1.0.4.orig/debian/control
+++ hfsplus-1.0.4/debian/control
@@ -0,0 +1,43 @@
+Source: hfsplus
+Section: otherosfs
+Priority: optional
+Maintainer: Aurélien GÉRÔME <ag@roxor.cx>
+Build-Depends: autotools-dev, docbook-to-man, debhelper (>= 4), dpatch, libtool, autoconf, automake1.9
+Standards-Version: 3.7.2
+
+Package: libhfsp0
+Architecture: any
+Section: libs
+Depends: ${shlibs:Depends}
+Description: Shared library to access HFS+ formatted volumes
+ HFS+ is a modernized version of Apple Computers HFS Filesystem.
+ Nowadays, it is widely used with more recent versions of MacOS.
+ hfsplus consists of a library and a set of tools that allow access
+ to HFS+ volumes.
+ .  
+ This package contains a shared version of the library.
+
+Package: hfsplus
+Architecture: any
+Section: otherosfs
+Depends: ${shlibs:Depends}
+Description: Tools to access HFS+ formatted volumes
+ HFS+ is a modernized version of Apple Computers HFS Filesystem.
+ Nowadays, it is widely used with more recent versions of MacOS.
+ hfsplus consists of a library and a set of tools that allow access
+ to HFS+ volumes.
+ .
+ This package contains the tools themselves.
+
+Package: libhfsp-dev
+Architecture: any
+Section: libdevel
+Depends: libhfsp0 (= ${Source-Version}), libc6-dev
+Description: Library to access HFS+ formatted volumes
+ HFS+ is a modernized version of Apple Computers HFS Filesystem.
+ Nowadays, it is widely used with more recent versions of MacOS.
+ hfsplus consists of a library and a set of tools that allow access
+ to HFS+ volumes.
+ .  
+ This package contains everything you need to write programs that use
+ this library, i.e. header files and an archive version of the library.
--- hfsplus-1.0.4.orig/debian/rules
+++ hfsplus-1.0.4/debian/rules
@@ -0,0 +1,101 @@
+#!/usr/bin/make -f
+# Sample debian/rules that uses debhelper.
+# GNU copyright 1997 to 1999 by Joey Hess.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+include /usr/share/dpatch/dpatch.make
+
+# shared library versions, option 1
+version=0.0.0
+major=0
+
+configure: patch configure-stamp
+configure-stamp:
+	dh_testdir
+	libtoolize
+	aclocal
+	autoheader
+	automake -a
+	autoconf
+
+	./configure --prefix=/usr
+
+	touch configure-stamp
+
+build: configure build-stamp
+build-stamp:
+	dh_testdir
+
+	(cd debian; \
+		for man in hfsplus.7 hpcd.1 hpcopy.1 hpfsck.1 \
+			hpls.1 hpmkdir.1 hpmount.1 hppwd.1 \
+			hprm.1 hpumount.1; \
+		do docbook-to-man `echo $$man|sed 's/[17]/sgml/'` >$$man; \
+	done)
+	$(MAKE) CFLAGS="-O2 -g -Wall"
+
+	touch build-stamp
+
+clean: clean1 unpatch
+clean1:
+	dh_testdir
+	dh_testroot
+	rm -f build-stamp configure-stamp
+
+	-$(MAKE) -k clean maintainer-clean
+	find . -type l -exec rm {} \;
+	rm -rf conftest conftest.o debian/*.[17] \
+		doc/Makefile.in doc/Makefile libhfsp/src/Makefile.in \
+		libhfsp/test/.deps/ libhfsp/test/Makefile.in \
+		libhfsp/test/Makefile libhfsp/Makefile.in config.h.in
+
+	dh_clean
+
+install: build
+	dh_testdir
+	dh_testroot
+	dh_clean -k
+	dh_installdirs
+
+	$(MAKE) install DESTDIR=$(CURDIR)/debian/hfsplus
+	install -c -m 644 -o root -g root libhfsp/src/*.h $(CURDIR)/debian/libhfsp-dev/usr/include/hfsplus
+
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+	dh_testdir
+	dh_testroot
+#	
+#	build library packages by moving files from hfsplus
+#	
+	dh_movefiles --sourcedir=debian/hfsplus -plibhfsp$(major) \
+	usr/lib/libhfsp.so.$(major) usr/lib/libhfsp.so.$(version)
+	dh_movefiles --sourcedir=debian/hfsplus -plibhfsp-dev \
+	usr/lib/libhfsp.so usr/lib/libhfsp.a usr/lib/libhfsp.la
+	rmdir debian/hfsplus/usr/lib
+	dh_installdocs doc/*.html
+	dh_installman
+	dh_installchangelogs ChangeLog
+	dh_link
+	dh_strip
+	dh_compress
+	dh_fixperms
+	dh_makeshlibs
+	dh_installdeb
+	dh_shlibdeps
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+# Any other binary targets build just one binary package at a time.
+binary-%: build install
+	make -f debian/rules binary-common DH_OPTIONS=-p$*
+
+binary: binary-indep binary-arch
+.PHONY: build clean clean1 binary-indep binary-arch binary install configure
--- hfsplus-1.0.4.orig/debian/changelog
+++ hfsplus-1.0.4/debian/changelog
@@ -0,0 +1,159 @@
+hfsplus (1.0.4-12) unstable; urgency=low
+
+  * Fix possible future FTBFS by removing an unused header.
+    Add 396180_remove_unused_header.dpatch.
+    Thanks to Martin Pitt. (Closes: #396180)
+
+ -- Aurélien GÉRÔME <ag@roxor.cx>  Mon, 30 Oct 2006 18:42:24 +0100
+
+hfsplus (1.0.4-11) unstable; urgency=low
+
+  * New maintainer. (Closes: #387337)
+  * Update to the latest Standards-Version.
+  * Update description in debian/control.
+  * Add debian/compat to update debhelper to compatibility level 4.
+  * Update Upstream URL in debian/copyright.
+  * Add debian/watch.
+  * Fix bashism in debian/rules. (Closes: #378358)
+  * Conform to policy by building with CFLAGS="-O2 -g -Wall".
+  * Add dpatch support.
+  * The debian diff contained the following files generated by
+    auto{header,conf,make} which were not removed after the build
+    process:
+    - doc/Makefile.in;
+    - doc/Makefile;
+    - libhfsp/src/Makefile.in;
+    - libhfsp/test/.deps/test.Po;
+    - libhfsp/test/Makefile.in;
+    - libhfsp/test/Makefile;
+    - libhfsp/Makefile.in;
+    - config.h.in => run autoheader between aclocal and automake
+      in debian/rules.
+    Remove those files and add proper clean support for them.
+
+ -- Aurélien GÉRÔME <ag@roxor.cx>  Thu, 14 Sep 2006 05:12:33 +0200
+
+hfsplus (1.0.4-10) unstable; urgency=low
+
+  * Fixed problem on hpmount while trying to detect HFS+ volumes.
+  	- Thanks to Piotr Krysiuk (Closes: #334016).
+
+ -- David Moreno Garza <damog@debian.org>  Sun, 16 Oct 2005 03:01:26 -0500
+
+hfsplus (1.0.4-9) unstable; urgency=low
+
+  * Updated policy version.
+  * New maintainer's address.
+
+ -- David Moreno Garza <damog@debian.org>  Sun,  4 Sep 2005 19:34:59 -0500
+
+hfsplus (1.0.4-8) unstable; urgency=low
+
+  * Added another small patch by Andreas Jochens, fixing a build error
+    with version 4.0 of gcc on ppc64 (closes: Bug#300289).
+
+ -- Jens Schmalzing <jensen@debian.org>  Mon, 21 Mar 2005 09:22:38 +0100
+
+hfsplus (1.0.4-7) unstable; urgency=low
+
+  * Applied a small patch by Andreas Jochens, fixing a build error with
+    the upcoming version 4.0 of gcc (closes: Bug#286366).
+
+ -- Jens Schmalzing <jensen@debian.org>  Tue,  4 Jan 2005 15:19:02 +0100
+
+hfsplus (1.0.4-6) unstable; urgency=low
+
+  * Applied a small patch by Andreas Jochens, fixing a build error with
+    the current version 3.4 of gcc (closes: Bug#277810).
+
+  * Updated policy version.
+  
+  * Got rid of a number of empty directories.
+
+ -- Jens Schmalzing <jensen@debian.org>  Fri, 22 Oct 2004 20:13:10 +0200
+
+hfsplus (1.0.4-5) unstable; urgency=low
+
+  * Patched the volume opening code to not write anything if the volume
+    didn't open properly (closes: Bug#231270).  Thanks a lot to Frank
+    Lichtenheld for the patch.
+
+  * Run libtoolize in the configure stage of debian/rules.
+
+  * Depend on automaken for building, not a specific version of automake.
+
+ -- Jens Schmalzing <jensen@debian.org>  Sat, 20 Mar 2004 22:00:34 +0100
+
+hfsplus (1.0.4-4) unstable; urgency=low
+
+  * Corrected section of hfsplus in debian/control.
+
+ -- Jens Schmalzing <jensen@debian.org>  Wed, 27 Aug 2003 17:07:35 +0200
+
+hfsplus (1.0.4-3) unstable; urgency=low
+
+  * Finally fix the long-standing alignment issue on all platforms
+    (closes: #147838).  Thanks very much to Steve Langasek for the patch!
+
+ -- Jens Schmalzing <jensen@debian.org>  Wed, 27 Aug 2003 16:34:17 +0200
+
+hfsplus (1.0.4-2) unstable; urgency=low
+
+  * Used platform independent type definitions so the code runs properly
+    on 64bit platforms.  This closes Bug#147838, which was by conincidence
+    filed exactly one year ago.  Happy Birthday, Bug!
+
+  * Put the libhfsplus-dev package into the newly created libdevel
+    category.  This makes the package compliant with the latest policy
+    version.
+
+  * Slightly changed the copyright file to appease lintian.
+
+ -- Jens Schmalzing <jensen@debian.org>  Fri, 23 May 2003 17:36:25 +0200
+
+hfsplus (1.0.4-1) unstable; urgency=low
+
+  * New upstream version at the request of Jonathan Riddell.  Most
+    notably, this version adds experimental support for creating
+    directories and deleting files.
+  
+  * Install header file into a separate directory to resolve an existing
+    namespace conflict and prevent future ones (closes: Bug#148302).
+  
+  * Build depend on automake1.4 instead of automake, to work around
+    configuration problems.  Thanks to Steve Robbins for pointing this
+    out.
+  
+  * Added and updated a few manpages.
+
+ -- Jens Schmalzing <jensen@debian.org>  Fri, 19 Jul 2002 19:02:59 +0200
+
+hfsplus (1.0.2-4) unstable; urgency=low
+
+  * Fixed a typo in the copyright file (closes: Bug#126963).
+  
+  * Took the opportunity to clean out the other lintian warnings as well.
+
+ -- Jens Schmalzing <jensen@debian.org>  Sun, 30 Dec 2001 11:31:48 +0100
+
+hfsplus (1.0.2-3) unstable; urgency=low
+
+  * Removed a NULL value from a case statement, so the package will build
+    with gcc-3.0 (closes: Bug#120137).
+
+ -- Jens Schmalzing <jensen@debian.org>  Mon, 19 Nov 2001 15:36:55 +0000
+
+hfsplus (1.0.2-2) unstable; urgency=low
+
+  * Architecture changed from powerpc to any (closes: Bug#95337).  I don't
+    see how the package should be useful on anything but PowerPC hardware,
+    given that it only reads HFS+ volumes which still need to be created
+    and populated by MacOS.  But you never know ...
+
+ -- Jens Schmalzing <jensen@debian.org>  Fri, 27 Apr 2001 09:44:40 +0200
+
+hfsplus (1.0.2-1) unstable; urgency=low
+
+  * Initial Release (closes: Bug#89426).
+
+ -- Jens Schmalzing <jensen@debian.org>  Sun, 11 Mar 2001 22:02:06 +0100
