Commit bc80fb07 authored by Alexander Barkov's avatar Alexander Barkov

ha_cassandra.so and ha_oqgraph.so can be build only if boost is installed

on the build machine. So put them into the deb packages optionally.
     
Additionally, fixing cassandra/CMakeLists.txt to work with thrift
installed in /opt/local and /opt. It was supposed to work, but did
not work actually. Only thrift installed in /usr or /usr/local worked.


renamed:
  debian/dist/Debian/mariadb-server-10.0.files => debian/dist/Debian/mariadb-server-10.0.files.in
  debian/dist/Ubuntu/mariadb-server-10.0.files => debian/dist/Ubuntu/mariadb-server-10.0.files.in
modified:
  .bzrignore
  CMakeLists.txt
  storage/cassandra/CMakeLists.txt
  storage/cassandra/cassandra_se.cc
  storage/cassandra/gen-cpp/Cassandra.h
  storage/cassandra/gen-cpp/cassandra_types.h
  storage/oqgraph/CMakeLists.txt
  debian/dist/Debian/mariadb-server-10.0.files.in
  debian/dist/Ubuntu/mariadb-server-10.0.files.in
parent 616e7a74
...@@ -162,6 +162,8 @@ dbug/user.ps ...@@ -162,6 +162,8 @@ dbug/user.ps
dbug/user.t dbug/user.t
debian/control debian/control
debian/defs.mk debian/defs.mk
debian/dist/Debian/mariadb-server-10.0.files
debian/dist/Ubuntu/mariadb-server-10.0.files
debug/ debug/
depcomp depcomp
Docs/INSTALL-BINARY Docs/INSTALL-BINARY
......
...@@ -345,6 +345,18 @@ CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/sql/sql_builtin.cc.in ...@@ -345,6 +345,18 @@ CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/sql/sql_builtin.cc.in
CONFIGURE_FILE( CONFIGURE_FILE(
${CMAKE_SOURCE_DIR}/cmake/info_macros.cmake.in ${CMAKE_BINARY_DIR}/info_macros.cmake @ONLY) ${CMAKE_SOURCE_DIR}/cmake/info_macros.cmake.in ${CMAKE_BINARY_DIR}/info_macros.cmake @ONLY)
IF(DEB)
CONFIGURE_FILE(
${CMAKE_SOURCE_DIR}/debian/mariadb-server-10.0.files.in
${CMAKE_SOURCE_DIR}/debian/mariadb-server-10.0.files)
CONFIGURE_FILE(
${CMAKE_SOURCE_DIR}/debian/dist/Debian/mariadb-server-10.0.files.in
${CMAKE_SOURCE_DIR}/debian/dist/Debian/mariadb-server-10.0.files)
CONFIGURE_FILE(
${CMAKE_SOURCE_DIR}/debian/dist/Ubuntu/mariadb-server-10.0.files.in
${CMAKE_SOURCE_DIR}/debian/dist/Ubuntu/mariadb-server-10.0.files)
ENDIF(DEB)
# Handle the "INFO_*" files. # Handle the "INFO_*" files.
INCLUDE(${CMAKE_BINARY_DIR}/info_macros.cmake) INCLUDE(${CMAKE_BINARY_DIR}/info_macros.cmake)
# Source: This can be done during the cmake phase, all information is # Source: This can be done during the cmake phase, all information is
......
...@@ -5,8 +5,6 @@ usr/lib/mysql/plugin/auth_test_plugin.so ...@@ -5,8 +5,6 @@ usr/lib/mysql/plugin/auth_test_plugin.so
usr/lib/mysql/plugin/daemon_example.ini usr/lib/mysql/plugin/daemon_example.ini
usr/lib/mysql/plugin/dialog_examples.so usr/lib/mysql/plugin/dialog_examples.so
usr/lib/mysql/plugin/dialog.so usr/lib/mysql/plugin/dialog.so
usr/lib/mysql/plugin/ha_cassandra.so
usr/lib/mysql/plugin/ha_oqgraph.so
usr/lib/mysql/plugin/handlersocket.so usr/lib/mysql/plugin/handlersocket.so
usr/lib/mysql/plugin/libdaemon_example.so usr/lib/mysql/plugin/libdaemon_example.so
usr/lib/mysql/plugin/mypluglib.so usr/lib/mysql/plugin/mypluglib.so
...@@ -81,3 +79,5 @@ usr/share/mysql/mysql_system_tables_data.sql ...@@ -81,3 +79,5 @@ usr/share/mysql/mysql_system_tables_data.sql
usr/share/mysql/mysql_system_tables.sql usr/share/mysql/mysql_system_tables.sql
usr/share/mysql/mysql_performance_tables.sql usr/share/mysql/mysql_performance_tables.sql
usr/share/mysql/mysql_test_data_timezone.sql usr/share/mysql/mysql_test_data_timezone.sql
@CASSANDRA_DEB_FILES@
@OQGRAPH_DEB_FILES@
...@@ -5,8 +5,6 @@ usr/lib/mysql/plugin/auth_test_plugin.so ...@@ -5,8 +5,6 @@ usr/lib/mysql/plugin/auth_test_plugin.so
usr/lib/mysql/plugin/daemon_example.ini usr/lib/mysql/plugin/daemon_example.ini
usr/lib/mysql/plugin/dialog_examples.so usr/lib/mysql/plugin/dialog_examples.so
usr/lib/mysql/plugin/dialog.so usr/lib/mysql/plugin/dialog.so
usr/lib/mysql/plugin/ha_cassandra.so
usr/lib/mysql/plugin/ha_oqgraph.so
usr/lib/mysql/plugin/handlersocket.so usr/lib/mysql/plugin/handlersocket.so
usr/lib/mysql/plugin/libdaemon_example.so usr/lib/mysql/plugin/libdaemon_example.so
usr/lib/mysql/plugin/mypluglib.so usr/lib/mysql/plugin/mypluglib.so
...@@ -83,3 +81,5 @@ usr/share/mysql/mysql_system_tables_data.sql ...@@ -83,3 +81,5 @@ usr/share/mysql/mysql_system_tables_data.sql
usr/share/mysql/mysql_system_tables.sql usr/share/mysql/mysql_system_tables.sql
usr/share/mysql/mysql_performance_tables.sql usr/share/mysql/mysql_performance_tables.sql
usr/share/mysql/mysql_test_data_timezone.sql usr/share/mysql/mysql_test_data_timezone.sql
@CASSANDRA_DEB_FILES@
@OQGRAPH_DEB_FILES@
...@@ -10,6 +10,7 @@ ${Thrift_INCLUDE_DIR} # this may be set ...@@ -10,6 +10,7 @@ ${Thrift_INCLUDE_DIR} # this may be set
) )
# Verify that thrift linking library is found # Verify that thrift linking library is found
SET(Thrift_LIB_PATHS ${Thrift_LIB_PATHS} /usr/local/lib /opt/local/lib /opt/lib)
FIND_LIBRARY(Thrift_LIBS NAMES thrift PATHS ${Thrift_LIB_PATHS} ${Thrift_LIB}) FIND_LIBRARY(Thrift_LIBS NAMES thrift PATHS ${Thrift_LIB_PATHS} ${Thrift_LIB})
IF(EXISTS ${Thrift_LIBS}) IF(EXISTS ${Thrift_LIBS})
GET_FILENAME_COMPONENT(LINK_DIR ${Thrift_LIBS} PATH ABSOLUTE) GET_FILENAME_COMPONENT(LINK_DIR ${Thrift_LIBS} PATH ABSOLUTE)
...@@ -17,15 +18,16 @@ ELSE() ...@@ -17,15 +18,16 @@ ELSE()
RETURN() RETURN()
ENDIF() ENDIF()
INCLUDE_DIRECTORIES(AFTER ${Thrift_INCLUDE_DIRS}) INCLUDE_DIRECTORIES(AFTER ${Thrift_INCLUDE_DIRS}/..)
SET(CMAKE_REQUIRED_INCLUDES ${Thrift_INCLUDE_DIRS}) SET(CMAKE_REQUIRED_INCLUDES ${Thrift_INCLUDE_DIRS})
STRING(REPLACE "-fno-exceptions" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) STRING(REPLACE "-fno-exceptions" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
STRING(REPLACE "-fno-implicit-templates" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) STRING(REPLACE "-fno-implicit-templates" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
SET(CMAKE_REQUIRED_INCLUDES "${Thrift_INCLUDE_DIRS}/..")
CHECK_CXX_SOURCE_COMPILES( CHECK_CXX_SOURCE_COMPILES(
" "
#include <Thrift.h> #include <thrift/Thrift.h>
#include <boost/shared_ptr.hpp> #include <boost/shared_ptr.hpp>
int main() { int main() {
boost::shared_ptr<char> p(new char(10)); boost::shared_ptr<char> p(new char(10));
...@@ -48,6 +50,8 @@ IF(CASSANDRASE_OK) ...@@ -48,6 +50,8 @@ IF(CASSANDRASE_OK)
LINK_DIRECTORIES(${LINK_DIR}) LINK_DIRECTORIES(${LINK_DIR})
SET(CASSANDRA_DEB_FILES "usr/lib/mysql/plugin/ha_cassandra.so" PARENT_SCOPE)
MYSQL_ADD_PLUGIN(cassandra ${cassandra_sources} STORAGE_ENGINE MODULE_ONLY LINK_LIBRARIES thrift COMPONENT cassandra-engine) MYSQL_ADD_PLUGIN(cassandra ${cassandra_sources} STORAGE_ENGINE MODULE_ONLY LINK_LIBRARIES thrift COMPONENT cassandra-engine)
IF (INSTALL_SYSCONFDIR) IF (INSTALL_SYSCONFDIR)
INSTALL(FILES cassandra.cnf DESTINATION ${INSTALL_SYSCONFDIR}/my.cnf.d INSTALL(FILES cassandra.cnf DESTINATION ${INSTALL_SYSCONFDIR}/my.cnf.d
......
...@@ -6,12 +6,12 @@ ...@@ -6,12 +6,12 @@
#include <stdio.h> #include <stdio.h>
#include <stdarg.h> #include <stdarg.h>
#include "Thrift.h" #include "thrift/Thrift.h"
#include "transport/TSocket.h" #include "thrift/transport/TSocket.h"
#include "transport/TTransport.h" #include "thrift/transport/TTransport.h"
#include "transport/TBufferTransports.h" #include "thrift/transport/TBufferTransports.h"
#include "protocol/TProtocol.h" #include "thrift/protocol/TProtocol.h"
#include "protocol/TBinaryProtocol.h" #include "thrift/protocol/TBinaryProtocol.h"
#include "gen-cpp/Cassandra.h" #include "gen-cpp/Cassandra.h"
// cassandra includes end // cassandra includes end
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
#ifndef Cassandra_H #ifndef Cassandra_H
#define Cassandra_H #define Cassandra_H
#include <TProcessor.h> #include <thrift/TProcessor.h>
#include "cassandra_types.h" #include "cassandra_types.h"
namespace org { namespace apache { namespace cassandra { namespace org { namespace apache { namespace cassandra {
......
...@@ -10,10 +10,10 @@ ...@@ -10,10 +10,10 @@
#include <inttypes.h> #include <inttypes.h>
#include <netinet/in.h> #include <netinet/in.h>
#include <Thrift.h> #include <thrift/Thrift.h>
#include <TApplicationException.h> #include <thrift/TApplicationException.h>
#include <protocol/TProtocol.h> #include <thrift/protocol/TProtocol.h>
#include <transport/TTransport.h> #include <thrift/transport/TTransport.h>
......
...@@ -32,6 +32,8 @@ IF(BOOST_OK) ...@@ -32,6 +32,8 @@ IF(BOOST_OK)
STRING(REPLACE "-fno-implicit-templates" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) STRING(REPLACE "-fno-implicit-templates" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
ENDIF(MSVC) ENDIF(MSVC)
SET(OQGRAPH_DEB_FILES "usr/lib/mysql/plugin/ha_oqgraph.so" PARENT_SCOPE)
MYSQL_ADD_PLUGIN(oqgraph ha_oqgraph.cc graphcore.cc STORAGE_ENGINE MYSQL_ADD_PLUGIN(oqgraph ha_oqgraph.cc graphcore.cc STORAGE_ENGINE
MODULE_ONLY) MODULE_ONLY)
ENDIF(BOOST_OK) ENDIF(BOOST_OK)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment