Skip to content

Commit aa14211

Browse files
committed
jq: add host build
* luci-app-advanced-reboot requires jq on host, this adds host build of jq Signed-off-by: Stan Grishin <stangri@melmac.ca>
1 parent 00f5b15 commit aa14211

File tree

1 file changed

+21
-2
lines changed

1 file changed

+21
-2
lines changed

utils/jq/Makefile

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
#
22
# Copyright (C) 2017 OpenWrt.org
33
#
4-
# This is free software, licensed under the GNU General Public License v2.
4+
# This is free software, licensed under the
5+
# GNU General Public License v2.
56
# See /LICENSE for more information.
67
#
78

@@ -23,6 +24,7 @@ PKG_CPE_ID:=cpe:/a:jqlang:jq
2324
PKG_INSTALL:=1
2425

2526
include $(INCLUDE_DIR)/package.mk
27+
include $(INCLUDE_DIR)/host-build.mk
2628

2729
define Package/jq/Default
2830
SECTION:=utils
@@ -40,7 +42,8 @@ endef
4042

4143
define Package/jq/description
4244
Lightweight and flexible command-line JSON processor.
43-
This package was compiled without ONIGURUMA regex library. match/test/sub and related functions are not available.
45+
This package was compiled without ONIGURUMA regex library.
46+
match/test/sub and related functions are not available.
4447
endef
4548

4649
define Package/jq-full
@@ -57,15 +60,30 @@ define Package/jq-full/description
5760
endef
5861

5962
CONFIGURE_ARGS+= \
63+
--disable-docs \
64+
--disable-valgrind
65+
66+
HOST_CONFIGURE_ARGS+= \
6067
--disable-docs \
6168
--disable-valgrind \
69+
--without-oniguruma
6270

6371
ifeq ($(BUILD_VARIANT),full)
6472
CONFIGURE_ARGS += --with-oniguruma
6573
else
6674
CONFIGURE_ARGS += --without-oniguruma
6775
endif
6876

77+
define Host/Configure
78+
cd $(HOST_BUILD_DIR) && \
79+
autoreconf -fiv && \
80+
$(call Host/Configure/Default)
81+
endef
82+
83+
define Host/Install
84+
$(call Host/Install/Default)
85+
endef
86+
6987
define Package/jq/install
7088
$(INSTALL_DIR) $(1)/usr/bin
7189
$(INSTALL_DIR) $(1)/usr/lib
@@ -75,5 +93,6 @@ endef
7593

7694
Package/jq-full/install = $(Package/jq/install)
7795

96+
$(eval $(call HostBuild))
7897
$(eval $(call BuildPackage,jq))
7998
$(eval $(call BuildPackage,jq-full))

0 commit comments

Comments
 (0)