Verified Commit f5fdb85b authored by Karel Koci's avatar Karel Koci 🤘

libupdater: build newer version of uriparser

This builds uriparser if system provides older version then required.
This is pretty simple hack but hack non the less.
parent 96c06d76
......@@ -7,6 +7,7 @@
/.gen/
/.lua_coverage/
/tests/openssl
/.uriparser
__pycache__
# The desired results
*.html
......
Subproject commit 4ad75c84674f90e31fc9c7be0d5f59509f90b020
Subproject commit 311735742e0d6ec2ffa463d21d0e4577413351a9
......@@ -44,13 +44,35 @@ endif
libupdater_MODULES_3RDPARTY := picosat-965/picosat
libupdater_PKG_CONFIGS := $(LUA_NAME) libevent libcurl libcrypto liburiparser
libupdater_PKG_CONFIGS := $(LUA_NAME) libevent libcurl libcrypto
# Workaround, lua.pc doesn't containd -ldl, even when it uses dlopen
libupdater_SO_LIBS += dl b64
ifneq ($(ARGP_STANDALONE),)
libupdater_SO_LIBS += argp
endif
# We require liburiparser at least in version 0.9.0. We can build our version if needed be.
ifeq ($(shell pkg-config liburiparser --atleast-version=0.9.0 && echo $$?),0)
libupdater_PKG_CONFIGS += liburiparser
else
URIPARSER_SRC := https://github.com/uriparser/uriparser/releases/download/uriparser-0.9.1/uriparser-0.9.1.tar.bz2
$(O)/.uriparser/.libs/liburiparser.a:
mkdir -p "$(O)/.uriparser"
curl -L $(URIPARSER_SRC) | tar -xjf - -C "$(O)/.uriparser" --strip-components=1
cd "$(O)/.uriparser" && ./configure --with-pic --disable-test --disable-doc --disable-shared
+$(MAKE) -C "$(O)/.uriparser"
libupdater_EXTRA_INCLUDES := $(O)/.uriparser/include
libupdater_EXTRA_DEPENDS := $(O)/.uriparser/.libs/liburiparser.a
libupdater_LDFLAGS += $(O)/.uriparser/.libs/liburiparser.a
.PHONY: clean-uriparser
clean-uriparser:
rm -rf "$(O)/.uriparser"
endif
LIB_DOCS := \
journal \
objects
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment