[packages/hfsutils] - build also tcl and tk utils - fixed DESTDIR and ac patches - added errno,include-c99,largefile pat
qboosh
qboosh at pld-linux.org
Sat Mar 18 22:30:10 CET 2023
commit b4844477877233c25fa9c39eb57bfbce85e9f9bb
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sat Mar 18 22:32:07 2023 +0100
- build also tcl and tk utils
- fixed DESTDIR and ac patches
- added errno,include-c99,largefile patches from Fedora
hfsutils-DESTDIR.patch | 35 ++++++++-------
hfsutils-ac.patch | 3 +-
hfsutils-errno.patch | 11 +++++
hfsutils-include-c99.patch | 17 +++++++
hfsutils-largefile.patch | 15 +++++++
hfsutils.spec | 107 ++++++++++++++++++++++++++++++++++++++++++---
6 files changed, 163 insertions(+), 25 deletions(-)
---
diff --git a/hfsutils.spec b/hfsutils.spec
index 387fff2..db77265 100644
--- a/hfsutils.spec
+++ b/hfsutils.spec
@@ -11,10 +11,15 @@ Source0: ftp://ftp.mars.org/pub/hfs/%{name}-%{version}.tar.gz
# Source0-md5: fa572afd6da969e25c1455f728750ec4
Patch0: %{name}-DESTDIR.patch
Patch1: %{name}-ac.patch
+Patch2: %{name}-errno.patch
+Patch3: %{name}-include-c99.patch
+Patch4: %{name}-largefile.patch
URL: http://www.mars.org/home/rob/proj/hfs/
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: libtool
+BuildRequires: tcl-devel
+BuildRequires: tk-devel
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
@@ -23,10 +28,48 @@ HFS volume utils.
%description -l pl.UTF-8
Narzędzia do woluminów HFS.
+%package tcl
+Summary: Tcl based HFS utility shell
+Summary(pl.UTF-8): Powłoka narzędziowa HFS oparta na Tcl
+Group: Applications/File
+Requires: %{name} = %{version}-%{release}
+
+%description tcl
+Tcl based HFS utility shell.
+
+%description tcl -l pl.UTF-8
+Powłoka narzędziowa HFS oparta na Tcl.
+
+%package tk
+Summary: Tk based HFS GUI
+Summary(pl.UTF-8): Oparty na Tk graficzny interfejs do HFS
+Group: Applications/File
+Requires: %{name} = %{version}-%{release}
+
+%description tk
+Tk based HFS GUI.
+
+%description tk -l pl.UTF-8
+Oparty na Tk graficzny interfejs do HFS.
+
+%package devel
+Summary: Header files and static libraries for HFS
+Summary(pl.UTF-8): Pliki nagłówkowe i biblioteki statyczne do HFS
+Group: Development/Libraries
+
+%description devel
+Header files and static libraries for HFS.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowe i biblioteki statyczne do HFS.
+
%prep
-%setup -q
+%setup -q
%patch0 -p1
%patch1 -p1
+%patch2 -p1
+%patch3 -p1
+%patch4 -p1
%build
%{__libtoolize}
@@ -46,13 +89,18 @@ cd librsrc
%{__autoheader}
cd ..
-%configure
-%{__make}
+CFLAGS="%{rpmcflags} -D_FILE_OFFSET_BITS=64 -DUSE_INTERP_RESULT"
+%configure \
+ --enable-devlibs \
+ --with-tcl \
+ --with-tk
+%{__make} -j1
%install
rm -rf $RPM_BUILD_ROOT
-%{__make} install DESTDIR=$RPM_BUILD_ROOT
+%{__make} -j1 install \
+ DESTDIR=$RPM_BUILD_ROOT
%clean
rm -rf $RPM_BUILD_ROOT
@@ -60,5 +108,52 @@ rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
%doc BLURB CREDITS README CHANGES TODO doc/charset.txt
-%attr(755,root,root) %{_bindir}/*
-%{_mandir}/man?/*
+%attr(755,root,root) %{_bindir}/hattrib
+%attr(755,root,root) %{_bindir}/hcd
+%attr(755,root,root) %{_bindir}/hcopy
+%attr(755,root,root) %{_bindir}/hdel
+%attr(755,root,root) %{_bindir}/hdir
+%attr(755,root,root) %{_bindir}/hformat
+%attr(755,root,root) %{_bindir}/hfsutil
+%attr(755,root,root) %{_bindir}/hls
+%attr(755,root,root) %{_bindir}/hmkdir
+%attr(755,root,root) %{_bindir}/hmount
+%attr(755,root,root) %{_bindir}/hpwd
+%attr(755,root,root) %{_bindir}/hrename
+%attr(755,root,root) %{_bindir}/hrmdir
+%attr(755,root,root) %{_bindir}/humount
+%attr(755,root,root) %{_bindir}/hvol
+%{_mandir}/man1/hattrib.1*
+%{_mandir}/man1/hcd.1*
+%{_mandir}/man1/hcopy.1*
+%{_mandir}/man1/hdel.1*
+%{_mandir}/man1/hdir.1*
+%{_mandir}/man1/hformat.1*
+%{_mandir}/man1/hfsutils.1*
+%{_mandir}/man1/hls.1*
+%{_mandir}/man1/hmkdir.1*
+%{_mandir}/man1/hmount.1*
+%{_mandir}/man1/hpwd.1*
+%{_mandir}/man1/hrename.1*
+%{_mandir}/man1/hrmdir.1*
+%{_mandir}/man1/humount.1*
+%{_mandir}/man1/hvol.1*
+
+%files tcl
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/hfs
+%attr(755,root,root) %{_bindir}/hfssh
+%{_mandir}/man1/hfs.1*
+%{_mandir}/man1/hfssh.1*
+
+%files tk
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/xhfs
+%{_mandir}/man1/xhfs.1*
+
+%files devel
+%defattr(644,root,root,755)
+%{_libdir}/libhfs.a
+%{_libdir}/librsrc.a
+%{_includedir}/hfs.h
+%{_includedir}/rsrc.h
diff --git a/hfsutils-DESTDIR.patch b/hfsutils-DESTDIR.patch
index 383151c..140a70b 100644
--- a/hfsutils-DESTDIR.patch
+++ b/hfsutils-DESTDIR.patch
@@ -6,12 +6,12 @@ diff -uNr hfsutils-3.2.6.orig/Makefile.in hfsutils-3.2.6/Makefile.in
install_cli :: all_cli
- $(BININSTALL) $(HFSUTIL) "$(BINDEST)/."
-+ $(INSTALL) -d $(DESTDIR)/$(BINDEST) $(DESTDIR)/$(MANDEST)/man1
-+ $(BININSTALL) $(HFSUTIL) "$(DESTDIR)/$(BINDEST)/."
++ $(INSTALL) -d $(DESTDIR)$(BINDEST) $(DESTDIR)$(MANDEST)/man1
++ $(BININSTALL) $(HFSUTIL) "$(DESTDIR)$(BINDEST)/."
for file in $(CLITARGETS); do \
- $(HARDLINK) "$(BINDEST)/$(HFSUTIL)" "$(BINDEST)/$$file"; \
-+ $(HARDLINK) "$(HFSUTIL)" "$(DESTDIR)/$(BINDEST)/$$file"; \
++ $(HARDLINK) "$(HFSUTIL)" "$(DESTDIR)$(BINDEST)/$$file"; \
done
- rm -f "$(BINDEST)/$(HFSUTIL)"
@@ -23,9 +23,10 @@ diff -uNr hfsutils-3.2.6.orig/Makefile.in hfsutils-3.2.6/Makefile.in
done
install_tcl :: all_tcl
-+ $(INSTALL) -d $(DESTDIR)$(BINDEST) $(DESTDIR)/$(MANDEST)/man1
++ $(INSTALL) -d $(DESTDIR)$(BINDEST) $(DESTDIR)$(MANDEST)/man1
for file in $(TCLTARGETS); do \
- $(BININSTALL) $$file "$(BINDEST)/."; \
+- $(BININSTALL) $$file "$(BINDEST)/."; \
++ $(BININSTALL) $$file "$(DESTDIR)$(BINDEST)/."; \
done
- if [ -f "$(BINDEST)/hfs" ]; then \
@@ -33,27 +34,27 @@ diff -uNr hfsutils-3.2.6.orig/Makefile.in hfsutils-3.2.6/Makefile.in
- $(BININSTALL) "$(BINDEST)/hfs.new" "$(BINDEST)/hfs"; \
- rm -f "$(BINDEST)/hfs.new"; \
- fi
-+ sed -e '1d' "$(DESTDIR)/$(BINDEST)/hfs" > "$(DESTDIR)/$(BINDEST)/hfs.new"
-+ $(BININSTALL) "$(DESTDIR)/$(BINDEST)/hfs.new" "$(DESTDIR)/$(BINDEST)/hfs"
-+ rm -f "$(DESTDIR)/$(BINDEST)/hfs.new"
++ sed -e '1d' "$(DESTDIR)$(BINDEST)/hfs" > "$(DESTDIR)$(BINDEST)/hfs.new"
++ $(BININSTALL) "$(DESTDIR)$(BINDEST)/hfs.new" "$(DESTDIR)$(BINDEST)/hfs"
++ rm -f "$(DESTDIR)$(BINDEST)/hfs.new"
for file in $(TCLDOCS); do \
$(LIBINSTALL) doc/man/$$file \
- "$(MANDEST)/man$(MANEXT)/`basename $$file .1`.$(MANEXT)"; \
-+ "$(DESTDIR)/$(MANDEST)/man$(MANEXT)/`basename $$file .1`.$(MANEXT)"; \
++ "$(DESTDIR)$(MANDEST)/man$(MANEXT)/`basename $$file .1`.$(MANEXT)"; \
done
install_tk :: all_tk
-+ $(INSTALL) -d $(DESTDIR)$(BINDEST) $(DESTDIR)/$(MANDEST)/man1
++ $(INSTALL) -d $(DESTDIR)$(BINDEST) $(DESTDIR)$(MANDEST)/man1
for file in $(TKTARGETS); do \
- $(BININSTALL) $$file "$(BINDEST)/."; \
-+ $(BININSTALL) $$file "$(DESTDIR)/$(BINDEST)/."; \
++ $(BININSTALL) $$file "$(DESTDIR)$(BINDEST)/."; \
done
for file in $(TKDOCS); do \
$(LIBINSTALL) doc/man/$$file \
- "$(MANDEST)/man$(MANEXT)/`basename $$file .1`.$(MANEXT)"; \
-+ "$(DESTDIR)/$(MANDEST)/man$(MANEXT)/`basename $$file .1`.$(MANEXT)"; \
++ "$(DESTDIR)$(MANDEST)/man$(MANEXT)/`basename $$file .1`.$(MANEXT)"; \
done
install_lib :: all_lib
@@ -73,9 +74,9 @@ diff -uNr hfsutils-3.2.6.orig/libhfs/Makefile.in hfsutils-3.2.6/libhfs/Makefile.
install ::
- $(LIBINSTALL) libhfs.a "$(LIBDEST)/."
- $(LIBINSTALL) hfs.h "$(INCDEST)/."
-+ $(INSTALL) -d $(DESTDIR)/$(LIBDEST)
-+ $(LIBINSTALL) libhfs.a "$(DESTDIR)/$(LIBDEST)/."
-+ $(LIBINSTALL) hfs.h "$(DESTDIR)/$(INCDEST)/."
++ $(INSTALL) -d $(DESTDIR)/$(LIBDEST) $(DESTDIR)$(INCDEST)
++ $(LIBINSTALL) libhfs.a "$(DESTDIR)$(LIBDEST)"
++ $(LIBINSTALL) hfs.h "$(DESTDIR)$(INCDEST)"
again :: clean all
@@ -89,8 +90,8 @@ diff -uNr hfsutils-3.2.6.orig/librsrc/Makefile.in hfsutils-3.2.6/librsrc/Makefil
- $(LIBINSTALL) librsrc.a "$(LIBDEST)/."
- $(LIBINSTALL) rsrc.h "$(INCDEST)/."
+ $(INSTALL) -d $(DESTDIR)/$(LIBDEST) $(DESTDIR)/$(INCDEST)
-+ $(LIBINSTALL) librsrc.a "$(DESTDIE)/$(LIBDEST)/."
-+ $(LIBINSTALL) rsrc.h "$(DESTDIR)/$(INCDEST)/."
++ $(LIBINSTALL) librsrc.a "$(DESTDIR)$(LIBDEST)"
++ $(LIBINSTALL) rsrc.h "$(DESTDIR)$(INCDEST)"
again :: clean all
diff --git a/hfsutils-ac.patch b/hfsutils-ac.patch
index 4adb30e..718f765 100644
--- a/hfsutils-ac.patch
+++ b/hfsutils-ac.patch
@@ -1,12 +1,11 @@
diff -Naur hfsutils-3.2.6.orig/librsrc/configure.in hfsutils-3.2.6/librsrc/configure.in
--- hfsutils-3.2.6.orig/librsrc/configure.in Sat Apr 11 10:27:18 1998
+++ hfsutils-3.2.6/librsrc/configure.in Thu Apr 10 16:58:06 2003
-@@ -54,7 +54,7 @@
+@@ -54,7 +54,6 @@
dnl Checks for library functions.
-AC_SUBST(LIBOBJS)
-+AC_LIBOBJ
AC_CHECK_FUNCS(mktime)
dnl Create output files.
diff --git a/hfsutils-errno.patch b/hfsutils-errno.patch
new file mode 100644
index 0000000..40bbb82
--- /dev/null
+++ b/hfsutils-errno.patch
@@ -0,0 +1,11 @@
+--- hfsutils-3.2.6/tclhfs.c.orig 2004-04-09 19:25:28.722117122 +0100
++++ hfsutils-3.2.6/tclhfs.c 2004-04-09 19:25:50.962124699 +0100
+@@ -32,7 +32,7 @@
+ # include <string.h>
+ # include <ctype.h>
+ # include <limits.h>
+-
++# include <errno.h>
+ # include <tcl.h>
+
+ # include "tclhfs.h"
diff --git a/hfsutils-include-c99.patch b/hfsutils-include-c99.patch
new file mode 100644
index 0000000..eaa738f
--- /dev/null
+++ b/hfsutils-include-c99.patch
@@ -0,0 +1,17 @@
+Add missing include of string.h.
+https://bugzilla.redhat.com/show_bug.cgi?id=2159947
+
+https://fedoraproject.org/wiki/Toolchain/PortingToModernC
+
+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"
diff --git a/hfsutils-largefile.patch b/hfsutils-largefile.patch
new file mode 100644
index 0000000..1882d19
--- /dev/null
+++ b/hfsutils-largefile.patch
@@ -0,0 +1,15 @@
+diff -up hfsutils-3.2.6/libhfs/os/unix.c.patch1 hfsutils-3.2.6/libhfs/os/unix.c
+--- hfsutils-3.2.6/libhfs/os/unix.c.patch1 1998-11-02 23:09:13.000000000 +0100
++++ hfsutils-3.2.6/libhfs/os/unix.c 2011-05-06 12:45:15.000000000 +0200
+@@ -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
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/hfsutils.git/commitdiff/b4844477877233c25fa9c39eb57bfbce85e9f9bb
More information about the pld-cvs-commit
mailing list