Add LHA to the build system and the fetch script

This commit is contained in:
Marlon Beijer 2021-02-07 12:53:40 +01:00 committed by deadwood
parent 5b2d3947f0
commit dab42cf773
3 changed files with 38 additions and 3 deletions

View File

@ -4105,11 +4105,17 @@ $(%(mmake)-cmakeflag) : $(%(mmake)-touchfileflag) $(TOP)/$(CURDIR)/mmakefile
#
# The patch_subdir and patch_opt fields are optional.
%define fetch mmake=/A archive_origins=. archive=/A suffixes= location= destination=. \
%define fetch mmake=/A archive_origins=. archive=/A suffixes= location= destination=. tooldir=$(TOOLDIR) \
patches_origins="$(SRCDIR)/$(CURDIR)" patches_specs=::
.PHONY: %(mmake)
ifneq (%(tooldir),)
%(mmake)-tooldir := "%(tooldir)/"
else
%(mmake)-tooldir := "$(TOOLDIR)/"
endif
ifneq (%(location),)
%(mmake)-location := %(location)
else
@ -4121,7 +4127,7 @@ endif
#MM
%(mmake) :
$(Q)$(ECHO) "Fetching %(archive) ..."
$(Q)$(FETCH) -ao "%(archive_origins)" -a %(archive) -s "%(suffixes)" -l $(%(mmake)-location) \
$(Q)TOOLDIR="$(%(mmake)-tooldir)" $(FETCH) -ao "%(archive_origins)" -a %(archive) -s "%(suffixes)" -l $(%(mmake)-location) \
-d %(destination) -po "%(patches_origins)" -p "%(patches_specs)"
$(Q)$(IF) ! $(TEST) -f $(%(mmake)-fetchedflag) ; then \
$(TOUCH) $(%(mmake)-fetchedflag) ; \

View File

@ -281,7 +281,7 @@ unpack()
if ! tar xfJ "$archivepath/$archive"; then ret=false; fi
;;
*.lha)
if ! lha x "$archivepath/$archive"; then ret=false; fi
if ! ${TOOLDIR}lha x "$archivepath/$archive"; then ret=false; fi
;;
*)
echo "Unknown archive format for \`$archive'."

29
tools/lha/mmakefile.src Normal file
View File

@ -0,0 +1,29 @@
include $(SRCDIR)/config/aros.cfg
#MM- contrib-development : tools-lha
#MM tools-lha :
# =================================================
# lha
# =================================================
GIT_LHA := https://github.com/jca02266/lha
CONFIG_LHA := --prefix=$(HOSTGENDIR)/$(CURDIR)/build --bindir=$(TOOLDIR)
#MM
tools-lha : $(TOOLDIR)/lha
$(TOOLDIR)/lha : $(HOSTGENDIR)/$(CURDIR)/Makefile
$(Q)$(ECHO)"make lha" && $(MAKE) -C $(HOSTGENDIR)/$(CURDIR) all
$(Q)$(MKDIR) $(TOOLDIR)
$(Q)$(ECHO)"install lha" && $(MAKE) -C $(HOSTGENDIR)/$(CURDIR) install
$(HOSTGENDIR)/$(CURDIR)/Makefile : $(HOSTGENDIR)/$(CURDIR)/configure
$(Q)$(MKDIR) $(HOSTGENDIR)/$(CURDIR)
$(Q)$(ECHO)"configure lha" && cd $(HOSTGENDIR)/$(CURDIR) && aclocal; autoheader; automake -a; autoconf; $(HOSTGENDIR)/$(CURDIR)/configure $(CONFIG_LHA)
$(HOSTGENDIR)/$(CURDIR)/configure:
$(Q)git clone -b master --depth 4 $(GIT_LHA) $(HOSTGENDIR)/$(CURDIR)/
%common