aboutsummaryrefslogtreecommitdiffstats
path: root/tools/liblzo/patches
diff options
context:
space:
mode:
authorTony Butler <spudz76@gmail.com>2022-11-28 17:06:46 -0800
committerDaniel Golle <daniel@makrotopia.org>2023-01-16 23:51:10 +0000
commit9a8509c2c572a29aec28b6b10da12c5d7a1efba8 (patch)
treeb02fa0cfbbef4795171bbdfc44865ebcdab14a3b /tools/liblzo/patches
parent8b12966d20bf10316752b3678d3999f83e564c60 (diff)
downloadupstream-9a8509c2c572a29aec28b6b10da12c5d7a1efba8.tar.gz
upstream-9a8509c2c572a29aec28b6b10da12c5d7a1efba8.tar.bz2
upstream-9a8509c2c572a29aec28b6b10da12c5d7a1efba8.zip
tools/liblzo: add `liblzo` library
prerequisite of upcoming `tools/lzop` addition, and subsequent initramfs and squashfs cleanups same as `packages/lzo` modified to be a HOST/tools type build, and should always be the same version and sources when either one is bumped because this (and `packages/lzo`) only provide liblzo and no executables, use the clearer name `tools/liblzo` Signed-off-by: Tony Butler <spudz76@gmail.com>
Diffstat (limited to 'tools/liblzo/patches')
-rw-r--r--tools/liblzo/patches/001-add-cmake-ENABLE-configurables.patch68
1 files changed, 68 insertions, 0 deletions
diff --git a/tools/liblzo/patches/001-add-cmake-ENABLE-configurables.patch b/tools/liblzo/patches/001-add-cmake-ENABLE-configurables.patch
new file mode 100644
index 0000000000..9ab27fc924
--- /dev/null
+++ b/tools/liblzo/patches/001-add-cmake-ENABLE-configurables.patch
@@ -0,0 +1,68 @@
+--- a/CMakeLists.txt 2022-11-28 06:34:39.171209779 -0800
++++ b/CMakeLists.txt 2022-11-28 06:33:13.368239757 -0800
+@@ -51,8 +51,11 @@
+ project(lzo VERSION 2.10 LANGUAGES C)
+
+ # configuration options
+-option(ENABLE_STATIC "Build static LZO library." ON)
+-option(ENABLE_SHARED "Build shared LZO library." OFF)
++option(ENABLE_STATIC "Build static LZO library." ON)
++option(ENABLE_SHARED "Build shared LZO library." OFF)
++option(ENABLE_TESTS "Build tests." ON)
++option(ENABLE_EXAMPLES "Build examples." ON)
++option(ENABLE_DOCS "Install documentation." ON)
+ if(NOT ENABLE_STATIC AND NOT ENABLE_SHARED)
+ set(ENABLE_STATIC ON)
+ endif()
+@@ -127,14 +130,20 @@
+ endif()
+ endmacro()
+ # main test driver
++if(ENABLE_TESTS OR ENABLE_EXAMPLES)
+ lzo_add_executable(lzotest lzotest/lzotest.c)
++endif()
+ # examples
++if(ENABLE_EXAMPLES)
+ lzo_add_executable(dict examples/dict.c)
+ lzo_add_executable(lzopack examples/lzopack.c)
+ lzo_add_executable(overlap examples/overlap.c)
+ lzo_add_executable(precomp examples/precomp.c)
+ lzo_add_executable(precomp2 examples/precomp2.c)
++endif()
++if(ENABLE_TESTS OR ENABLE_EXAMPLES)
+ lzo_add_executable(simple examples/simple.c)
++endif()
+ # some boring internal test programs
+ if(0)
+ lzo_add_executable(align tests/align.c)
+@@ -144,7 +153,7 @@
+ endif()
+
+ # miniLZO
+-if(1)
++if(ENABLE_TESTS)
+ add_executable(testmini minilzo/testmini.c minilzo/minilzo.c)
+ target_include_directories(testmini PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/include/lzo") # needed for "lzoconf.h"
+ endif()
+@@ -263,8 +272,10 @@
+
+ if(DEFINED CMAKE_INSTALL_FULL_LIBDIR)
+
+-set(f AUTHORS COPYING NEWS THANKS doc/LZO.FAQ doc/LZO.TXT doc/LZOAPI.TXT)
+-install(FILES ${f} DESTINATION "${CMAKE_INSTALL_FULL_DOCDIR}")
++if(ENABLE_DOCS)
++ set(f AUTHORS COPYING NEWS THANKS doc/LZO.FAQ doc/LZO.TXT doc/LZOAPI.TXT)
++ install(FILES ${f} DESTINATION "${CMAKE_INSTALL_FULL_DOCDIR}")
++endif()
+
+ set(f include/lzo/lzo1.h include/lzo/lzo1a.h include/lzo/lzo1b.h
+ include/lzo/lzo1c.h include/lzo/lzo1f.h include/lzo/lzo1x.h
+@@ -285,7 +296,7 @@
+ )
+ endif()
+
+-if(1)
++if(ENABLE_EXAMPLES)
+ set(f lzopack lzotest simple testmini) # examples
+ install(TARGETS ${f} DESTINATION "${CMAKE_INSTALL_FULL_LIBEXECDIR}/lzo/examples")
+ endif()