From e6aa62a99834cf4c629f6d11c760cecdd7bc8290 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Mon, 30 May 2022 23:01:54 +0200 Subject: [PATCH] - luaposix: rework build --- package/gnulib/gnulib.mk | 13 +++++++++ package/luaposix/luaposix.mk | 50 +++++++++++++--------------------- package/slingshot/slingshot.mk | 13 +++++++++ 3 files changed, 45 insertions(+), 31 deletions(-) create mode 100644 package/gnulib/gnulib.mk create mode 100644 package/slingshot/slingshot.mk diff --git a/package/gnulib/gnulib.mk b/package/gnulib/gnulib.mk new file mode 100644 index 00000000..a195498a --- /dev/null +++ b/package/gnulib/gnulib.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# gnulib +# +################################################################################ + +GNULIB_VERSION = 20140202 +GNULIB_DIR = gnulib-$(GNULIB_VERSION)-stable +GNULIB_SOURCE = gnulib-$(GNULIB_VERSION)-stable.tar.gz +GNULIB_SITE = http://erislabs.net/ianb/projects/gnulib + +gnulib: + $(call DOWNLOAD,$($(PKG)_SOURCE)) diff --git a/package/luaposix/luaposix.mk b/package/luaposix/luaposix.mk index 20f84992..5a9175dc 100644 --- a/package/luaposix/luaposix.mk +++ b/package/luaposix/luaposix.mk @@ -9,10 +9,7 @@ LUAPOSIX_DIR = luaposix-$(LUAPOSIX_VERSION) LUAPOSIX_SOURCE = luaposix-$(LUAPOSIX_VERSION).tar.gz LUAPOSIX_SITE = https://github.com/luaposix/luaposix/archive -$(DL_DIR)/$(LUAPOSIX_SOURCE): - $(download) $(LUAPOSIX_SITE)/v$(LUAPOSIX_VERSION).tar.gz -O $(@) - -LUAPOSIX_DEPENDENCIES = $(HOST_LUA) lua luaexpat +LUAPOSIX_DEPENDENCIES = $(HOST_LUA) lua luaexpat gnulib slingshot LUAPOSIX_AUTORECONF = YES @@ -25,30 +22,21 @@ LUAPOSIX_CONF_OPTS = \ --mandir=$(TARGET_DIR)$(REMOVE_mandir) \ --docdir=$(TARGET_DIR)$(REMOVE_docdir) -GNULIB_VERSION = 20140202 -GNULIB_SOURCE = gnulib-$(GNULIB_VERSION)-stable.tar.gz -GNULIB_SITE = http://erislabs.net/ianb/projects/gnulib - -$(DL_DIR)/$(GNULIB_SOURCE): - $(download) $(GNULIB_SITE)/$(GNULIB_SOURCE) - -SLINGSHOT_VERSION = 6 -SLINGSHOT_SOURCE = slingshot-$(SLINGSHOT_VERSION).tar.gz -SLINGSHOT_SITE = https://github.com/gvvaughan/slingshot/archive - -$(DL_DIR)/$(SLINGSHOT_SOURCE): - $(download) $(SLINGSHOT_SITE)/v$(SLINGSHOT_VERSION).tar.gz -O $(@) - -luaposix: $(LUAPOSIX_DEPENDENCIES) $(DL_DIR)/$(SLINGSHOT_SOURCE) $(DL_DIR)/$(GNULIB_SOURCE) $(DL_DIR)/$(LUAPOSIX_SOURCE) | $(TARGET_DIR) - $(REMOVE)/$(PKG_DIR) - $(UNTAR)/$(PKG_SOURCE) - $(call APPLY_PATCHES,$(PKG_PATCHES_DIR)) - $(CHDIR)/$(PKG_DIR); \ - tar -C gnulib --strip=1 -xf $(DL_DIR)/$(GNULIB_SOURCE); \ - tar -C slingshot --strip=1 -xf $(DL_DIR)/$(SLINGSHOT_SOURCE); \ - ./bootstrap; \ - $(CONFIGURE); \ - $(MAKE); \ - $(MAKE) install - $(REMOVE)/$(PKG_DIR) - $(TOUCH) +define LUAPOSIX_UNPACK_GNULIB + tar -C $(PKG_BUILD_DIR)/gnulib --strip=1 -xf $(DL_DIR)/$(GNULIB_SOURCE) +endef +LUAPOSIX_POST_PATCH_HOOKS += LUAPOSIX_UNPACK_GNULIB + +define LUAPOSIX_UNPACK_SLINGSHOT + tar -C $(PKG_BUILD_DIR)/slingshot --strip=1 -xf $(DL_DIR)/$(SLINGSHOT_SOURCE) +endef +LUAPOSIX_POST_PATCH_HOOKS += LUAPOSIX_UNPACK_SLINGSHOT + +define LUAPOSIX_BOOTSTRAP + $(CHDIR)/$($(PKG)_DIR); \ + ./bootstrap +endef +LUAPOSIX_POST_PATCH_HOOKS += LUAPOSIX_BOOTSTRAP + +luaposix: | $(TARGET_DIR) + $(call autotools-package) diff --git a/package/slingshot/slingshot.mk b/package/slingshot/slingshot.mk new file mode 100644 index 00000000..7d868d4e --- /dev/null +++ b/package/slingshot/slingshot.mk @@ -0,0 +1,13 @@ +################################################################################ +# +# slingshot +# +################################################################################ + +SLINGSHOT_VERSION = 6 +SLINGSHOT_DIR = slingshot-$(SLINGSHOT_VERSION) +SLINGSHOT_SOURCE = slingshot-$(SLINGSHOT_VERSION).tar.gz +SLINGSHOT_SITE = $(call github,gvvaughan,slingshot,v$(SLINGSHOT_VERSION)) + +slingshot: + $(call DOWNLOAD,$($(PKG)_SOURCE))