diff options
author | fuzzard <fuzzard@users.noreply.github.com> | 2024-05-04 09:23:00 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-04 09:23:00 +1000 |
commit | 3916fa3ddd1bf52c95a179178f3366bd3d3e7041 (patch) | |
tree | 73b0fd5b360fac3522205df64f1035019c39c1c4 /tools | |
parent | 7454a6fd8fa0ae7a5b69a19d65c1f0a12bd5e090 (diff) | |
parent | 82f44f058afb78c39a6c41391535a19cd2e15c19 (diff) | |
download | xbmc-3916fa3ddd1bf52c95a179178f3366bd3d3e7041.tar.xz |
Merge pull request #25078 from fuzzard/depends_brotli
[tools/depends][target] Add brotli lib for curl
Diffstat (limited to 'tools')
-rw-r--r-- | tools/depends/target/Makefile | 3 | ||||
-rw-r--r-- | tools/depends/target/brotli/01-all-disable-exe.patch | 28 | ||||
-rw-r--r-- | tools/depends/target/brotli/BROTLI-VERSION | 5 | ||||
-rw-r--r-- | tools/depends/target/brotli/Makefile | 33 | ||||
-rw-r--r-- | tools/depends/target/curl/Makefile | 2 | ||||
-rw-r--r-- | tools/depends/target/gnutls/Makefile | 1 |
6 files changed, 70 insertions, 2 deletions
diff --git a/tools/depends/target/Makefile b/tools/depends/target/Makefile index a498d373e4..11cdbb533b 100644 --- a/tools/depends/target/Makefile +++ b/tools/depends/target/Makefile @@ -6,6 +6,7 @@ endif # Keep in alphabetical order DEPENDS = \ + brotli \ bzip2 \ curl \ dav1d \ @@ -150,7 +151,7 @@ $(DOWNLOAD_TARGETS): download: $(DOWNLOAD_TARGETS) crossguid: $(LIBUUID) -curl: openssl nghttp2 $(ZLIB) +curl: brotli openssl nghttp2 $(ZLIB) dbus: expat ffmpeg: $(ICONV) $(ZLIB) bzip2 gnutls dav1d $(LIBVA) fontconfig: freetype2 expat $(ICONV) $(LIBUUID) diff --git a/tools/depends/target/brotli/01-all-disable-exe.patch b/tools/depends/target/brotli/01-all-disable-exe.patch new file mode 100644 index 0000000000..8b02506443 --- /dev/null +++ b/tools/depends/target/brotli/01-all-disable-exe.patch @@ -0,0 +1,28 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -169,15 +169,19 @@ + endif() + + # Build the brotli executable +-add_executable(brotli c/tools/brotli.c) +-target_link_libraries(brotli ${BROTLI_LIBRARIES}) ++if(NOT BROTLI_DISABLE_EXE) ++ add_executable(brotli c/tools/brotli.c) ++ target_link_libraries(brotli ${BROTLI_LIBRARIES}) ++endif() + + # Installation + if(NOT BROTLI_BUNDLED_MODE) +- install( +- TARGETS brotli +- RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" +- ) ++ if(NOT BROTLI_DISABLE_EXE) ++ install( ++ TARGETS brotli ++ RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" ++ ) ++ endif() + + install( + TARGETS ${BROTLI_LIBRARIES_CORE} diff --git a/tools/depends/target/brotli/BROTLI-VERSION b/tools/depends/target/brotli/BROTLI-VERSION new file mode 100644 index 0000000000..7747ea6a22 --- /dev/null +++ b/tools/depends/target/brotli/BROTLI-VERSION @@ -0,0 +1,5 @@ +LIBNAME=brotli +VERSION=1.1.0 +ARCHIVE=$(LIBNAME)-$(VERSION).tar.gz +SHA512=6eb280d10d8e1b43d22d00fa535435923c22ce8448709419d676ff47d4a644102ea04f488fc65a179c6c09fee12380992e9335bad8dfebd5d1f20908d10849d9 +BYPRODUCT=libbrotlidec.a diff --git a/tools/depends/target/brotli/Makefile b/tools/depends/target/brotli/Makefile new file mode 100644 index 0000000000..e3154fb8ce --- /dev/null +++ b/tools/depends/target/brotli/Makefile @@ -0,0 +1,33 @@ +include ../../Makefile.include BROTLI-VERSION ../../download-files.include +DEPS = ../../Makefile.include Makefile BROTLI-VERSION ../../download-files.include \ + 01-all-disable-exe.patch + +LIBDYLIB=$(PLATFORM)/build/$(BYPRODUCT) + +CMAKE_OPTIONS=-DBUILD_SHARED_LIBS=OFF \ + -DCMAKE_INSTALL_PREFIX=$(PREFIX) \ + -DCMAKE_BUILD_TYPE=Release \ + -DBROTLI_DISABLE_TESTS=ON \ + -DBROTLI_DISABLE_EXE=ON + +all: .installed-$(PLATFORM) + +$(PLATFORM): $(DEPS) | $(TARBALLS_LOCATION)/$(ARCHIVE).$(HASH_TYPE) + rm -rf $(PLATFORM); mkdir -p $(PLATFORM)/build + cd $(PLATFORM); $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) + cd $(PLATFORM); patch -p1 -i ../01-all-disable-exe.patch + cd $(PLATFORM)/build; $(CMAKE) ${CMAKE_OPTIONS} .. + +$(LIBDYLIB): $(PLATFORM) + $(MAKE) -C $(PLATFORM)/build + +.installed-$(PLATFORM): $(LIBDYLIB) + $(MAKE) -C $(PLATFORM)/build install + touch $@ + +clean: + rm -rf $(PLATFORM) .installed-$(PLATFORM) + +distclean:: + rm -rf $(PLATFORM) .installed-$(PLATFORM) + diff --git a/tools/depends/target/curl/Makefile b/tools/depends/target/curl/Makefile index d317b0d538..d4f002df3d 100644 --- a/tools/depends/target/curl/Makefile +++ b/tools/depends/target/curl/Makefile @@ -14,11 +14,11 @@ CONFIGURE=cp -f $(CONFIG_SUB) $(CONFIG_GUESS) .; \ --without-libidn2 \ --with-ca-fallback \ --with-ssl=$(PREFIX) \ + --with-brotli=$(PREFIX) \ --with-nghttp2=$(PREFIX) \ --with-zlib \ --without-libpsl \ --without-zstd \ - --without-brotli \ --without-gssapi \ --without-gsasl \ --without-hyper \ diff --git a/tools/depends/target/gnutls/Makefile b/tools/depends/target/gnutls/Makefile index f60773dce9..15cb98e617 100644 --- a/tools/depends/target/gnutls/Makefile +++ b/tools/depends/target/gnutls/Makefile @@ -32,6 +32,7 @@ CONFIGURE=./configure --prefix=$(PREFIX) \ --disable-guile \ --disable-tools \ --without-idn \ + --without-brotli \ $(CONFIGURE_OPTIONS) # LLVM 15 has raised this to error by default. drop back to warning |