incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r1201714 - in /incubator/ooo/trunk/main: configure.in mysqlc/prj/build.lst mysqlc/source/makefile.mk mysqlc/source/mysqlc_driver.cxx mysqlc/source/mysqlc_driver.hxx mysqlcppconn/ ooo.lst
Date Mon, 14 Nov 2011 14:10:43 GMT
Author: jsc
Date: Mon Nov 14 14:10:42 2011
New Revision: 1201714

URL: http://svn.apache.org/viewvc?rev=1201714&view=rev
Log:
118594, remove license incompatible mysql connector, applied patch, thanks to Andre Fischer
(af)

Removed:
    incubator/ooo/trunk/main/mysqlcppconn/
Modified:
    incubator/ooo/trunk/main/configure.in
    incubator/ooo/trunk/main/mysqlc/prj/build.lst
    incubator/ooo/trunk/main/mysqlc/source/makefile.mk
    incubator/ooo/trunk/main/mysqlc/source/mysqlc_driver.cxx
    incubator/ooo/trunk/main/mysqlc/source/mysqlc_driver.hxx
    incubator/ooo/trunk/main/ooo.lst

Modified: incubator/ooo/trunk/main/configure.in
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/configure.in?rev=1201714&r1=1201713&r2=1201714&view=diff
==============================================================================
--- incubator/ooo/trunk/main/configure.in (original)
+++ incubator/ooo/trunk/main/configure.in Mon Nov 14 14:10:42 2011
@@ -3975,6 +3975,9 @@ if test -n "$with_system_mysql" -o -n "$
 	SYSTEM_MYSQL=YES
 	AC_PATH_PROG( MYSQLCONFIG, mysql_config)
 	AC_MSG_CHECKING([MySQL version])
+	if test -z "$MYSQLCONFIG" -o ! -x "$MYSQLCONFIG" ; then
+		AC_MSG_ERROR([can not find/execute mysql_config]);
+	fi
 	MYSQL_VERSION=`$MYSQLCONFIG --version` 
 	MYSQL_MAJOR=`$MYSQLCONFIG --version | cut -d"." -f1`
 	if test "$MYSQL_MAJOR" -ge "5"; then
