Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

depends: remove expat #9681

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 0 additions & 28 deletions contrib/depends/packages/expat.mk

This file was deleted.

2 changes: 1 addition & 1 deletion contrib/depends/packages/packages.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
packages:=boost openssl zeromq expat unbound sodium
packages:=boost openssl zeromq unbound sodium

hardware_packages := hidapi protobuf libusb
hardware_native_packages := native_protobuf
Expand Down
20 changes: 13 additions & 7 deletions contrib/depends/packages/unbound.mk
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
package=unbound
$(package)_version=1.19.1
$(package)_version=1.22.0
$(package)_download_path=https://www.nlnetlabs.nl/downloads/$(package)/
$(package)_file_name=$(package)-$($(package)_version).tar.gz
$(package)_sha256_hash=bc1d576f3dd846a0739adc41ffaa702404c6767d2b6082deb9f2f97cbb24a3a9
$(package)_dependencies=openssl expat
$(package)_patches=disable-glibc-reallocarray.patch

$(package)_sha256_hash=c5dd1bdef5d5685b2cedb749158dd152c52d44f65529a34ac15cd88d4b1b3d43
$(package)_dependencies=openssl
$(package)_patches=disable-glibc-reallocarray.patch no-expat.patch

define $(package)_set_vars
$(package)_config_opts=--disable-shared --enable-static --without-pyunbound --prefix=$(host_prefix)
Expand All @@ -18,13 +17,16 @@ define $(package)_set_vars
$(package)_cflags_mingw32+="-D_WIN32_WINNT=0x600"
endef

# Remove blobs
define $(package)_preprocess_cmds
patch -p1 < $($(package)_patch_dir)/disable-glibc-reallocarray.patch &&\
autoconf
patch -p1 < $($(package)_patch_dir)/no-expat.patch &&\
rm configure~ doc/*.odp doc/*.pdf contrib/*.tar.gz contrib/*.tar.bz2 &&\
rm -rf testdata dnscrypt/testdata
endef

define $(package)_config_cmds
$($(package)_autoconf) ac_cv_func_getentropy=no AR_FLAGS=$($(package)_arflags)
$($(package)_autoconf) ac_cv_func_getentropy=no
endef

define $(package)_build_cmds
Expand All @@ -34,3 +36,7 @@ endef
define $(package)_stage_cmds
$(MAKE) DESTDIR=$($(package)_staging_dir) install
endef

define $(package)_postprocess_cmds
rm -rf share
endef
62 changes: 62 additions & 0 deletions contrib/depends/patches/unbound/no-expat.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
expat is used for an optional unbound-anchor app, which we don't use.

diff --git a/configure b/configure
index 918a063..0e35b2c 100755
--- a/configure
+++ b/configure
@@ -22042,55 +22042,6 @@ printf "%s\n" "#define USE_MINI_EVENT 1" >>confdefs.h

fi

-# check for libexpat
-
-# Check whether --with-libexpat was given.
-if test ${with_libexpat+y}
-then :
- withval=$with_libexpat;
-else $as_nop
- withval="/usr/local /opt/local /usr/lib /usr/pkg /usr/sfw /usr"
-fi
-
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
-printf %s "checking for libexpat... " >&6; }
-found_libexpat="no"
-for dir in $withval ; do
- if test -f "$dir/include/expat.h"; then
- found_libexpat="yes"
- if test "$dir" != "/usr"; then
- CPPFLAGS="$CPPFLAGS -I$dir/include"
- LDFLAGS="$LDFLAGS -L$dir/lib"
- fi
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found in $dir" >&5
-printf "%s\n" "found in $dir" >&6; }
- break;
- fi
-done
-if test x_$found_libexpat != x_yes; then
- as_fn_error $? "Could not find libexpat, expat.h" "$LINENO" 5
-fi
-ac_fn_c_check_header_compile "$LINENO" "expat.h" "ac_cv_header_expat_h" "$ac_includes_default
-"
-if test "x$ac_cv_header_expat_h" = xyes
-then :
- printf "%s\n" "#define HAVE_EXPAT_H 1" >>confdefs.h
-
-fi
-
-ac_fn_check_decl "$LINENO" "XML_StopParser" "ac_cv_have_decl_XML_StopParser" "$ac_includes_default
-#include <expat.h>
-
-" "$ac_c_undeclared_builtin_options" "CFLAGS"
-if test "x$ac_cv_have_decl_XML_StopParser" = xyes
-then :
- ac_have_decl=1
-else $as_nop
- ac_have_decl=0
-fi
-printf "%s\n" "#define HAVE_DECL_XML_STOPPARSER $ac_have_decl" >>confdefs.h
-
-
# hiredis (redis C client for cachedb)

# Check whether --with-libhiredis was given.
Loading