* update hfsutils to 3.2.6-2

This commit is contained in:
Alexander Baldeck 2024-10-13 14:46:33 +02:00
parent 1e1dadd709
commit 6ccdd99886
8 changed files with 359 additions and 5 deletions

View File

@ -0,0 +1,46 @@
From: Aurélien GÉRÔME <ag@roxor.cx>
Date: Sat, 23 Jan 2021 15:14:18 +0100
Subject: Fix build system issues
---
configure | 1 +
configure.in | 1 +
libhfs/Makefile.in | 1 +
3 files changed, 3 insertions(+)
diff --git a/configure b/configure
index e6e752e..360c643 100755
--- a/configure
+++ b/configure
@@ -1579,6 +1579,7 @@ echo "configure:1572: checking for tk.h" >&5
"$tk_dir/include" \
"$tk_dir/../include" \
`echo "$tk_dir" | sed -e 's|/lib|/include|'` \
+ $TCL_PREFIX/include/tcl* \
; \
do
if test -r "$dir/tk.h"
diff --git a/configure.in b/configure.in
index 90910dc..17e7faf 100644
--- a/configure.in
+++ b/configure.in
@@ -239,6 +239,7 @@ then
"$tk_dir/include" \
"$tk_dir/../include" \
`echo "$tk_dir" | sed -e 's|/lib|/include|'` \
+ $TCL_PREFIX/include/tcl* \
; \
do
if test -r "$dir/tk.h"
diff --git a/libhfs/Makefile.in b/libhfs/Makefile.in
index 996a22e..9f07e12 100644
--- a/libhfs/Makefile.in
+++ b/libhfs/Makefile.in
@@ -86,6 +86,7 @@ depend ::
clean ::
rm -f $(TARGETS) *.o gmon.* core
+ rm -f os.c
distclean :: clean
rm -f config.status config.cache config.log config.h Makefile

View File

@ -0,0 +1,127 @@
From: Andreas Jochens <aj@andaco.de>
Date: Sat, 23 Jan 2021 15:14:18 +0100
Subject: Fix FTBFS with gcc-3.4
---
binhex.c | 2 --
copyin.c | 2 --
copyout.c | 2 --
hcwd.c | 2 --
hfsutil.h | 2 +-
libhfs/libhfs.h | 2 +-
librsrc/librsrc.h | 2 +-
tclhfs.c | 3 +--
8 files changed, 4 insertions(+), 13 deletions(-)
diff --git a/binhex.c b/binhex.c
index 50a9eeb..551b520 100644
--- a/binhex.c
+++ b/binhex.c
@@ -38,8 +38,6 @@ int dup(int);
const char *bh_error = "no error";
-extern int errno;
-
# define ERROR(code, str) (bh_error = (str), errno = (code))
static FILE *file; /* input/output file */
diff --git a/copyin.c b/copyin.c
index 061f042..5dbd9c7 100644
--- a/copyin.c
+++ b/copyin.c
@@ -48,8 +48,6 @@ int dup(int);
const char *cpi_error = "no error";
-extern int errno;
-
# define ERROR(code, str) (cpi_error = (str), errno = (code))
# define MACB_BLOCKSZ 128
diff --git a/copyout.c b/copyout.c
index e2f6b4e..813823e 100644
--- a/copyout.c
+++ b/copyout.c
@@ -49,8 +49,6 @@ int dup(int);
const char *cpo_error = "no error";
-extern int errno;
-
# define ERROR(code, str) (cpo_error = (str), errno = (code))
# define MACB_BLOCKSZ 128
diff --git a/hcwd.c b/hcwd.c
index 4c9d181..807a1cf 100644
--- a/hcwd.c
+++ b/hcwd.c
@@ -43,8 +43,6 @@ static mountent *mounts = 0;
static int mtabsz = 0, nmounts = 0;
static int curvol = -1, dirty = 0;
-extern int errno;
-
/*
* NAME: addent()
* DESCRIPTION: insert mount entry into table
diff --git a/hfsutil.h b/hfsutil.h
index 2ad42f7..fc4a7d8 100644
--- a/hfsutil.h
+++ b/hfsutil.h
@@ -19,7 +19,7 @@
* $Id: hfsutil.h,v 1.8 1998/04/11 08:26:57 rob Exp $
*/
-extern int errno;
+#include <errno.h>
# define ERROR(code, str) (hfs_error = (str), errno = (code))
diff --git a/libhfs/libhfs.h b/libhfs/libhfs.h
index a8943cb..63d192d 100644
--- a/libhfs/libhfs.h
+++ b/libhfs/libhfs.h
@@ -22,7 +22,7 @@
# include "hfs.h"
# include "apple.h"
-extern int errno;
+#include <errno.h>
# define ERROR(code, str) \
do { hfs_error = (str), errno = (code); goto fail; } while (0)
diff --git a/librsrc/librsrc.h b/librsrc/librsrc.h
index 2919010..956a4e2 100644
--- a/librsrc/librsrc.h
+++ b/librsrc/librsrc.h
@@ -21,7 +21,7 @@
# include "rsrc.h"
-extern int errno;
+#include <errno.h>
# define ERROR(code, str) \
do { rsrc_error = (str), errno = (code); goto fail; } while (0)
diff --git a/tclhfs.c b/tclhfs.c
index c6182f3..d678f43 100644
--- a/tclhfs.c
+++ b/tclhfs.c
@@ -29,6 +29,7 @@
# include <stdio.h>
# include <stdlib.h>
+# include <errno.h>
# include <string.h>
# include <ctype.h>
# include <limits.h>
@@ -44,8 +45,6 @@
# include "suid.h"
# include "version.h"
-extern int errno;
-
# define ERROR(code, str) (hfs_error = (str), errno = (code))
# define SIZE(type, n) ((size_t) (sizeof(type) * (n)))

