summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2012-01-23 15:08:36 +0100
committerStephan Bergmann <sbergman@redhat.com>2012-01-23 18:07:52 +0100
commit3a7ae48b6f610899200ae2800706533f7c4c9f80 (patch)
tree6e00a466a3af145e83eb6490b65af1abca7cbc81 /connectivity
parent2ec3bc43e1d00ae1911397883976c3724f0bfe14 (diff)
fdo#45090: Changed postgresql-sdbc from bundled oxt to proper optional part.
Replaced --enable-ext-postgresql-sdbc with --disable-postgresql-sdbc. Renamed postgresql-sdbc.uno{.ini,rc} to consistent postgresql-sdbc.ini (which made the code a little easier). Signed-off-by: Fridrich Štrba <fridrich.strba@bluewin.ch>
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/prj/d.lst6
-rw-r--r--connectivity/source/drivers/postgresql/description.xml17
-rw-r--r--connectivity/source/drivers/postgresql/description/description_en-US.txt1
-rw-r--r--connectivity/source/drivers/postgresql/makefile.mk81
-rw-r--r--connectivity/source/drivers/postgresql/manifest.xml10
-rw-r--r--connectivity/source/drivers/postgresql/postgresql-sdbc-impl.component35
-rw-r--r--connectivity/source/drivers/postgresql/postgresql-sdbc.component35
-rw-r--r--connectivity/source/drivers/postgresql/postgresql-sdbc.ini (renamed from connectivity/source/drivers/postgresql/postgresql-sdbc.uno)0
-rw-r--r--connectivity/source/drivers/postgresql/pq_connection.cxx15
-rw-r--r--connectivity/source/drivers/postgresql/pq_driver.cxx13
10 files changed, 103 insertions, 110 deletions
diff --git a/connectivity/prj/d.lst b/connectivity/prj/d.lst
index 954a89dc1d12..b80de856b5d9 100644
--- a/connectivity/prj/d.lst
+++ b/connectivity/prj/d.lst
@@ -1,7 +1,6 @@
..\%__SRC%\bin\*.dll %_DEST%\bin\*.dll
..\%__SRC%\bin\*.res %_DEST%\bin\*.res
-..\%__SRC%\lib\lib*.so %_DEST%\lib\lib*.so
-..\%__SRC%\lib\lib*.a %_DEST%\lib\lib*.a
+..\%__SRC%\lib\*.so %_DEST%\lib\*.so
..\%__SRC%\lib\*.dylib %_DEST%\lib\*.dylib
..\%__SRC%\lib\*.jnilib %_DEST%\lib\*.jnilib
..\%__SRC%\lib\*.a %_DEST%\lib\*.a
@@ -53,3 +52,6 @@ mkdir: %_DEST%\xml\registry\spool\DataAccess
..\%__SRC%\misc\mysql.component %_DEST%\xml\mysql.component
..\%__SRC%\misc\odbc.component %_DEST%\xml\odbc.component
..\%__SRC%\misc\sdbc2.component %_DEST%\xml\sdbc2.component
+
+..\%__SRC%\misc\postgresql-sdbc.rdb %_DEST%\xml\postgresql-sdbc.rdb
+..\source\drivers\postgresql\postgresql-sdbc.ini %_DEST%\bin\postgresql-sdbc.ini
diff --git a/connectivity/source/drivers/postgresql/description.xml b/connectivity/source/drivers/postgresql/description.xml
deleted file mode 100644
index 8a1e292cf7ac..000000000000
--- a/connectivity/source/drivers/postgresql/description.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<description xmlns="http://openoffice.org/extensions/description/2006" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dep="http://openoffice.org/extensions/description/2006">
- <version value="@EXTENSION_VERSION@" />
- <identifier value="postgresql-sdbc" />
- <display-name>
- <name lang="en-US">PostgreSQL-SDBC Driver</name>
- </display-name>
- <dependencies>
- <OpenOffice.org-minimal-version value="3.3" dep:name="OpenOffice.org 3.3"/>
- </dependencies>
- <publisher>
- <name xlink:href="http://www.documentfoundation.org" lang="en-US">The Document Foundation</name>
- </publisher>
- <extension-description>
- <src lang="en-US" xlink:href="description/description_en-US.txt"/>
- </extension-description>
-</description>
diff --git a/connectivity/source/drivers/postgresql/description/description_en-US.txt b/connectivity/source/drivers/postgresql/description/description_en-US.txt
deleted file mode 100644
index f35751462c14..000000000000
--- a/connectivity/source/drivers/postgresql/description/description_en-US.txt
+++ /dev/null
@@ -1 +0,0 @@
-A native PostgreSQL database driver for LibreOffice. It is faster, seamlessly integrated and there is no need to install and setup a JDBC or ODBC driver separately. Compatible with PostgreSQL version 8.4 and later.
diff --git a/connectivity/source/drivers/postgresql/makefile.mk b/connectivity/source/drivers/postgresql/makefile.mk
index cc6a4df2d485..d4b54c8953b1 100644
--- a/connectivity/source/drivers/postgresql/makefile.mk
+++ b/connectivity/source/drivers/postgresql/makefile.mk
@@ -63,7 +63,7 @@ NO_DEFAULT_STL=TRUE
# --- Settings -----------------------------------------------------
-.INCLUDE : settings.mk
+.INCLUDE: $(PRJ)/makefile.pmk
.IF "$(BUILD_POSTGRESQL_SDBC)" == "YES"
@@ -75,7 +75,6 @@ DLLPRE=
PQ_SDBC_MAJOR=0
PQ_SDBC_MINOR=8
PQ_SDBC_MICRO=2
-PQ_SDBC_VERSION=$(PQ_SDBC_MAJOR).$(PQ_SDBC_MINOR).$(PQ_SDBC_MICRO)
LIBPQ_DEP_LIBS=
.IF "$(SYSTEM_POSTGRESQL)"=="YES"
@@ -117,7 +116,7 @@ SHL1STDLIBS= \
SHL1LIBS= $(LIB1TARGET)
SHL1DEF= $(MISC)$/$(SHL1TARGET).def
DEF1NAME= $(SHL1TARGET)
-SHL1VERSIONMAP=$(SOLARENV)$/src$/reg-component.map
+SHL1VERSIONMAP=$(SOLARENV)$/src$/component.map
SHL2TARGET=postgresql-sdbc-impl.uno
LIB2TARGET=$(SLB)$/$(SHL2TARGET).lib
@@ -168,63 +167,39 @@ SHL2STDLIBS= \
SHL2LIBS= $(LIB2TARGET)
SHL2DEF= $(MISC)$/$(SHL2TARGET).def
DEF2NAME= $(SHL2TARGET)
-SHL2VERSIONMAP=$(SOLARENV)$/src$/reg-component.map
+SHL2VERSIONMAP=$(SOLARENV)$/src$/component.map
SLOFILES= $(LIB1OBJFILES) $(LIB2OBJFILES)
+.INCLUDE: $(PRJ)/target.pmk
-DRIVERNAME=postgresql-sdbc.oxt
-ALLTAR : $(DLLDEST)$/$(DRIVERNAME)
+ALLTAR : $(MISC)/postgresql-sdbc.rdb
-.ENDIF # BUILD_POSTGRESQL_SDBC
+$(MISC)/postgresql-sdbc.rdb .ERRREMOVE : \
+ $(SOLARENV)/bin/packcomponents.xslt $(MISC)/postgresql-sdbc.input \
+ $(MISC)/postgresql-sdbc.component $(MISC)/postgresql-sdbc-impl.component
+ $(XSLTPROC) --nonet --stringparam prefix $(PWD)/$(MISC)/ -o $@ \
+ $(SOLARENV)/bin/packcomponents.xslt $(MISC)/postgresql-sdbc.input
+
+$(MISC)/postgresql-sdbc.input : makefile.mk
+ echo '<list><filename>postgresql-sdbc.component</filename>' \
+ '<filename>postgresql-sdbc-impl.component</filename></list>' > $@
-# --- Targets ------------------------------------------------------
-.INCLUDE : target.mk
+$(MISC)/postgresql-sdbc.component .ERRREMOVE : \
+ $(SOLARENV)/bin/createcomponent.xslt postgresql-sdbc.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt postgresql-sdbc.component
+
+$(MISC)/postgresql-sdbc-impl.component .ERRREMOVE : \
+ $(SOLARENV)/bin/createcomponent.xslt postgresql-sdbc-impl.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL2TARGETN:f)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt postgresql-sdbc-impl.component
-.IF "$(GUI)" == "UNX"
-INI_EXT=rc
.ELSE
-INI_EXT=.ini
-.ENDIF
-$(DLLDEST)$/$(SHL1TARGET)$(INI_EXT): $(SHL1TARGET)
- +cp $? $@
-
-$(DLLDEST)$/$(DRIVERNAME): \
- $(DLLDEST)$/META-INF$/manifest.xml \
- $(DLLDEST)$/description.xml \
- $(DLLDEST)$/description/description_en-US.txt \
- $(DLLDEST)$/postgresql.xcu \
- $(DLLDEST)$/$(SHL1TARGET)$(DLLPOST) \
- $(DLLDEST)$/$(SHL2TARGET)$(DLLPOST) \
- $(DLLDEST)$/$(SHL1TARGET)$(INI_EXT)
- +cd $(DLLDEST) && \
- zip -r $(DRIVERNAME) \
- META-INF$/manifest.xml \
- $(SHL1TARGET)$(DLLPOST) \
- $(SHL2TARGET)$(DLLPOST) \
- $(SHL1TARGET)$(INI_EXT) \
- description.xml \
- description/description_en-US.txt \
- postgresql.xcu
-
-$(DLLDEST)$/description/% : description/%
- mkdir -p $(DLLDEST)$/description
- +cp $? $@
-
-$(DLLDEST)$/META-INF$/manifest.xml : manifest.xml
- mkdir -p $(DLLDEST)$/META-INF
- +cp $? $@
-
-$(DLLDEST)$/description.xml : description.xml
- +sed -e 's/@EXTENSION_VERSION@/$(PQ_SDBC_VERSION)/' < $? > $@
-
-$(DLLDEST)$/postgresql.xcu : postgresql.xcu
- rm -f $@
- cat postgresql.xcu > $@
-
-strip :
-.IF "$(GUI)"!="WNT"
- strip $(DLLDEST)$/$(SHL1TARGET)$(DLLPOST) $(DLLDEST)$/$(SHL2TARGET)$(DLLPOST)
-.ENDIF
+ALLTAR:
+
+.ENDIF # BUILD_POSTGRESQL_SDBC
diff --git a/connectivity/source/drivers/postgresql/manifest.xml b/connectivity/source/drivers/postgresql/manifest.xml
deleted file mode 100644
index 0a4ddc181a25..000000000000
--- a/connectivity/source/drivers/postgresql/manifest.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE manifest:manifest PUBLIC "-//OpenOffice.org//DTD Manifest 1.0//EN" "Manifest.dtd">
-<manifest:manifest xmlns:manifest="http://openoffice.org/2001/manifest">
- <manifest:file-entry manifest:media-type="application/vnd.sun.star.uno-component;type=native"
- manifest:full-path="postgresql-sdbc-impl.uno.so"/>
- <manifest:file-entry manifest:media-type="application/vnd.sun.star.uno-component;type=native"
- manifest:full-path="postgresql-sdbc.uno.so"/>
- <manifest:file-entry manifest:media-type="application/vnd.sun.star.configuration-data"
- manifest:full-path="postgresql.xcu"/>
-</manifest:manifest>
diff --git a/connectivity/source/drivers/postgresql/postgresql-sdbc-impl.component b/connectivity/source/drivers/postgresql/postgresql-sdbc-impl.component
new file mode 100644
index 000000000000..bd3c38ca639a
--- /dev/null
+++ b/connectivity/source/drivers/postgresql/postgresql-sdbc-impl.component
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Version: MPL 1.1 / GPLv3+ / LGPLv3+
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License or as specified alternatively below. You may obtain a copy of
+ * the License at http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * Major Contributor(s):
+ * [ Copyright (C) 2012 Red Hat, Inc., Stephan Bergmann <sbergman@redhat.com>
+ * (initial developer) ]
+ *
+ * All Rights Reserved.
+ *
+ * For minor contributions see the git repository.
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+ * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+ * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+ * instead of those above.
+-->
+
+<component loader="com.sun.star.loader.SharedLibrary"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="org.openoffice.comp.connectivity.pq.Connection">
+ <service name="com.sun.star.sdbc.Connection"/>
+ </implementation>
+</component>
diff --git a/connectivity/source/drivers/postgresql/postgresql-sdbc.component b/connectivity/source/drivers/postgresql/postgresql-sdbc.component
new file mode 100644
index 000000000000..016029eae227
--- /dev/null
+++ b/connectivity/source/drivers/postgresql/postgresql-sdbc.component
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Version: MPL 1.1 / GPLv3+ / LGPLv3+
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License or as specified alternatively below. You may obtain a copy of
+ * the License at http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * Major Contributor(s):
+ * [ Copyright (C) 2012 Red Hat, Inc., Stephan Bergmann <sbergman@redhat.com>
+ * (initial developer) ]
+ *
+ * All Rights Reserved.
+ *
+ * For minor contributions see the git repository.
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+ * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+ * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+ * instead of those above.
+-->
+
+<component loader="com.sun.star.loader.SharedLibrary"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="org.openoffice.comp.connectivity.pq.Driver">
+ <service name="com.sun.star.sdbc.Driver"/>
+ </implementation>
+</component>
diff --git a/connectivity/source/drivers/postgresql/postgresql-sdbc.uno b/connectivity/source/drivers/postgresql/postgresql-sdbc.ini
index 8d51ca2f7f3c..8d51ca2f7f3c 100644
--- a/connectivity/source/drivers/postgresql/postgresql-sdbc.uno
+++ b/connectivity/source/drivers/postgresql/postgresql-sdbc.ini
diff --git a/connectivity/source/drivers/postgresql/pq_connection.cxx b/connectivity/source/drivers/postgresql/pq_connection.cxx
index ef6ec787db1b..63236b8f9659 100644
--- a/connectivity/source/drivers/postgresql/pq_connection.cxx
+++ b/connectivity/source/drivers/postgresql/pq_connection.cxx
@@ -175,7 +175,7 @@ static sal_Int32 readLogLevelFromConfiguration()
osl_getModuleURLFromAddress(
(void*) readLogLevelFromConfiguration, (rtl_uString **) &fileName );
fileName = OUString( fileName.getStr(), fileName.lastIndexOf( '/' )+1 );
- fileName += OUString::createFromAscii( SAL_CONFIGFILE("postgresql-sdbc.uno") );
+ fileName += OUString::createFromAscii( "postgresql-sdbc.ini" );
rtl::Bootstrap bootstrapHandle( fileName );
OUString str;
@@ -785,19 +785,6 @@ static struct cppu::ImplementationEntry g_entries[] =
extern "C"
{
-//==================================================================================================
-void SAL_CALL component_getImplementationEnvironment(
- const sal_Char ** ppEnvTypeName, uno_Environment ** )
-{
- *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
-}
-//==================================================================================================
-sal_Bool SAL_CALL component_writeInfo(
- void * pServiceManager, void * pRegistryKey )
-{
- return cppu::component_writeInfoHelper( pServiceManager, pRegistryKey, g_entries );
-}
-//==================================================================================================
void * SAL_CALL component_getFactory(
const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey )
{
diff --git a/connectivity/source/drivers/postgresql/pq_driver.cxx b/connectivity/source/drivers/postgresql/pq_driver.cxx
index 146fe99a4fab..93ca427166a7 100644
--- a/connectivity/source/drivers/postgresql/pq_driver.cxx
+++ b/connectivity/source/drivers/postgresql/pq_driver.cxx
@@ -344,19 +344,6 @@ static struct cppu::ImplementationEntry g_entries[] =
extern "C"
{
-//==================================================================================================
-void SAL_CALL component_getImplementationEnvironment(
- const sal_Char ** ppEnvTypeName, uno_Environment ** )
-{
- *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
-}
-//==================================================================================================
-sal_Bool SAL_CALL component_writeInfo(
- void * pServiceManager, void * pRegistryKey )
-{
- return cppu::component_writeInfoHelper( pServiceManager, pRegistryKey, g_entries );
-}
-//==================================================================================================
void * SAL_CALL component_getFactory(
const sal_Char * pImplName, void * pServiceManager, void * )
{