Add read-only mode to the SQLite wrapper
[hiphop-php.git] / patches / 0001-Don-t-require-readline-zstd-if-not-building-client-s.patch
blobe45fbb69c398bca0901f9ea565290f6a767ddcea
1 From ce1dee7e5be6df81ca775b2cff39f0751c4a340e Mon Sep 17 00:00:00 2001
2 From: Fred Emmott <fe@fb.com>
3 Date: Thu, 30 Aug 2018 10:47:43 -0700
4 Subject: [PATCH] Don't require readline + zstd if not building client+server
6 e.g. HHVM is just building the client library, so:
7 - doesn't need either
8 - **must not** link against readline
10 HHVM has previously been patching the CMake file to remove the readline
11 dependency, but lets' end that.
12 ---
13 CMakeLists.txt | 16 +++++++++++-----
14 1 file changed, 11 insertions(+), 5 deletions(-)
16 diff --git a/third-party/fb-mysql/src/CMakeLists.txt b/third-party/fb-mysql/src/CMakeLists.txt
17 index 66cb9db7cd..49d1a489f0 100644
18 --- a/third-party/fb-mysql/src/CMakeLists.txt
19 +++ b/third-party/fb-mysql/src/CMakeLists.txt
20 @@ -176,7 +176,6 @@ INCLUDE(zlib)
21 INCLUDE(zstd)
22 INCLUDE(libevent)
23 INCLUDE(ssl)
24 -INCLUDE(readline)
25 INCLUDE(mysql_version)
26 INCLUDE(libutils)
27 INCLUDE(dtrace)
28 @@ -503,15 +502,22 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/include)
30 # Add bundled or system zlib.
31 MYSQL_CHECK_ZLIB_WITH_COMPRESS()
32 -# Add zstd.
33 -MYSQL_CHECK_ZSTD()
34 # Add bundled yassl/taocrypt or system openssl.
35 MYSQL_CHECK_SSL()
36 -# Find system readline.
37 -MYSQL_CHECK_READLINE()
38 # Add libevent
39 MYSQL_CHECK_LIBEVENT()
41 +IF(NOT WITHOUT_SERVER)
42 + # Add zstd.
43 + MYSQL_CHECK_ZSTD()
44 + # Find system readline.
45 + # If we're not building the server, we also don't build the CLI client tools
46 + # so don't need it. If we're building a library without anything else,
47 + # readline is unneccessary, and as it's GPL, potentially causes license
48 + # issues.
49 + MYSQL_CHECK_READLINE()
50 +ENDIF()
53 # Setup maintainer mode options by the end. Platform checks are
54 # not run with the warning options as to not perturb fragile checks
55 --
56 2.13.5