2022-06-02 12:50:33 +00:00
|
|
|
package=libgcrypt
|
2023-06-29 11:09:12 +00:00
|
|
|
$(package)_version=1.10.2
|
2022-06-02 12:50:33 +00:00
|
|
|
$(package)_download_path=https://www.gnupg.org/ftp/gcrypt/libgcrypt/
|
|
|
|
$(package)_file_name=libgcrypt-$($(package)_version).tar.bz2
|
2023-06-29 11:09:12 +00:00
|
|
|
$(package)_sha256_hash=3b9c02a004b68c256add99701de00b383accccf37177e0d6c58289664cce0c03
|
2022-06-02 12:50:33 +00:00
|
|
|
$(package)_dependencies=libgpg-error
|
2023-06-29 11:09:12 +00:00
|
|
|
$(package)_patches=fix_getrandom_darwin.patch
|
2022-06-02 12:50:33 +00:00
|
|
|
|
|
|
|
define $(package)_set_vars
|
2022-12-21 15:15:22 +00:00
|
|
|
$(package)_build_opts=CFLAGS="-fPIE"
|
2022-06-02 12:50:33 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define $(package)_preprocess_cmds
|
2023-06-29 11:09:12 +00:00
|
|
|
cp -f $(BASEDIR)/config.guess $(BASEDIR)/config.sub build-aux && \
|
|
|
|
patch -p1 < $($(package)_patch_dir)/fix_getrandom_darwin.patch
|
2022-06-02 12:50:33 +00:00
|
|
|
endef
|
|
|
|
|
2022-12-23 15:43:34 +00:00
|
|
|
# TODO: building on linux with $($(package)_autoconf) fails for mysterious reasons
|
2022-06-02 12:50:33 +00:00
|
|
|
ifeq ($(host_os),linux)
|
|
|
|
define $(package)_config_cmds
|
2023-03-23 19:10:01 +00:00
|
|
|
CFLAGS='-fPIE' CXXFLAGS='-fPIE' ./configure --host=$(host) --enable-digests="sha256 blake2" --enable-ciphers="aes chacha20" --disable-amd64-as-feature-detection --disable-asm --disable-avx-support --disable-avx2-support --disable-sse41-support --disable-shared --enable-static --disable-doc --with-libgpg-error-prefix=$(host_prefix) --prefix=$(host_prefix)
|
2022-06-02 12:50:33 +00:00
|
|
|
endef
|
|
|
|
else
|
|
|
|
define $(package)_config_cmds
|
2023-03-23 19:10:01 +00:00
|
|
|
$($(package)_autoconf) --disable-shared --enable-static --disable-doc --disable-asm --with-libgpg-error-prefix=$(host_prefix)
|
2022-06-02 12:50:33 +00:00
|
|
|
endef
|
|
|
|
endif
|
|
|
|
|
|
|
|
define $(package)_build_cmds
|
|
|
|
$(MAKE) $($(package)_build_opts)
|
|
|
|
endef
|
|
|
|
|
|
|
|
define $(package)_stage_cmds
|
|
|
|
$(MAKE) DESTDIR=$($(package)_staging_dir) install
|
|
|
|
endef
|