mysql: fix a compile error on some host systems.
[openwrt/svn-archive/archive.git] / libs / mysql / Makefile
index b13b807..3dcae75 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=mysql
 PKG_VERSION:=5.1.53
-PKG_RELEASE:=3
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=\
@@ -21,7 +21,8 @@ PKG_MD5SUM:=e5e7c5b0b5c382489e6a66778703bc46
 
 PKG_BUILD_DEPENDS:=libncurses libreadline
 PKG_BUILD_PARALLEL:=1
-PKG_FIXUP:=libtool
+
+PKG_FIXUP:=libtool no-autoreconf
 
 include $(INCLUDE_DIR)/package.mk
 
@@ -55,6 +56,8 @@ define Package/libmysqlclient_r
   TITLE += threadsafe
 endef
 
+TARGET_CXX=g++-uc
+
 CONFIGURE_VARS += \
         CXXFLAGS="$$$$CXXFLAGS -fno-builtin -fno-rtti -nostdinc++"  \
         CPPFLAGS="$$$$CPPFLAGS -I$(STAGING_DIR)/usr/include/uClibc++" \
@@ -117,10 +120,10 @@ define Build/Compile
                DESTDIR="$(PKG_INSTALL_DIR)" \
                install
        $(MAKE) $(PKG_JOBS) -C "$(PKG_BUILD_DIR)/libmysql" \
-               CC="$(HOSTCC)" \
-               LINK="$(HOSTCC) -o conf_to_src -lc" \
-               CFLAGS="" \
-               CPPFLAGS="" \
+               CC="g++" \
+               CFLAGS="$(HOST_CFLAGS)" \
+               CPPFLAGS="$(HOST_CFLAGS)" \
+               LDFLAGS="$(HOST_LDFLAGS)" \
                conf_to_src
        $(MAKE) $(PKG_JOBS) -C "$(PKG_BUILD_DIR)" \
                SUBDIRS="libmysql" \
@@ -188,6 +191,8 @@ define Package/mysql-server/install
        $(INSTALL_DIR) $(1)/usr/share/mysql/english
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/share/mysql/english/errmsg.sys $(1)/usr/share/mysql/english
        $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/share/mysql/fill_help_tables.sql $(1)/usr/share/mysql/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/share/mysql/mysql_system_tables.sql $(1)/usr/share/mysql/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/share/mysql/mysql_system_tables_data.sql $(1)/usr/share/mysql/
 endef
 
 $(eval $(call BuildPackage,mysql-server))