Files
dragonx/depends/packages/libsodium.mk
DanS 9c715f68eb depends: fix libsodium build breaking on git.savannah.gnu.org 502
libsodium's autogen.sh fetches config.sub/config.guess from git.savannah.gnu.org
gitweb, which is frequently down (currently returns 502). curl saved the HTML
error page over config.sub, so libsodium's configure died with
"cannot run /bin/bash ./build-aux/config.sub" and the whole build failed.

autoreconf -ivf (run earlier in autogen.sh) already installs valid config.sub/
config.guess from the build host, so set DO_NOT_UPDATE_CONFIG_SCRIPTS=1 (the
script's own opt-out) to skip the fragile download. Validated: the full build
now completes and produces working dragonxd/dragonx-cli/dragonx-tx.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-21 16:02:04 -05:00

38 lines
1.2 KiB
Makefile

package=libsodium
$(package)_version=1.0.18
$(package)_download_path=https://github.com/jedisct1/libsodium/releases/download/1.0.18-RELEASE
$(package)_file_name=libsodium-1.0.18.tar.gz
$(package)_download_file=libsodium-1.0.18.tar.gz
$(package)_sha256_hash=6f504490b342a4f8a4c4a02fc9b866cbef8622d5df4e5452b46be121e46636c1
$(package)_dependencies=
$(package)_config_opts=
$(package)_cflags=-std=gnu17
ifeq ($(build_os),darwin)
define $(package)_set_vars
$(package)_build_env=MACOSX_DEPLOYMENT_TARGET="10.11"
$(package)_cc=clang
$(package)_cxx=clang++
endef
endif
# libsodium's autogen.sh otherwise fetches config.sub/config.guess from
# git.savannah.gnu.org gitweb, which is frequently down (502) and writes the error
# page over config.sub, breaking configure. autoreconf -ivf (run first) already
# installs valid copies, so tell autogen.sh to skip the download.
define $(package)_preprocess_cmds
cd $($(package)_build_subdir); DO_NOT_UPDATE_CONFIG_SCRIPTS=1 ./autogen.sh
endef
define $(package)_config_cmds
$($(package)_autoconf) --enable-static --disable-shared
endef
define $(package)_build_cmds
$(MAKE)
endef
define $(package)_stage_cmds
$(MAKE) DESTDIR=$($(package)_staging_dir) install
endef