View File

@ -0,0 +1,24 @@
From: Matthias Klose <doko@debian.org>
Date: Sat, 23 Jan 2021 15:14:19 +0100
Subject: Add support for files larger than 2GB
---
libhfs/os/unix.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/libhfs/os/unix.c b/libhfs/os/unix.c
index 736243d..474f807 100644
--- a/libhfs/os/unix.c
+++ b/libhfs/os/unix.c
@@ -19,6 +19,11 @@
* $Id: unix.c,v 1.8 1998/11/02 22:09:13 rob Exp $
*/
+#ifdef __linux__
+#define _FILE_OFFSET_BITS 64
+#define _LARGE_FILES
+#endif
+
# ifdef HAVE_CONFIG_H
# include "config.h"
# endif

View File

@ -0,0 +1,21 @@
From: Sergei Golovan <sgolovan@debian.org>
Date: Sat, 23 Jan 2021 15:14:19 +0100
Subject: Add -DUSE_INTERP_RESULT to DEFINES in Makefile.in
---
Makefile.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile.in b/Makefile.in
index 27c2bfd..c5d1a01 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -43,7 +43,7 @@ HARDLINK = ln -f
CC = @CC@
INCLUDES = @CPPFLAGS@ -Ilibhfs @TCL_INCLUDES@ @TK_INCLUDES@
-DEFINES = @DEFS@
+DEFINES = @DEFS@ -DUSE_INTERP_RESULT
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@

View File

@ -0,0 +1,24 @@
From b2330784e89a54dfdc5c2ddcefb904841eb49426 Mon Sep 17 00:00:00 2001
From: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Date: Sun, 14 Apr 2024 13:42:09 +0200
Subject: [PATCH] Fix missing inclusion of string.h in hpwd.c
---
hpwd.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hpwd.c b/hpwd.c
index cd3b100..84c34cf 100644
--- a/hpwd.c
+++ b/hpwd.c
@@ -24,6 +24,7 @@
# endif
# include <stdio.h>
+# include <string.h>
# include "hfs.h"
# include "hcwd.h"
--
2.44.0

View File

@ -0,0 +1,78 @@
--- a/Makefile.in
+++ b/Makefile.in
@@ -197,23 +197,6 @@ dist ::
###############################################################################
-Makefile: config.status
- ./config.status && touch .stamp/config.h
-
-.stamp/config.h: config.status
- ./config.status && touch .stamp/config.h
-
-config.status: .stamp/configure .stamp/config.h.in Makefile.in
- ./config.status --recheck
-
-.stamp/configure: configure.in
- autoconf && touch .stamp/configure
-
-.stamp/config.h.in: configure.in acconfig.h
- autoheader && touch .stamp/config.h.in
-
-###############################################################################
-
$(LIBHFS) ::
cd libhfs && $(MAKE)
--- a/libhfs/Makefile.in
+++ b/libhfs/Makefile.in
@@ -96,23 +96,6 @@ maintainer-clean :: distclean
###############################################################################
-Makefile: config.status
- ./config.status && touch .stamp/config.h
-
-.stamp/config.h: config.status
- ./config.status && touch .stamp/config.h
-
-config.status: .stamp/configure .stamp/config.h.in Makefile.in
- ./config.status --recheck
-
-.stamp/configure: configure.in
- autoconf && touch .stamp/configure
-
-.stamp/config.h.in: configure.in acconfig.h
- autoheader && touch .stamp/config.h.in
-
-###############################################################################
-
$(HFSTARGET): $(HFSOBJS)
$(AR) $@ $(HFSOBJS)
$(RANLIB) $@
--- a/librsrc/Makefile.in
+++ b/librsrc/Makefile.in
@@ -92,23 +92,6 @@ maintainer-clean :: distclean
###############################################################################
-Makefile: config.status
- ./config.status && touch .stamp/config.h
-
-.stamp/config.h: config.status
- ./config.status && touch .stamp/config.h
-
-config.status: .stamp/configure .stamp/config.h.in Makefile.in
- ./config.status --recheck
-
-.stamp/configure: configure.in
- autoconf && touch .stamp/configure
-
-.stamp/config.h.in: configure.in acconfig.h
- autoheader && touch .stamp/config.h.in
-
-###############################################################################
-
$(RSRCTARGET): $(RSRCOBJS)
$(AR) $@ $(RSRCOBJS)
$(RANLIB) $@

View File

@ -0,0 +1,8 @@
--- a/config.h.in
+++ b/config.h.in
@@ -91,3 +91,5 @@
# ifndef HAVE_STRTOL
long strtol(const char *, char **, int);
# endif
+
+#define USE_INTERP_RESULT 1

View File

@ -1,19 +1,45 @@
# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
pkgname=hfsutils
pkgver=3.2.6
pkgrel=1
pkgrel=2
pkgdesc="User space utils for create and check Apple HFS/HFS+ filesystem"
arch=(x86_64 powerpc64le powerpc64 powerpc)
arch=(x86_64 powerpc64le powerpc64 powerpc riscv64)
depends=('openssl')
makedepends=('sh')
license=('GPL')
url="http://www.opensource.apple.com/"
source=("ftp://ftp.mars.org/pub/hfs/${pkgname}-${pkgver}.tar.gz")
sha256sums=('bc9d22d6d252b920ec9cdf18e00b7655a6189b3f34f42e58d5bb152957289840')
source=("ftp://ftp.mars.org/pub/hfs/${pkgname}-${pkgver}.tar.gz"
0001-Fix-build-system-issues.patch
0002-Fix-FTBFS-with-gcc-3.4.patch
0003-Add-support-for-files-larger-than-2GB.patch
0004-Add-DUSE_INTERP_RESULT-to-DEFINES-in-Makefile.in.patch
0005-Fix-missing-inclusion-of-string.h-in-hpwd.c.patch
0006-hfsutils-3.2.6_p15-drop-manual-autoconf.patch
0007-hfsutils-3.2.6-fix-tcl-8.6.patch)
sha256sums=('bc9d22d6d252b920ec9cdf18e00b7655a6189b3f34f42e58d5bb152957289840'
'692140eccf92e5f9848a9290be7ae2ba302e163f1569e12d614c87dfb2b17a7b'
'29484411cc305fdbe79596b755a7c86c3421e3916ddf558b628b6edcfd5e457d'
'65063aad0620d5c6db76cbbb61a9a8414fa1a8a3d6e8d7bfb7874eb5e75cf5fb'
'e9c854d332b03dc30bd53d235a59758009705197ae9e3f301b8c4195e8036d3c'
'b9649f166787f950e52c6f54ac5abb70c9330f78ad2244a63fd19631bfb2da73'
'4be7a0119ea2ad7da0f8a31208a08d12637ec0eb5e91d4904199faa83f278bb2'
'4a0db9c817c1dc015543d3acaaf1d8e007f450a7208ed2509b79faeea6add091')
prepare() {
cd "${pkgname}-${pkgver}"
patch -Np1 -i ${srcdir}/0001-Fix-build-system-issues.patch
patch -Np1 -i ${srcdir}/0002-Fix-FTBFS-with-gcc-3.4.patch
patch -Np1 -i ${srcdir}/0003-Add-support-for-files-larger-than-2GB.patch
patch -Np1 -i ${srcdir}/0004-Add-DUSE_INTERP_RESULT-to-DEFINES-in-Makefile.in.patch
patch -Np1 -i ${srcdir}/0005-Fix-missing-inclusion-of-string.h-in-hpwd.c.patch
patch -Np1 -i ${srcdir}/0006-hfsutils-3.2.6_p15-drop-manual-autoconf.patch
patch -Np1 -i ${srcdir}/0007-hfsutils-3.2.6-fix-tcl-8.6.patch
}
build() {
cd "${pkgname}-${pkgver}"
./configure --prefix=${pkgdir}/usr
CFLAGS+=' -Wno-implicit-int' \
./configure --prefix=${pkgdir}/usr || cat config.log
make
}