aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorfuzzard <fuzzard@kodi.tv>2024-04-28 10:39:25 +1000
committerfuzzard <fuzzard@kodi.tv>2024-05-02 08:43:43 +1000
commit2f20860df537af9feb244101147e71912fa0bc11 (patch)
tree7e0e534bda211581f4ce0a1f443ce4e87fe3d443 /tools
parent7c7f08a545d6011aa05c0ece2b960452b65e3457 (diff)
downloadxbmc-2f20860df537af9feb244101147e71912fa0bc11.tar.xz
[tools/depends][target] Add brotli 1.1.0
We currently use build and enable brotli for curl use on our windows lib, so this just brings parity for tools/depends based builds
Diffstat (limited to 'tools')
-rw-r--r--tools/depends/target/brotli/01-all-disable-exe.patch28
-rw-r--r--tools/depends/target/brotli/BROTLI-VERSION5
-rw-r--r--tools/depends/target/brotli/Makefile33
3 files changed, 66 insertions, 0 deletions
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)
+