aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHoward Chu <hyc@symas.com>2022-05-09 19:47:33 +0100
committerHoward Chu <hyc@symas.com>2022-05-10 21:06:03 +0100
commit5c27fd853f17d12ae6ab94cb01e3ced7cc710e1c (patch)
tree0e5292ea87994cb9e47f48af3fa7ae29db3277d9
parentUpdate randomx: fix Mac linking error (diff)
downloadmonero-5c27fd853f17d12ae6ab94cb01e3ced7cc710e1c.tar.xz
depends: Package cleanup
All patching should be in _preprocess_cmd. config_cmd should just run configure and nothing else before it, otherwise $PATH is broken when it runs. Also remove redundant settings to configure, _autoconf already sets them. We leave explicit AR_FLAGS settings because the builtin rule uses ARFLAGS, and so would leave AR_FLAGS unset otherwise.
-rw-r--r--contrib/depends/hosts/darwin.mk2
-rw-r--r--contrib/depends/packages/expat.mk2
-rw-r--r--contrib/depends/packages/hidapi.mk6
-rw-r--r--contrib/depends/packages/ncurses.mk5
-rw-r--r--contrib/depends/packages/readline.mk5
-rw-r--r--contrib/depends/packages/sodium.mk13
-rw-r--r--contrib/depends/packages/unbound.mk2
7 files changed, 15 insertions, 20 deletions
diff --git a/contrib/depends/hosts/darwin.mk b/contrib/depends/hosts/darwin.mk
index d8b16f969..79d449054 100644
--- a/contrib/depends/hosts/darwin.mk
+++ b/contrib/depends/hosts/darwin.mk
@@ -1,7 +1,7 @@
OSX_MIN_VERSION=10.8
LD64_VERSION=609
ifeq (aarch64, $(host_arch))
-CC_target=arm64-apple-darwin11
+CC_target=arm64-apple-$(host_os)
else
CC_target=$(host)
endif
diff --git a/contrib/depends/packages/expat.mk b/contrib/depends/packages/expat.mk
index 1e1b9dbb8..9516f86ab 100644
--- a/contrib/depends/packages/expat.mk
+++ b/contrib/depends/packages/expat.mk
@@ -11,7 +11,7 @@ $(package)_config_opts+=--prefix=$(host_prefix)
endef
define $(package)_config_cmds
- $($(package)_autoconf) $($(package)_config_opts)
+ $($(package)_autoconf)
endef
define $(package)_build_cmds
diff --git a/contrib/depends/packages/hidapi.mk b/contrib/depends/packages/hidapi.mk
index 55dd65006..97e204f17 100644
--- a/contrib/depends/packages/hidapi.mk
+++ b/contrib/depends/packages/hidapi.mk
@@ -9,7 +9,6 @@ $(package)_patches=missing_win_include.patch
define $(package)_set_vars
$(package)_config_opts=--enable-static --disable-shared
$(package)_config_opts+=--prefix=$(host_prefix)
-$(package)_config_opts_darwin+=RANLIB="$(host_prefix)/native/bin/$(host)-ranlib" AR="$(host_prefix)/native/bin/$(host)-ar" CC="$(host_prefix)/native/bin/$($(package)_cc)"
$(package)_config_opts_linux+=libudev_LIBS="-L$(host_prefix)/lib -ludev"
$(package)_config_opts_linux+=libudev_CFLAGS=-I$(host_prefix)/include
$(package)_config_opts_linux+=libusb_LIBS="-L$(host_prefix)/lib -lusb-1.0"
@@ -18,12 +17,11 @@ $(package)_config_opts_linux+=--with-pic
endef
define $(package)_preprocess_cmds
- patch -p1 < $($(package)_patch_dir)/missing_win_include.patch
+ patch -p1 < $($(package)_patch_dir)/missing_win_include.patch && ./bootstrap
endef
define $(package)_config_cmds
- ./bootstrap &&\
- $($(package)_autoconf) $($(package)_config_opts) AR_FLAGS=$($(package)_arflags)
+ $($(package)_autoconf) AR_FLAGS=$($(package)_arflags)
endef
define $(package)_build_cmds
diff --git a/contrib/depends/packages/ncurses.mk b/contrib/depends/packages/ncurses.mk
index 84087b60a..fb1d92c65 100644
--- a/contrib/depends/packages/ncurses.mk
+++ b/contrib/depends/packages/ncurses.mk
@@ -7,8 +7,7 @@ $(package)_patches=fallback.c
define $(package)_set_vars
$(package)_build_opts=CC="$($(package)_cc)"
- $(package)_config_env=AR="$($(package)_ar)" RANLIB="$($(package)_ranlib)" CC="$($(package)_cc)" ARFLAGS=$($(package)_arflags) cf_cv_ar_flags=""
- $(package)_config_env_darwin=RANLIB="$(host_prefix)/native/bin/$(host)-ranlib" AR="$(host_prefix)/native/bin/$(host)-ar" CC="$(host_prefix)/native/bin/$($(package)_cc)"
+ $(package)_config_env=cf_cv_ar_flags=""
$(package)_config_opts=--prefix=$(host_prefix)
$(package)_config_opts+=--disable-shared
$(package)_config_opts+=--with-build-cc=gcc
@@ -51,7 +50,7 @@ define $(package)_preprocess_cmds
endef
define $(package)_config_cmds
- ./configure $($(package)_config_opts)
+ $($(package)_autoconf)
endef
define $(package)_build_cmds
diff --git a/contrib/depends/packages/readline.mk b/contrib/depends/packages/readline.mk
index 1398bb1b5..957b6454c 100644
--- a/contrib/depends/packages/readline.mk
+++ b/contrib/depends/packages/readline.mk
@@ -7,19 +7,16 @@ $(package)_dependencies=ncurses
define $(package)_set_vars
$(package)_build_opts=CC="$($(package)_cc)"
- $(package)_config_env=AR="$($(package)_ar)" RANLIB="$($(package)_ranlib)" CC="$($(package)_cc)" LDFLAGS="-L$(host_prefix)/lib" ARFLAGS=$($(package)_arflags)
- $(package)_config_env_darwin=RANLIB="$(host_prefix)/native/bin/$(host)-ranlib" AR="$(host_prefix)/native/bin/$(host)-ar" CC="$(host_prefix)/native/bin/$($(package)_cc)"
$(package)_config_opts+=--prefix=$(host_prefix)
$(package)_config_opts+=--exec-prefix=$(host_prefix)
$(package)_config_opts+=--host=$(HOST)
$(package)_config_opts+=--disable-shared --with-curses
$(package)_config_opts_release=--disable-debug-mode
- $(package)_config_opts_darwin+=RANLIB="$(host_prefix)/native/bin/$(host)-ranlib" AR="$(host_prefix)/native/bin/$(host)-ar" CC="$(host_prefix)/native/bin/$($(package)_cc)"
$(package)_build_opts=CFLAGS="$($(package)_cflags) $($(package)_cppflags) -fPIC"
endef
define $(package)_config_cmds
- ./configure $($(package)_config_opts)
+ $($(package)_autoconf)
endef
define $(package)_build_cmds
diff --git a/contrib/depends/packages/sodium.mk b/contrib/depends/packages/sodium.mk
index 51f08a319..87b34599e 100644
--- a/contrib/depends/packages/sodium.mk
+++ b/contrib/depends/packages/sodium.mk
@@ -8,15 +8,16 @@ $(package)_patches=disable-glibc-getrandom-getentropy.patch fix-whitespace.patch
define $(package)_set_vars
$(package)_config_opts=--enable-static --disable-shared
$(package)_config_opts+=--prefix=$(host_prefix)
-$(package)_config_opts_android=RANLIB=$($(package)_ranlib) AR=$($(package)_ar) CC=$($(package)_cc)
-$(package)_config_opts_darwin=RANLIB="$(host_prefix)/native/bin/$(host)-ranlib" AR="$(host_prefix)/native/bin/$(host)-ar" CC="$(host_prefix)/native/bin/$($(package)_cc)"
endef
-define $(package)_config_cmds
+define $(package)_preprocess_cmds
patch -p1 < $($(package)_patch_dir)/disable-glibc-getrandom-getentropy.patch &&\
- ./autogen.sh &&\
- patch -p1 < $($(package)_patch_dir)/fix-whitespace.patch &&\
- $($(package)_autoconf) $($(package)_config_opts) AR_FLAGS=$($(package)_arflags)
+ autoconf &&\
+ patch -p1 < $($(package)_patch_dir)/fix-whitespace.patch
+endef
+
+define $(package)_config_cmds
+ $($(package)_autoconf) AR_FLAGS=$($(package)_arflags)
endef
define $(package)_build_cmds
diff --git a/contrib/depends/packages/unbound.mk b/contrib/depends/packages/unbound.mk
index 2d870d63f..06504a7cb 100644
--- a/contrib/depends/packages/unbound.mk
+++ b/contrib/depends/packages/unbound.mk
@@ -13,7 +13,7 @@ define $(package)_set_vars
endef
define $(package)_config_cmds
- $($(package)_autoconf) $($(package)_config_opts)
+ $($(package)_autoconf)
endef
define $(package)_build_cmds