summaryrefslogtreecommitdiffstats
path: root/libcouchbase-0002-do-not-install-plugins-into-libdir.patch
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2019-06-20 10:20:59 +0200
committerRemi Collet <remi@remirepo.net>2019-06-20 10:20:59 +0200
commit16796cfc8223ccfca9c3c65c3c75621e497b9945 (patch)
tree162aaca903e32fe956a3c3267eee1ae79c58cf4e /libcouchbase-0002-do-not-install-plugins-into-libdir.patch
parent36224c3807b032d77173df9d34930d97158ecf0b (diff)
v2.10.4 from Fedora
Diffstat (limited to 'libcouchbase-0002-do-not-install-plugins-into-libdir.patch')
-rw-r--r--libcouchbase-0002-do-not-install-plugins-into-libdir.patch80
1 files changed, 80 insertions, 0 deletions
diff --git a/libcouchbase-0002-do-not-install-plugins-into-libdir.patch b/libcouchbase-0002-do-not-install-plugins-into-libdir.patch
new file mode 100644
index 0000000..74a0528
--- /dev/null
+++ b/libcouchbase-0002-do-not-install-plugins-into-libdir.patch
@@ -0,0 +1,80 @@
+From 3d7f066b7d97a8d05fcde0b6cb1b6ac521279d82 Mon Sep 17 00:00:00 2001
+From: Sergey Avseyev <sergey.avseyev@gmail.com>
+Date: Wed, 27 Sep 2017 02:04:00 +0300
+Subject: [PATCH] Do not install plugins into libdir
+
+---
+ cmake/config-cmake.h.in | 2 +-
+ plugins/io/libev/CMakeLists.txt | 2 +-
+ plugins/io/libevent/CMakeLists.txt | 2 +-
+ plugins/io/libuv/CMakeLists.txt | 2 +-
+ src/iofactory.c | 6 ++++++
+ 5 files changed, 10 insertions(+), 4 deletions(-)
+
+diff --git a/cmake/config-cmake.h.in b/cmake/config-cmake.h.in
+index 81128091..f97d8bf5 100644
+--- a/cmake/config-cmake.h.in
++++ b/cmake/config-cmake.h.in
+@@ -56,7 +56,7 @@
+
+ #cmakedefine LCB_USE_HDR_HISTOGRAM
+
+-#define LCB_LIBDIR "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}"
++#define LCB_LIBDIR "${CMAKE_INSTALL_LIBDIR}/libcouchbase"
+
+ #include "config_static.h"
+ #endif
+diff --git a/plugins/io/libev/CMakeLists.txt b/plugins/io/libev/CMakeLists.txt
+index 6eaa62f6..1ad13736 100644
+--- a/plugins/io/libev/CMakeLists.txt
++++ b/plugins/io/libev/CMakeLists.txt
+@@ -26,4 +26,4 @@ ENDIF()
+
+ INSTALL(TARGETS
+ couchbase_libev
+- LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
++ LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}/libcouchbase")
+diff --git a/plugins/io/libevent/CMakeLists.txt b/plugins/io/libevent/CMakeLists.txt
+index 1b96a9e3..95ff434b 100644
+--- a/plugins/io/libevent/CMakeLists.txt
++++ b/plugins/io/libevent/CMakeLists.txt
+@@ -22,7 +22,7 @@ IF(LCB_EMBED_PLUGIN_LIBEVENT)
+ SET(LCB_LINK_SPEC "${LCB_LINKS_SPEC} ${LIBEVENT_LIBRARIES}")
+ ELSE()
+ ADD_LIBRARY(couchbase_libevent SHARED plugin-libevent.c)
+- INSTALL(TARGETS couchbase_libevent LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
++ INSTALL(TARGETS couchbase_libevent LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}/libcouchbase")
+ TARGET_LINK_LIBRARIES(couchbase_libevent ${LIBEVENT_LIBRARIES})
+ ENDIF()
+
+diff --git a/plugins/io/libuv/CMakeLists.txt b/plugins/io/libuv/CMakeLists.txt
+index 2492a835..86f31687 100644
+--- a/plugins/io/libuv/CMakeLists.txt
++++ b/plugins/io/libuv/CMakeLists.txt
+@@ -38,5 +38,5 @@ INCLUDE_DIRECTORIES(AFTER ${LIBUV_INCLUDE_DIR})
+ ADD_DEFINITIONS(-DLIBCOUCHBASE_INTERNAL=1)
+ INSTALL(TARGETS
+ couchbase_libuv
+- LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
++ LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}/libcouchbase"
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
+diff --git a/src/iofactory.c b/src/iofactory.c
+index 74eae50c..ca1a2d1b 100644
+--- a/src/iofactory.c
++++ b/src/iofactory.c
+@@ -366,6 +366,12 @@ static lcb_error_t generate_options(plugin_info *pi,
+ }
+ ret = get_create_func(ours->v.v1.sofile, ours->v.v1.symbol, &plugin, want_debug);
+ if (ret != LCB_SUCCESS) {
++ char path[PATH_MAX];
++ /* try to look up the so-file in the libdir */
++ snprintf(path, PATH_MAX, "%s/%s", LCB_LIBDIR, ours->v.v1.sofile);
++ ret = get_create_func(path, ours->v.v1.symbol, &plugin, want_debug);
++ }
++ if (ret != LCB_SUCCESS) {
+ if (type) {
+ *type = LCB_IO_OPS_SELECT;
+ }
+--
+2.13.6
+