Skip to content

Commit

Permalink
mariadb build not yet working
Browse files Browse the repository at this point in the history
  • Loading branch information
darabi committed Apr 8, 2015
1 parent 998b67c commit dfcc0c6
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 32 deletions.
63 changes: 31 additions & 32 deletions feeds/packages/utils/mariadb/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ PKG_USE_MIPS16:=0
PKG_FIXUP:=libtool

include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk

define Package/libmariadbclient/Default
SECTION:=libs
Expand All @@ -38,7 +39,7 @@ endef
define Package/mariadb-server
SECTION:=utils
CATEGORY:=Utilities
DEPENDS:=+libmariadbclient +libpthread +libncursesw +libreadline
DEPENDS:=+libmariadbclient +libpthread +libncursesw +libreadline +libevent
TITLE:=MariaDB Server
URL:=http://mariadb.com/
SUBMENU:=database
Expand All @@ -58,37 +59,35 @@ TARGET_CXX=g++-uc

TARGET_CFLAGS += $(FPIC)

CONFIGURE_ARGS += \
--enable-shared \
--enable-static \
--enable-thread-safe-client \
--disable-assembler \
--with-pthread \
--with-server \
--without-mariadbmanager \
--with-mariadbd-user=root \
--with-unix-socket-path=/tmp \
--without-libwrap \
--with-low-memory \
--without-embedded-server \
--without-query-cache \
--without-ssl \
--without-docs \
--without-man \
--without-readline \
--without-debug \
--with-named-thread-libs=-lpthread

CONFIGURE_VARS += \
mariadb_cv_compress=yes \
mariadb_cv_gethostname_style=glibc2 \
mariadb_cv_gcc_atomic_builtins=yes \
mariadb_cv_gcc_atomic_builtins_pthread_t=yes \
ac_cv_c_stack_direction=-1

define Build/Configure
cmake -DPLUGIN_TOKUDB=OFF $(PKG_BUILD_DIR)/CMakeLists.txt
endef
CMAKE_OPTIONS += -DSTACK_DIRECTION=-1 -DXTRADB_OK=1 -DWITHOUT_XTRADB=1 -DHAVE_BACKTRACE_WITHOUT_EXECINFO=1 -DWITH_UNIT_TESTS=0 -DHAVE_CXX_-Wmissing-prototypes=0 -DHAVE_CXX_-Wstrict-prototypes=1 -DHAVE_STDCXX11=1 -DHAVE_STDCXX0X=1 -DHAVE_CXX_-Wcast-align=1 -DHAVE_CXX_-Wshadow=1 -DHAVE_CXX_-Wpointer-arith=1 -DHAVE_CXX_-Wmissing-declarations=1 -DHAVE_CXX_-Wbad-function-cast=1 -DHAVE_CXX_-Wno-missing-noreturn=0 -DHAVE_C_-fno-rtti=1 -DHAVE_C_-Wcast-align=1 -DHAVE_C_-Wshadow=1 -DHAVE_C_-Wpointer-arith=1 -DHAVE_C_-Wmissing-declarations=1 -DHAVE_C_-Wmissing-prototypes=1 -DHAVE_C_-Wstrict-prototypes=1 -DHAVE_C_-Wno-missing-noreturn=0 -DHAVE_C_-Wbad-function-cast=1 -DHAVE_C_-Wextra=1 -DHAVE_C_-Wno-error=strict-overflow

# CONFIGURE_ARGS += \
# --enable-shared \
# --enable-static \
# --enable-thread-safe-client \
# --disable-assembler \
# --with-pthread \
# --with-server \
# --without-mariadbmanager \
# --with-mariadbd-user=root \
# --with-unix-socket-path=/tmp \
# --without-libwrap \
# --with-low-memory \
# --without-embedded-server \
# --without-query-cache \
# --without-ssl \
# --without-docs \
# --without-man \
# --without-readline \
# --without-debug \
# --with-named-thread-libs=-lpthread

# CONFIGURE_VARS += \
# mariadb_cv_compress=yes \
# mariadb_cv_gethostname_style=glibc2 \
# mariadb_cv_gcc_atomic_builtins=yes \
# mariadb_cv_gcc_atomic_builtins_pthread_t=yes \
# ac_cv_c_stack_direction=-1

define Build/Compile
+$(MAKE) $(PKG_JOBS) -C "$(PKG_BUILD_DIR)" \
Expand Down
41 changes: 41 additions & 0 deletions feeds/packages/utils/mariadb/patches/010-disable-tests.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -17,24 +17,25 @@ ADD_DEFINITIONS("-DMYSQL_CLIENT")

INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include)

-ADD_EXECUTABLE(mysql_client_test mysql_client_test.c)
-TARGET_LINK_LIBRARIES(mysql_client_test mysqlclient)
-SET_TARGET_PROPERTIES(mysql_client_test PROPERTIES LINKER_LANGUAGE CXX)
-
IF(WITH_UNIT_TESTS)
+
+ ADD_EXECUTABLE(mysql_client_test mysql_client_test.c)
+ TARGET_LINK_LIBRARIES(mysql_client_test mysqlclient)
+ SET_TARGET_PROPERTIES(mysql_client_test PROPERTIES LINKER_LANGUAGE CXX)
+
ADD_EXECUTABLE(bug25714 bug25714.c)
TARGET_LINK_LIBRARIES(bug25714 mysqlclient)
SET_TARGET_PROPERTIES(bug25714 PROPERTIES LINKER_LANGUAGE CXX)
-ENDIF()

-INSTALL(TARGETS mysql_client_test DESTINATION ${INSTALL_BINDIR} COMPONENT Test)
+ INSTALL(TARGETS mysql_client_test DESTINATION ${INSTALL_BINDIR} COMPONENT Test)

-CHECK_INCLUDE_FILE(event.h HAVE_EVENT_H)
-FIND_LIBRARY(EVENT_LIBRARY event)
-MARK_AS_ADVANCED(EVENT_LIBRARY)
-IF(HAVE_EVENT_H AND EVENT_LIBRARY)
- ADD_EXECUTABLE(async_queries async_queries.c)
- TARGET_LINK_LIBRARIES(async_queries mysqlclient ${EVENT_LIBRARY})
- SET_TARGET_PROPERTIES(async_queries PROPERTIES LINKER_LANGUAGE CXX)
+ CHECK_INCLUDE_FILE(event.h HAVE_EVENT_H)
+ FIND_LIBRARY(EVENT_LIBRARY event)
+ MARK_AS_ADVANCED(EVENT_LIBRARY)
+ IF(HAVE_EVENT_H AND EVENT_LIBRARY)
+ ADD_EXECUTABLE(async_queries async_queries.c)
+ TARGET_LINK_LIBRARIES(async_queries mysqlclient ${EVENT_LIBRARY})
+ SET_TARGET_PROPERTIES(async_queries PROPERTIES LINKER_LANGUAGE CXX)

+ ENDIF()
ENDIF()

0 comments on commit dfcc0c6

Please sign in to comment.