summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorPablo Lezaeta Reyes2015-05-26 02:55:34 -0300
committerPablo Lezaeta Reyes2015-05-26 02:55:34 -0300
commit97e8684393b2953b0eb801ede671cd7e212528b6 (patch)
treebf4b75ecf21820c24c5f5dfa735783c277067f05
downloadaur-97e8684393b2953b0eb801ede671cd7e212528b6.tar.gz
Add hfsutils
Signed-off-by: Pablo Lezaeta Reyes <prflr88@gmail.com>
-rw-r--r--.SRCINFO24
-rw-r--r--.gitignore11
-rwxr-xr-xMakefile-install.patch70
-rwxr-xr-xPKGBUILD68
-rw-r--r--hfsutils-3.2.6-errno.patch13
-rw-r--r--hfsutils-3.2.6-fix-tcl-8.6.patch8
-rw-r--r--largerthan2gb.patch15
7 files changed, 209 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..83772efc6d20
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,24 @@
+pkgbase = hfsutils
+ pkgdesc = A comprehensive software to permit manipulation of HFS volume
+ pkgver = 3.2.6
+ pkgrel = 6
+ url = http://www.mars.org/home/rob/proj/hfs/
+ arch = i686
+ arch = x86_64
+ license = GPL
+ depends = glibc
+ optdepends = tcl: For the graphical interface [rebuild using --with-tcl]
+ optdepends = tk: For the graphical interface [rebuild using --with-tk]
+ source = ftp://ftp.mars.org/pub/hfs/hfsutils-3.2.6.tar.gz
+ source = Makefile-install.patch
+ source = hfsutils-3.2.6-errno.patch
+ source = largerthan2gb.patch
+ source = hfsutils-3.2.6-fix-tcl-8.6.patch
+ md5sums = fa572afd6da969e25c1455f728750ec4
+ md5sums = af48f3ff82c6aa8607c10271c2e56c77
+ md5sums = 4f5ea10416823de9fd38f6121dd3b8f0
+ md5sums = 7ab54a275889301df989c4a0351781c6
+ md5sums = a4b7920d3302f4c79f162923d8c1c654
+
+pkgname = hfsutils
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..7d813751c966
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,11 @@
+src
+srcdir
+pkg
+pkgdir
+*.tar.*
+*.xz
+*.gz
+*.bz2
+*.tar
+*.zip
+*.rar
diff --git a/Makefile-install.patch b/Makefile-install.patch
new file mode 100755
index 000000000000..38a123a98125
--- /dev/null
+++ b/Makefile-install.patch
@@ -0,0 +1,70 @@
+*** Makefile.in.orig 2013-05-05 16:48:26.065525171 +0100
+--- Makefile.in 2013-05-05 16:53:14.065321352 +0100
+*************** INCDEST = @includedir@
+*** 36,42 ****
+
+ MANEXT = 1
+
+! INSTALL = @INSTALL@
+ BININSTALL = @INSTALL_PROGRAM@ -m 755
+ LIBINSTALL = @INSTALL_DATA@
+ HARDLINK = ln -f
+--- 36,42 ----
+
+ MANEXT = 1
+
+! INSTALL = @INSTALL@ -D
+ BININSTALL = @INSTALL_PROGRAM@ -m 755
+ LIBINSTALL = @INSTALL_DATA@
+ HARDLINK = ln -f
+*************** check :: all
+*** 111,117 ****
+ install :: @INSTALL_TARGETS@
+
+ install_cli :: all_cli
+! $(BININSTALL) $(HFSUTIL) "$(BINDEST)/."
+
+ for file in $(CLITARGETS); do \
+ $(HARDLINK) "$(BINDEST)/$(HFSUTIL)" "$(BINDEST)/$$file"; \
+--- 111,117 ----
+ install :: @INSTALL_TARGETS@
+
+ install_cli :: all_cli
+! $(BININSTALL) $(HFSUTIL) "$(BINDEST)/$(HFSUTIL)"
+
+ for file in $(CLITARGETS); do \
+ $(HARDLINK) "$(BINDEST)/$(HFSUTIL)" "$(BINDEST)/$$file"; \
+*************** install_cli :: all_cli
+*** 126,132 ****
+
+ install_tcl :: all_tcl
+ for file in $(TCLTARGETS); do \
+! $(BININSTALL) $$file "$(BINDEST)/."; \
+ done
+
+ if [ -f "$(BINDEST)/hfs" ]; then \
+--- 126,132 ----
+
+ install_tcl :: all_tcl
+ for file in $(TCLTARGETS); do \
+! $(BININSTALL) $$file "$(BINDEST)/$$file"; \
+ done
+
+ if [ -f "$(BINDEST)/hfs" ]; then \
+*************** install_tcl :: all_tcl
+*** 142,148 ****
+
+ install_tk :: all_tk
+ for file in $(TKTARGETS); do \
+! $(BININSTALL) $$file "$(BINDEST)/."; \
+ done
+
+ for file in $(TKDOCS); do \
+--- 142,148 ----
+
+ install_tk :: all_tk
+ for file in $(TKTARGETS); do \
+! $(BININSTALL) $$file "$(BINDEST)/$(TKTARGETS)"; \
+ done
+
+ for file in $(TKDOCS); do \
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100755
index 000000000000..21456fdeca66
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,68 @@
+# Maintainer: Pablo Lezaeta <prflr88@gmail.com>
+
+pkgname=hfsutils
+pkgver=3.2.6
+pkgrel=6
+pkgdesc="A comprehensive software to permit manipulation of HFS volume"
+arch=("i686" "x86_64")
+url="http://www.mars.org/home/rob/proj/hfs/"
+license=("GPL")
+depends=("glibc")
+optdepends=("tcl: For the graphical interface [rebuild using --with-tcl]"
+ "tk: For the graphical interface [rebuild using --with-tk]")
+source=("ftp://ftp.mars.org/pub/hfs/$pkgname-$pkgver.tar.gz"
+ "Makefile-install.patch"
+ "hfsutils-3.2.6-errno.patch"
+ "largerthan2gb.patch"
+ "hfsutils-3.2.6-fix-tcl-8.6.patch")
+
+prepare() {
+ unset CPPFLAGS
+
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ # Fixed Makefile @INSTALL@ feature
+ patch -Np0 -i "${srcdir}/Makefile-install.patch"
+
+ # Fix the errno issue on glibc-2.3.2+
+ patch -Np1 -i "${srcdir}/hfsutils-3.2.6-errno.patch"
+
+ # Add support for files larger than 2 GB, this is the 21 century
+ patch -Np1 -i "${srcdir}/largerthan2gb.patch"
+
+ # Fixed compilation with tcl-8.6+
+ patch -Np1 -i "${srcdir}/hfsutils-3.2.6-fix-tcl-8.6.patch"
+}
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ./configure --prefix=/usr \
+ --mandir=/usr/share/man \
+ --without-tcl --without-tk
+ make
+
+ cd "${srcdir}/${pkgname}-${pkgver}/hfsck"
+ make
+}
+
+#check() {
+# cd "$srcdir/$pkgname-$pkgver"
+# make -k check
+#}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ msg "Installing to ${pkgdir}"
+ make prefix="${pkgdir}/usr" MANDEST="${pkgdir}/usr/share/man" install
+
+ # Faulty makefile, install hfsck
+ install -m 755 "${srcdir}/${pkgname}-${pkgver}/hfsck/hfsck" \
+ "${pkgdir}/usr/bin/hfsck"
+
+}
+
+md5sums=('fa572afd6da969e25c1455f728750ec4'
+ 'af48f3ff82c6aa8607c10271c2e56c77'
+ '4f5ea10416823de9fd38f6121dd3b8f0'
+ '7ab54a275889301df989c4a0351781c6'
+ 'a4b7920d3302f4c79f162923d8c1c654')
diff --git a/hfsutils-3.2.6-errno.patch b/hfsutils-3.2.6-errno.patch
new file mode 100644
index 000000000000..6e25f794b220
--- /dev/null
+++ b/hfsutils-3.2.6-errno.patch
@@ -0,0 +1,13 @@
+diff -ruN hfsutils.orig/tclhfs.c hfsutils-3.2.6/tclhfs.c
+--- hfsutils.orig/tclhfs.c 2003-03-31 17:34:55.000000000 +0200
++++ hfsutils-3.2.6/tclhfs.c 2003-03-31 17:39:51.000000000 +0200
+@@ -43,8 +43,7 @@
+ # include "charset.h"
+ # include "suid.h"
+ # include "version.h"
+-
+-extern int errno;
++# include <errno.h>
+
+ # define ERROR(code, str) (hfs_error = (str), errno = (code))
+
diff --git a/hfsutils-3.2.6-fix-tcl-8.6.patch b/hfsutils-3.2.6-fix-tcl-8.6.patch
new file mode 100644
index 000000000000..19f15424543c
--- /dev/null
+++ b/hfsutils-3.2.6-fix-tcl-8.6.patch
@@ -0,0 +1,8 @@
+--- hfsutils-3.2.6/config.h.in
++++ hfsutils-3.2.6/config.h.in
+@@ -91,3 +91,5 @@
+ # ifndef HAVE_STRTOL
+ long strtol(const char *, char **, int);
+ # endif
++
++#define USE_INTERP_RESULT 1
diff --git a/largerthan2gb.patch b/largerthan2gb.patch
new file mode 100644
index 000000000000..423256b67d4f
--- /dev/null
+++ b/largerthan2gb.patch
@@ -0,0 +1,15 @@
+diff -ruN hfsutils.orig/libhfs/os/unix.c hfsutils-3.2.6/libhfs/os/unix.c
+--- hfsutils.orig/libhfs/os/unix.c 1998-11-02 23:09:13.000000000 +0000
++++ hfsutils-3.2.6/libhfs/os/unix.c 2007-02-27 15:44:21.023442553 +0000
+@@ -19,6 +19,11 @@
+ * $Id: largerthan2gb.patch,v 1.1 2005/02/05 21:20:43 hansmi Exp $
+ */
+
++#ifdef __linux__
++#define _FILE_OFFSET_BITS 64
++#define _LARGE_FILES
++#endif
++
+ # ifdef HAVE_CONFIG_H
+ # include "config.h"
+ # endif