@@ -4048,15 +4051,8 @@ int main(int argc, char **argv) {
         AC_LANG_POP([C++])
 
 else
-	AC_MSG_RESULT([internal])
-        AC_MSG_CHECKING([for mysqlcppconn module])
-        if test -d mysqlcppconn; then
-          AC_MSG_RESULT([OK])
-        else
-          AC_MSG_ERROR([not existing. get it (did you get the -extensions tarball?)])
-        fi
-	BUILD_TYPE="$BUILD_TYPE MYSQLCPPCONN"
-	SYSTEM_MYSQL_CPPCONN=NO
+	AC_MSG_RESULT([no])
+	SYSTEM_MYSQL_CPPCONN=
 fi
 AC_LANG_POP([C++])
 AC_SUBST(SYSTEM_MYSQL_CPPCONN)

Modified: incubator/ooo/trunk/main/mysqlc/prj/build.lst
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/mysqlc/prj/build.lst?rev=1201714&r1=1201713&r2=1201714&view=diff
==============================================================================
--- incubator/ooo/trunk/main/mysqlc/prj/build.lst (original)
+++ incubator/ooo/trunk/main/mysqlc/prj/build.lst Mon Nov 14 14:10:42 2011
@@ -1,3 +1,3 @@
-mc	mysqlc	:	solenv MYSQLCPPCONN:mysqlcppconn offuh cppu soltools cppuhelper readlicense_oo
NULL
+mc	mysqlc	:	solenv offuh cppu soltools cppuhelper readlicense_oo NULL
 ch	mysqlc              usr1    -	all mc_mkout NULL
 mc	mysqlc\source       nmake   -   all mc_source NULL

Modified: incubator/ooo/trunk/main/mysqlc/source/makefile.mk
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/mysqlc/source/makefile.mk?rev=1201714&r1=1201713&r2=1201714&view=diff
==============================================================================
--- incubator/ooo/trunk/main/mysqlc/source/makefile.mk (original)
+++ incubator/ooo/trunk/main/mysqlc/source/makefile.mk Mon Nov 14 14:10:42 2011
@@ -112,9 +112,7 @@ CFLAGS+=-DSYSTEM_MYSQL_CPPCONN
 .ENDIF
 
 CDEFS+=-DCPPDBC_EXPORTS -DCPPCONN_LIB_BUILD
-.IF "$(SYSTEM_MYSQL_CPPCONN)" != "YES"
-CDEFS += -DCPPCONN_LIB=\"$(DLLPRE)mysqlcppconn$(DLLPOST)\"
-.ELSE
+.IF "$(SYSTEM_MYSQL_CPPCONN)" == "YES"
 CDEFS += -DCPPCONN_LIB=\"$(shell readlink /usr/lib/libmysqlcppconn.so)\"
 .IF "$(USE_SYSTEM_STL)"!="YES"
 CDEFS += -DADAPT_EXT_STL
@@ -122,12 +120,7 @@ CDEFS += -DADAPT_EXT_STL
 .ENDIF
 
 # --------------- MySQL settings ------------------
-.IF "$(GUI)"=="WNT"
-  MYSQL_INC=-I$(SOLARINCDIR)$/mysqlcppconn -I$(SOLARINCDIR)$/mysqlcppconn/cppconn -I$(MYSQL_INCDIR)
-  MYSQL_LIB=$(MYSQL_LIBDIR)$/libmysql.lib
-  MYSQL_LIBFILE=$(MYSQL_LIBDIR)$/libmysql.dll
-  MYSQL_CPPCONNFILE=$(SOLARBINDIR)$/$(DLLPRE)mysqlcppconn$(DLLPOST)
-.ELSE
+.IF "$(GUI)"!="WNT"
   .IF "$(SYSTEM_MYSQL)" != "YES"
     MYSQL_INC+=-I$(MYSQL_INCDIR)
     .IF "$(OS)"=="MACOSX"
@@ -140,20 +133,7 @@ CDEFS += -DADAPT_EXT_STL
     EXTRALIBPATHS=-L$(MYSQL_LIBDIR)
   .ENDIF
 
-  .IF "$(SYSTEM_MYSQL_CPPCONN)" != "YES"
-    .IF "$(OS)"=="MACOSX" || "$(OS)" == "SOLARIS"
-      MYSQL_LIB+=-lz -lm
-    .ELSE
-      MYSQL_LIB+=-rdynamic -lz -lcrypt -lnsl -lm
-    .ENDIF
-    MYSQL_CPPCONNFILE=$(SOLARLIBDIR)$/$(DLLPRE)mysqlcppconn$(DLLPOST)
-  .ELSE
     MYSQL_CPPCONN_LIB+=-lmysqlcppconn
-  .ENDIF
-.ENDIF
-
-.IF "$(SYSTEM_MYSQL_CPPCONN)" != "YES"
-  MYSQL_INC+=-I$(SOLARINCDIR)$/mysqlcppconn -I$(SOLARINCDIR)$/mysqlcppconn/cppconn
 .ENDIF
 
 CFLAGS+=-I..$/..$/inc $(MYSQL_INC) \
@@ -258,10 +238,6 @@ EXTENSION_PACKDEPS=makefile.mk $(COMPONE
 EXTENSION_PACKDEPS+=$(COMPONENT_MYSQL_LIBFILE)
 .ENDIF
 
-.IF "$(SYSTEM_MYSQL_CPPCONN)" != "YES"
-EXTENSION_PACKDEPS+=$(COMPONENT_MYSQL_CPPCONN_FILE)
-.ENDIF
-
 # --- Targets ------------------------------------------------------
 .INCLUDE : extension_pre.mk
 .INCLUDE : target.mk
@@ -317,16 +293,6 @@ $(COMPONENT_MYSQL_LIBFILE): $(MYSQL_LIBF
     .ENDIF
 .ENDIF
 
-.IF "$(SYSTEM_MYSQL_CPPCONN)" != "YES"
-# --- the MySQL cppconn lib needs to be copied
-$(COMPONENT_MYSQL_CPPCONN_FILE): $(MYSQL_CPPCONNFILE)
-	@@-$(MKDIRHIER) $(@:d)
-	@$(COPY) $< $@ > $(NULLDEV)
-    .IF "$(OS)" == "MACOSX"
-        install_name_tool -change $(MYSQL_LIBFILE:f) @loader_path/$(MYSQL_LIBFILE:f) $@
-    .ENDIF
-.ENDIF
-
 .IF "$(OS)" == "MACOSX"
 $(EXTENSION_TARGET): adjust_libmysql_path
 

Modified: incubator/ooo/trunk/main/mysqlc/source/mysqlc_driver.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/mysqlc/source/mysqlc_driver.cxx?rev=1201714&r1=1201713&r2=1201714&view=diff
==============================================================================
--- incubator/ooo/trunk/main/mysqlc/source/mysqlc_driver.cxx (original)
+++ incubator/ooo/trunk/main/mysqlc/source/mysqlc_driver.cxx Mon Nov 14 14:10:42 2011
@@ -40,9 +40,7 @@ using ::rtl::OUString;
 
 #include <preextstl.h>
 #include <cppconn/exception.h>
-#ifdef SYSTEM_MYSQL_CPPCONN
-    #include <mysql_driver.h>
-#endif
+#include <mysql_driver.h>
 #include <postextstl.h>
 
 
@@ -50,10 +48,6 @@ using ::rtl::OUString;
 MysqlCDriver::MysqlCDriver(const Reference< XMultiServiceFactory >& _rxFactory)
 	: ODriver_BASE(m_aMutex)
     ,m_xFactory(_rxFactory)
-#ifndef SYSTEM_MYSQL_CPPCONN
-    ,m_hCppConnModule( NULL )
-    ,m_bAttemptedLoadCppConn( false )
-#endif
 {
 	OSL_TRACE("MysqlCDriver::MysqlCDriver");
 	cppDriver = NULL;
@@ -146,48 +140,7 @@ extern "C" { static void SAL_CALL thisMo
 
 void MysqlCDriver::impl_initCppConn_lck_throw()
 {
-#ifdef SYSTEM_MYSQL_CPPCONN
     cppDriver = get_driver_instance();
-#else
-    if ( !m_bAttemptedLoadCppConn )
-    {
-        const ::rtl::OUString sModuleName = ::rtl::OUString::createFromAscii( CPPCONN_LIB
);
-        m_hCppConnModule = osl_loadModuleRelative( &thisModule, sModuleName.pData, 0
);
-        m_bAttemptedLoadCppConn = true;
-    }
-
-    // attempted to load - was it successful?
-    if ( !m_hCppConnModule )
-    {
-        OSL_ENSURE( false, "MysqlCDriver::impl_initCppConn_lck_throw: could not load the
" CPPCONN_LIB " library!");
-        throw SQLException(
-            ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Unable to load the " CPPCONN_LIB
" library." ) ),
-            *this,
-            ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "08001" ) ),  // "unable to connect"
-            0,
-            Any()
-        );
-    }
-
-    // find the factory symbol
-    const ::rtl::OUString sSymbolName = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "sql_mysql_get_driver_instance"
) );
-	typedef void* (* FGetMySQLDriver)();
-
-    const FGetMySQLDriver pFactoryFunction = (FGetMySQLDriver)( osl_getFunctionSymbol( m_hCppConnModule,
sSymbolName.pData ) );
-    if ( !pFactoryFunction )
-    {
-        OSL_ENSURE( false, "MysqlCDriver::impl_initCppConn_lck_throw: could not find the
factory symbol in " CPPCONN_LIB "!");
-        throw SQLException(
-            ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( CPPCONN_LIB " is invalid: missing
the driver factory function." ) ),
-            *this,
-            ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "08001" ) ),  // "unable to connect"
-            0,
-            Any()
-        );
-    }
-
-    cppDriver = static_cast< sql::Driver* >( (*pFactoryFunction)() );
-#endif
     if ( !cppDriver )
     {
         throw SQLException(

Modified: incubator/ooo/trunk/main/mysqlc/source/mysqlc_driver.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/mysqlc/source/mysqlc_driver.hxx?rev=1201714&r1=1201713&r2=1201714&view=diff
==============================================================================
--- incubator/ooo/trunk/main/mysqlc/source/mysqlc_driver.hxx (original)
+++ incubator/ooo/trunk/main/mysqlc/source/mysqlc_driver.hxx Mon Nov 14 14:10:42 2011
@@ -66,10 +66,6 @@ namespace connectivity
 			OWeakRefArray	m_xConnections;	// vector containing a list
 											// of all the Connection objects
 											// for this Driver
-#ifndef SYSTEM_MYSQL_CPPCONN
-            oslModule       m_hCppConnModule;
-            bool            m_bAttemptedLoadCppConn;
-#endif
 
 			sql::Driver * cppDriver;
 

Modified: incubator/ooo/trunk/main/ooo.lst
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/ooo.lst?rev=1201714&r1=1201713&r2=1201714&view=diff
==============================================================================
--- incubator/ooo/trunk/main/ooo.lst (original)
+++ incubator/ooo/trunk/main/ooo.lst Mon Nov 14 14:10:42 2011
@@ -53,7 +53,6 @@ fca8706f2c4619e2fa3f8f42f8fc1e9d-rasqal-
 fcc6df1160753d0b8c835d17fdeeb0a7-boost_1_39_0.tar.gz
 fdb27bfe2dbe2e7b57ae194d9bf36bab-SampleICC-1.3.2.tar.gz
 37282537d0ed1a087b1c8f050dc812d9-dejavu-fonts-ttf-2.32.zip
-831126a1ee5af269923cfab6050769fe-mysql-connector-cpp.zip
 067201ea8b126597670b5eff72e1f66c-mythes-1.2.0.tar.gz
 cf8a6967f7de535ae257fa411c98eb88-mdds_0.3.0.tar.bz2
 220035f111ea045a51e290906025e8b5-libpng-1.5.1.tar.gz



Mime
View raw message