As discussed in the recent thread starting at <http://lists.freedesktop.org/archives/libreoffice/2012-January/024255.html> "rpath / ... for extensions (and the case of PostgreSQL-SDBC)," it looks like the two bugs

* <https://bugs.freedesktop.org/show_bug.cgi?id=45058> "postgresql-sdbc doesn't work on LO 3.5RC1 win32"

* <https://bugs.freedesktop.org/show_bug.cgi?id=45090> "PostgreSQL-SDBC fails to load on Unix / official binaries: missing libldap50.so"

(of which neither is currently attached to <https://bugs.freedesktop.org/show_bug.cgi?id=37361> "LibreOffice 3.5 most annoying bugs," however) can (only) be solved by changing the postgresql-sdbc functionality from a bundled extension into a proper (optional) part of LO.

The attached 0001-Changed-postgresql-sdbc-from-bundled-oxt-to-proper-o.patch (against recent libreoffice-3-5) does just that. It builds fine on Linux and produces installation sets that properly contain the various files for the postgresql-sdbc functionality.

Whether the functionality actually works there however is not clear to me, as I have no recipe how to test it. Also, it would need to be checked that it also works on other platforms (esp. Windows, also including whether the functionality is offered there correctly as an optional component during installation).

Feel free to review for inclusion in LO 3.5. (I can do the actual push in case enough reviewers approve.)

Stephan
>From f67f580e87a187ea31b09d196029fe646e6f8619 Mon Sep 17 00:00:00 2001
From: Stephan Bergmann <sberg...@redhat.com>
Date: Mon, 23 Jan 2012 15:08:36 +0100
Subject: [PATCH] Changed postgresql-sdbc from bundled oxt to proper optional
 part.

---
 configure.in                                       |   91 +++++++++-----------
 connectivity/prj/d.lst                             |    6 +-
 .../source/drivers/postgresql/description.xml      |   17 ----
 .../postgresql/description/description_en-US.txt   |    1 -
 connectivity/source/drivers/postgresql/makefile.mk |   79 +++++------------
 .../source/drivers/postgresql/manifest.xml         |   10 --
 .../postgresql/postgresql-sdbc-impl.component      |   35 ++++++++
 .../drivers/postgresql/postgresql-sdbc.component   |   35 ++++++++
 .../source/drivers/postgresql/postgresql-sdbc.ini  |    2 +
 .../source/drivers/postgresql/postgresql-sdbc.uno  |    2 -
 .../source/drivers/postgresql/pq_connection.cxx    |   15 +---
 .../source/drivers/postgresql/pq_driver.cxx        |   13 ---
 distro-configs/LibreOfficeLinux.conf               |    1 -
 distro-configs/LibreOfficeMacOSX.conf              |    1 -
 distro-configs/LibreOfficeWin32.conf               |    1 -
 postprocess/packregistry/makefile.mk               |    4 +
 scp2/source/base/makefile.mk                       |    6 +-
 scp2/source/base/postgresqlsdbc.scp                |   71 +++++++++++++++
 scp2/source/base/postgresqlsdbc.ulf                |   36 ++++++++
 scp2/source/extensions/directory_extensions.scp    |   11 ---
 scp2/source/extensions/file_extensions.scp         |   13 ---
 scp2/source/extensions/module_extensions.scp       |   15 ---
 scp2/source/extensions/module_extensions.ulf       |    6 --
 scp2/util/makefile.mk                              |    3 +-
 set_soenv.in                                       |    1 -
 .../source/packinfo/packinfo_extensions.txt        |   15 ---
 setup_native/source/packinfo/packinfo_office.txt   |   15 +++
 27 files changed, 271 insertions(+), 234 deletions(-)
 delete mode 100644 connectivity/source/drivers/postgresql/description.xml
 delete mode 100644 connectivity/source/drivers/postgresql/description/description_en-US.txt
 delete mode 100644 connectivity/source/drivers/postgresql/manifest.xml
 create mode 100644 connectivity/source/drivers/postgresql/postgresql-sdbc-impl.component
 create mode 100644 connectivity/source/drivers/postgresql/postgresql-sdbc.component
 create mode 100644 connectivity/source/drivers/postgresql/postgresql-sdbc.ini
 delete mode 100644 connectivity/source/drivers/postgresql/postgresql-sdbc.uno
 create mode 100644 scp2/source/base/postgresqlsdbc.scp
 create mode 100644 scp2/source/base/postgresqlsdbc.ulf

diff --git a/configure.in b/configure.in
index b15f76c..6bd4aac 100644
--- a/configure.in
+++ b/configure.in
@@ -355,11 +355,6 @@ AC_ARG_ENABLE(ext-pdfimport,
         [Disable the PDF Import extension.])
 )
 
-AC_ARG_ENABLE(ext-postgresql-sdbc,
-    AS_HELP_STRING([--enable-ext-postgresql-sdbc],
-        [Enable the build of the PostgreSQL-SDBC extension.])
-)
-
 AC_ARG_ENABLE(ext-presenter-console,
     AS_HELP_STRING([--disable-ext-presenter-console],
         [Disable the Presenter Console extension.])
@@ -5388,58 +5383,50 @@ dnl ===================================================================
 dnl Check for PostgreSQL stuff
 dnl ===================================================================
 
-if test "x$enable_ext_postgresql_sdbc" = "xyes"; then
-    if test "x$enable_extension_integration" = "xyes"; then
-      SCPDEFS="$SCPDEFS -DWITH_EXTENSION_POSTGRESQL"
+AC_MSG_CHECKING([PostgreSQL C interface])
+if test "$with_system_postgresql" = "yes"; then
+    AC_MSG_RESULT([external PostgreSQL])
+    SYSTEM_POSTGRESQL=YES
+    if test "$_os" = Darwin; then
+       supp_path=''
+       for d in /Library/PostgreSQL/9.*/bin /sw/opt/postgresql/9.*/bin /opt/local/lib/postgresql9*/bin; do
+        pg_supp_path="$PATH_SEPARATOR$d$pg_supp_path"
+       done
     fi
-
-    AC_MSG_CHECKING([PostgreSQL C interface])
-    if test "$with_system_postgresql" = "yes"; then
-        AC_MSG_RESULT([external PostgreSQL])
+    AC_PATH_PROG(PGCONFIG, pg_config, ,$PATH$pg_supp_path)
+    if test -z "$PGCONFIG"; then
+       AC_MSG_ERROR([pg_config needed; set PGCONFIG if not in PATH])
+    fi
+    POSTGRESQL_INC=-I$(${PGCONFIG} --includedir)
+    POSTGRESQL_LIB="-L$(${PGCONFIG} --libdir)"
+else
+    if test -n "$with_libpq_path"; then
         SYSTEM_POSTGRESQL=YES
-        if test "$_os" = Darwin; then
-           supp_path=''
-           for d in /Library/PostgreSQL/9.*/bin /sw/opt/postgresql/9.*/bin /opt/local/lib/postgresql9*/bin; do
-            pg_supp_path="$PATH_SEPARATOR$d$pg_supp_path"
-           done
-        fi
-        AC_PATH_PROG(PGCONFIG, pg_config, ,$PATH$pg_supp_path)
-        if test -z "$PGCONFIG"; then
-           AC_MSG_ERROR([pg_config needed; set PGCONFIG if not in PATH])
-        fi
-        POSTGRESQL_INC=-I$(${PGCONFIG} --includedir)
-        POSTGRESQL_LIB="-L$(${PGCONFIG} --libdir)"
+        AC_MSG_RESULT([external libpq])
+        POSTGRESQL_LIB="-L${with_libpq_path}/lib/"
+        POSTGRESQL_INC=-I"${with_libpq_path}/include/"
     else
-        if test -n "$with_libpq_path"; then
-            SYSTEM_POSTGRESQL=YES
-            AC_MSG_RESULT([external libpq])
-            POSTGRESQL_LIB="-L${with_libpq_path}/lib/"
-            POSTGRESQL_INC=-I"${with_libpq_path}/include/"
-        else
-            SYSTEM_POSTGRESQL=NO
-            AC_MSG_RESULT([internal])
-            POSTGRESQL_LIB=""
-            POSTGRESQL_INC="%OVERRIDE_ME%"
-            BUILD_TYPE="$BUILD_TYPE POSTGRESQL"
-        fi
-    fi
-    if test "${SYSTEM_POSTGRESQL}" = "YES"; then
-        AC_MSG_NOTICE([checking system PostgreSQL prerequisites])
-        save_CFLAGS=$CFLAGS
-        save_CPPFLAGS=$CPPFLAGS
-        save_LIBS=$LIBS
-        CPPFLAGS="${CPPFLAGS} ${POSTGRESQL_INC}"
-        LIBS="${LIBS} ${POSTGRESQL_LIB}"
-        AC_CHECK_HEADER([libpq-fe.h], [], [AC_MSG_ERROR([libpq-fe.h is needed])], [])
-        AC_CHECK_LIB(pq, PQconnectdbParams, [],
-            [AC_MSG_ERROR(libpq not found or too old. Need >= 9.0)], [])
-        CFLAGS=$save_CFLAGS
-        CPPFLAGS=$save_CPPFLAGS
-        LIBS=$save_LIBS
+        SYSTEM_POSTGRESQL=NO
+        AC_MSG_RESULT([internal])
+        POSTGRESQL_LIB=""
+        POSTGRESQL_INC="%OVERRIDE_ME%"
+        BUILD_TYPE="$BUILD_TYPE POSTGRESQL"
     fi
-    BUILD_POSTGRESQL_SDBC=YES
 fi
-AC_SUBST(BUILD_POSTGRESQL_SDBC)
+if test "${SYSTEM_POSTGRESQL}" = "YES"; then
+    AC_MSG_NOTICE([checking system PostgreSQL prerequisites])
+    save_CFLAGS=$CFLAGS
+    save_CPPFLAGS=$CPPFLAGS
+    save_LIBS=$LIBS
+    CPPFLAGS="${CPPFLAGS} ${POSTGRESQL_INC}"
+    LIBS="${LIBS} ${POSTGRESQL_LIB}"
+    AC_CHECK_HEADER([libpq-fe.h], [], [AC_MSG_ERROR([libpq-fe.h is needed])], [])
+    AC_CHECK_LIB(pq, PQconnectdbParams, [],
+        [AC_MSG_ERROR(libpq not found or too old. Need >= 9.0)], [])
+    CFLAGS=$save_CFLAGS
+    CPPFLAGS=$save_CPPFLAGS
+    LIBS=$save_LIBS
+fi
 AC_SUBST(SYSTEM_POSTGRESQL)
 AC_SUBST(POSTGRESQL_INC)
 AC_SUBST(POSTGRESQL_LIB)
diff --git a/connectivity/prj/d.lst b/connectivity/prj/d.lst
index 954a89d..b80de85 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 8a1e292..0000000
--- 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 f357514..0000000
--- 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 cc6a4df..1f43b2c 100644
--- a/connectivity/source/drivers/postgresql/makefile.mk
+++ b/connectivity/source/drivers/postgresql/makefile.mk
@@ -63,9 +63,7 @@ NO_DEFAULT_STL=TRUE
 
 # --- Settings -----------------------------------------------------
 
-.INCLUDE :  settings.mk
-
-.IF "$(BUILD_POSTGRESQL_SDBC)" == "YES"
+.INCLUDE: $(PRJ)/makefile.pmk
 
 #-------------------------------------------------------------------
 
@@ -75,7 +73,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 +114,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 +165,33 @@ 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
 
-# --- Targets ------------------------------------------------------
-.INCLUDE :  target.mk
+$(MISC)/postgresql-sdbc.input : makefile.mk
+    echo '<list><filename>postgresql-sdbc.component</filename>' \
+        '<filename>postgresql-sdbc-impl.component</filename></list>' > $@
 
-.IF "$(GUI)" == "UNX"
-INI_EXT=rc
-.ELSE
-INI_EXT=.ini
-.ENDIF
+$(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
 
-$(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
+$(MISC)/postgresql-sdbc-impl.component .ERRREMOVE : \
+        $(SOLARENV)/bin/createcomponent.xslt postgresql-sdbc-impl.component
+    $(XSLTPROC) --nonet --stringparam uri \
+        '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
+        $(SOLARENV)/bin/createcomponent.xslt postgresql-sdbc-impl.component
diff --git a/connectivity/source/drivers/postgresql/manifest.xml b/connectivity/source/drivers/postgresql/manifest.xml
deleted file mode 100644
index 0a4ddc1..0000000
--- 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 0000000..bd3c38c
--- /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 <sberg...@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 0000000..016029e
--- /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 <sberg...@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.ini b/connectivity/source/drivers/postgresql/postgresql-sdbc.ini
new file mode 100644
index 0000000..8d51ca2
--- /dev/null
+++ b/connectivity/source/drivers/postgresql/postgresql-sdbc.ini
@@ -0,0 +1,2 @@
+[Bootstrap]
+PQ_LOGLEVEL=NONE
diff --git a/connectivity/source/drivers/postgresql/postgresql-sdbc.uno b/connectivity/source/drivers/postgresql/postgresql-sdbc.uno
deleted file mode 100644
index 8d51ca2..0000000
--- a/connectivity/source/drivers/postgresql/postgresql-sdbc.uno
+++ /dev/null
@@ -1,2 +0,0 @@
-[Bootstrap]
-PQ_LOGLEVEL=NONE
diff --git a/connectivity/source/drivers/postgresql/pq_connection.cxx b/connectivity/source/drivers/postgresql/pq_connection.cxx
index ef6ec78..63236b8 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 146fe99..93ca427 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 * )
 {
diff --git a/distro-configs/LibreOfficeLinux.conf b/distro-configs/LibreOfficeLinux.conf
index f498df0..4b77cba 100644
--- a/distro-configs/LibreOfficeLinux.conf
+++ b/distro-configs/LibreOfficeLinux.conf
@@ -36,7 +36,6 @@
 --enable-ext-scripting-beanshell
 --enable-ext-scripting-javascript
 --enable-ext-nlpsolver
---enable-ext-postgresql-sdbc
 --enable-epm
 --enable-cairo
 --enable-binfilter
diff --git a/distro-configs/LibreOfficeMacOSX.conf b/distro-configs/LibreOfficeMacOSX.conf
index 7e7af46..108ef81 100644
--- a/distro-configs/LibreOfficeMacOSX.conf
+++ b/distro-configs/LibreOfficeMacOSX.conf
@@ -10,7 +10,6 @@
 --enable-ext-scripting-beanshell
 --enable-ext-scripting-javascript
 --enable-ext-nlpsolver
---enable-ext-postgresql-sdbc
 --enable-extension-integration
 --enable-online-update
 --without-system-postgresql
diff --git a/distro-configs/LibreOfficeWin32.conf b/distro-configs/LibreOfficeWin32.conf
index fc267e2..f608e9b 100644
--- a/distro-configs/LibreOfficeWin32.conf
+++ b/distro-configs/LibreOfficeWin32.conf
@@ -16,5 +16,4 @@
 --enable-ext-presenter-console
 --enable-ext-pdfimport
 --enable-ext-nlpsolver
---enable-ext-postgresql-sdbc
 --enable-online-update
diff --git a/postprocess/packregistry/makefile.mk b/postprocess/packregistry/makefile.mk
index d82c9ef..1c8a7b8 100644
--- a/postprocess/packregistry/makefile.mk
+++ b/postprocess/packregistry/makefile.mk
@@ -51,6 +51,7 @@ MY_XCDS = \
     $(MISC)/palm.xcd \
     $(MISC)/pocketexcel.xcd \
     $(MISC)/pocketword.xcd \
+    $(MISC)/postgresqlsdbc.xcd \
     $(MISC)/pyuno.xcd \
     $(MISC)/writer.xcd \
     $(MISC)/xsltfilter.xcd
@@ -381,6 +382,9 @@ MY_FILES_pocketword = \
     $(MY_MOD)/fcfg_pocketword_filters.xcu \
     $(MY_MOD)/fcfg_pocketword_types.xcu
 
+MY_DEPS_postgresqlsdbc = main
+MY_FILES_postgresqlsdbc = $(MY_MOD)/DataAccess/postgresql.xcu
+
 MY_DEPS_pyuno = main
 MY_FILES_pyuno = \
     $(MY_MOD)/org/openoffice/Office/Scripting-python.xcu
diff --git a/scp2/source/base/makefile.mk b/scp2/source/base/makefile.mk
index 3386005..e3f3b1a 100644
--- a/scp2/source/base/makefile.mk
+++ b/scp2/source/base/makefile.mk
@@ -43,7 +43,8 @@ SCP_PRODUCT_TYPE=osl
 
 PARFILES= \
         module_base.par             \
-        file_base.par
+        file_base.par               \
+        postgresqlsdbc.par
 
 .IF "$(GUI)"=="WNT"
 PARFILES += \
@@ -54,7 +55,8 @@ PARFILES += \
 ULFFILES= \
         module_base.ulf              \
         registryitem_base.ulf        \
-        folderitem_base.ulf
+        folderitem_base.ulf          \
+        postgresqlsdbc.ulf
 
 # --- File ---------------------------------------------------------
 .INCLUDE :  target.mk
diff --git a/scp2/source/base/postgresqlsdbc.scp b/scp2/source/base/postgresqlsdbc.scp
new file mode 100644
index 0000000..05ea8cf
--- /dev/null
+++ b/scp2/source/base/postgresqlsdbc.scp
@@ -0,0 +1,71 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * 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) 2011 Red Hat, Inc., Stephan Bergmann <sberg...@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.
+ */
+
+#include "macros.inc"
+
+Module gid_Module_Optional_PostgresqlSdbc
+    PackageInfo = "packinfo_office.txt";
+    MOD_NAME_DESC(MODULE_OPTIONAL_POSTGRESQLSDBC);
+    ParentID = gid_Module_Prg_Base_Bin;
+    Files = (gid_File_Lib_PostgresqlSdbc,
+             gid_File_Lib_PostgresqlSdbcImpl,
+             gid_File_PostgresqlSdbc_Ini,
+             gid_File_PostgresqlSdbc_Rdb,
+             gid_File_PostgresqlSdbc_Xcd);
+    Minimal = NO;
+    Default = YES;
+    Styles = ();
+End
+
+SPECIAL_COMPONENT_LIB_FILE(gid_File_Lib_PostgresqlSdbc, postgresql-sdbc.uno)
+
+SPECIAL_COMPONENT_LIB_FILE(gid_File_Lib_PostgresqlSdbcImpl, postgresql-sdbc-impl.uno)
+
+File gid_File_PostgresqlSdbc_Ini
+    TXT_FILE_BODY;
+    Dir = gid_Brand_Dir_Program;
+    Name = "postgresql-sdbc.ini";
+    Styles = (PACKED);
+End
+
+File gid_File_PostgresqlSdbc_Rdb
+    TXT_FILE_BODY;
+    Dir = gid_Brand_Dir_Program_Services;
+    Name = "postgresql-sdbc.rdb";
+    Styles = (PACKED);
+End
+
+File gid_File_PostgresqlSdbc_Xcd
+    TXT_FILE_BODY;
+    Dir = gid_Brand_Dir_Share_Registry;
+    Name = "postgresqlsdbc.xcd";
+    Styles = (PACKED);
+End
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/scp2/source/base/postgresqlsdbc.ulf b/scp2/source/base/postgresqlsdbc.ulf
new file mode 100644
index 0000000..a966062
--- /dev/null
+++ b/scp2/source/base/postgresqlsdbc.ulf
@@ -0,0 +1,36 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * 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) 2011 Red Hat, Inc., Stephan Bergmann <sberg...@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.
+ */
+
+[STR_NAME_MODULE_OPTIONAL_EXTENSIONS_POSTGRESQLSDBC]
+en-US = "PostgreSQL Connector"
+
+[STR_DESC_MODULE_OPTIONAL_EXTENSIONS_POSTGRESQLSDBC]
+en-US = "PostgreSQL Connector"
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/scp2/source/extensions/directory_extensions.scp b/scp2/source/extensions/directory_extensions.scp
index c17ac8c..ca2d2c1 100644
--- a/scp2/source/extensions/directory_extensions.scp
+++ b/scp2/source/extensions/directory_extensions.scp
@@ -209,17 +209,6 @@ End
 
 #endif
 
-/* ** PostgreSQL Connector ** */
-
-#ifdef WITH_EXTENSION_POSTGRESQL
-
-Directory gid_Brand_Dir_Share_Extensions_PostgreSQL
-	ParentID = gid_Brand_Dir_Share_Extensions;
-	DosName = "postgresql-sdbc";
-End
-
-#endif
-
 /* ** MySQL Connector ** */
 
 #ifdef WITH_EXTENSION_MYSQLC
diff --git a/scp2/source/extensions/file_extensions.scp b/scp2/source/extensions/file_extensions.scp
index 439006a..7253295 100644
--- a/scp2/source/extensions/file_extensions.scp
+++ b/scp2/source/extensions/file_extensions.scp
@@ -241,19 +241,6 @@ End
 
 #endif
 
-/* ** PostgreSQL Connector ** */
-
-#ifdef WITH_EXTENSION_POSTGRESQL
-
-File gid_File_Oxt_PostgreSQL
-    TXT_FILE_BODY;
-    Styles = (PACKED, ARCHIVE);
-    Dir = gid_Brand_Dir_Share_Extensions_PostgreSQL;
-    Name = "postgresql-sdbc.oxt";
-End
-
-#endif
-
 /* ** MySQL Connector ** */
 
 #ifdef WITH_EXTENSION_MYSQLC
diff --git a/scp2/source/extensions/module_extensions.scp b/scp2/source/extensions/module_extensions.scp
index 329a499..01d773c 100644
--- a/scp2/source/extensions/module_extensions.scp
+++ b/scp2/source/extensions/module_extensions.scp
@@ -282,21 +282,6 @@ Module gid_Module_Optional_Extensions_LanguageTool
 End
 #endif
 
-/* ** PostgreSQL Connector ** */
-
-#ifdef WITH_EXTENSION_POSTGRESQL
-Module gid_Module_Optional_Extensions_PostgreSQL
- PackageInfo = "packinfo_extensions.txt";
- MOD_NAME_DESC(MODULE_OPTIONAL_EXTENSIONS_POSTGRESQL);
- ParentID = gid_Module_Optional_Extensions;
- Files = (
- gid_File_Oxt_PostgreSQL );
- Minimal = NO;
- Default = YES;
- Styles = ( );
-End
-#endif
-
 /* ** MySQL Connector ** */
 
 #ifdef WITH_EXTENSION_MYSQLC
diff --git a/scp2/source/extensions/module_extensions.ulf b/scp2/source/extensions/module_extensions.ulf
index d6108b0..40d0a0a 100644
--- a/scp2/source/extensions/module_extensions.ulf
+++ b/scp2/source/extensions/module_extensions.ulf
@@ -135,12 +135,6 @@ en-US = "MySQL Connector"
 [STR_DESC_MODULE_OPTIONAL_EXTENSIONS_MYSQLC]
 en-US = "MySQL Connector"
 
-[STR_NAME_MODULE_OPTIONAL_EXTENSIONS_POSTGRESQL]
-en-US = "PostgreSQL Connector"
-
-[STR_DESC_MODULE_OPTIONAL_EXTENSIONS_POSTGRESQL]
-en-US = "PostgreSQL Connector"
-
 [STR_NAME_MODULE_OPTIONAL_EXTENSIONS_OOOBLOGGER]
 en-US = "Metaweblog Support"
 
diff --git a/scp2/util/makefile.mk b/scp2/util/makefile.mk
index 86831d5..8362b6b 100644
--- a/scp2/util/makefile.mk
+++ b/scp2/util/makefile.mk
@@ -84,7 +84,8 @@ SCP1FILES  = installation_ooo.par          \
              module_python_mailmerge.par   \
              file_python.par               \
              profileitem_python.par        \
-             module_accessories.par
+             module_accessories.par        \
+             postgresqlsdbc.par
 .IF "$(WITH_EXTRA_GALLERY)" != ""
 SCP1FILES +=                               \
              module_gallery_accessories.par   \
diff --git a/set_soenv.in b/set_soenv.in
index afaac53..addd9b0 100755
--- a/set_soenv.in
+++ b/set_soenv.in
@@ -1989,7 +1989,6 @@ ToFile( "XINERAMA_LINK",     "@XINERAMA_LINK@",    "e" );
 ToFile( "SYSTEM_REDLAND",    "@SYSTEM_REDLAND@",   "e" );
 ToFile( "REDLAND_CFLAGS",    "@REDLAND_CFLAGS@",   "e" );
 ToFile( "REDLAND_LIBS",      "@REDLAND_LIBS@",     "e" );
-ToFile( "BUILD_POSTGRESQL_SDBC",   "@BUILD_POSTGRESQL_SDBC@", "e" );
 ToFile( "SYSTEM_POSTGRESQL", "@SYSTEM_POSTGRESQL@", "e" );
 ToFile( "POSTGRESQL_INC",    "@POSTGRESQL_INC@",   "e" );
 ToFile( "POSTGRESQL_LIB",    "@POSTGRESQL_LIB@",   "e" );
diff --git a/setup_native/source/packinfo/packinfo_extensions.txt b/setup_native/source/packinfo/packinfo_extensions.txt
index 483154e..7a9e510 100644
--- a/setup_native/source/packinfo/packinfo_extensions.txt
+++ b/setup_native/source/packinfo/packinfo_extensions.txt
@@ -257,21 +257,6 @@ packageversion = "%PACKAGEVERSION"
 End
 
 Start
-module = "gid_Module_Optional_Extensions_PostgreSQL"
-solarispackagename = "%BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-postgresql-sdbc"
-solarisrequires =  "%BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-core01 (Name="Core module for %PRODUCTNAME %PRODUCTVERSION"), %BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-core02 (Name="Core module for %PRODUCTNAME %PRODUCTVERSION"), %BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-core03 (Name="Core module for %PRODUCTNAME %PRODUCTVERSION"), %BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-core04 (Name="Core module for %PRODUCTNAME %PRODUCTVERSION"), %BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-core05 (Name="Core module for %PRODUCTNAME %PRODUCTVERSION"), %BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-core06 (Name="Core module for %PRODUCTNAME %PRODUCTVERSION"), %BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-core07 (Name="Core module for %PRODUCTNAME %PRODUCTVERSION")"
-packagename = "%BASISPACKAGEPREFIX%PRODUCTVERSION-extension-postgresql-sdbc"
-requires = "%BASISPACKAGEPREFIX%PRODUCTVERSION-core01,%BASISPACKAGEPREFIX%PRODUCTVERSION-core02,%BASISPACKAGEPREFIX%PRODUCTVERSION-core03,%BASISPACKAGEPREFIX%PRODUCTVERSION-core04,%BASISPACKAGEPREFIX%PRODUCTVERSION-core05,%BASISPACKAGEPREFIX%PRODUCTVERSION-core06,%BASISPACKAGEPREFIX%PRODUCTVERSION-core07"
-linuxpatchrequires = ""
-copyright = "2000-2008 by Sun Microsystems, Inc.; 2011 by Lionel Elie Mamane and other LibreOffice contributors"
-solariscopyright = "solariscopyrightfile"
-vendor = "The Document Foundation"
-description = "PostgreSQL Connector extension for %PRODUCTNAME %PRODUCTVERSION"
-destpath = "/opt"
-packageversion = "%PACKAGEVERSION"
-End
-
-Start
 module = "gid_Module_Optional_Extensions_MySQLConnector"
 solarispackagename = "%BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-extension-mysql-connector"
 solarisrequires =  "%BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-core01 (Name="Core module for %PRODUCTNAME %PRODUCTVERSION"), %BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-core02 (Name="Core module for %PRODUCTNAME %PRODUCTVERSION"), %BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-core03 (Name="Core module for %PRODUCTNAME %PRODUCTVERSION"), %BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-core04 (Name="Core module for %PRODUCTNAME %PRODUCTVERSION"), %BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-core05 (Name="Core module for %PRODUCTNAME %PRODUCTVERSION"), %BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-core06 (Name="Core module for %PRODUCTNAME %PRODUCTVERSION"), %BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-core07 (Name="Core module for %PRODUCTNAME %PRODUCTVERSION")"
diff --git a/setup_native/source/packinfo/packinfo_office.txt b/setup_native/source/packinfo/packinfo_office.txt
index fe63af9..0ebc0b4 100644
--- a/setup_native/source/packinfo/packinfo_office.txt
+++ b/setup_native/source/packinfo/packinfo_office.txt
@@ -1258,3 +1258,18 @@ description = "OpenGL slide transitions module for %PRODUCTNAME %PRODUCTVERSION"
 destpath = "/opt"
 packageversion = "%ABOUTBOXPRODUCTVERSION"
 End
+
+Start
+module = "gid_Module_Optional_PostgresqlSdbc"
+solarispackagename = "%BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-postgresql-sdbc"
+solarisrequires = "%BASISPACKAGEPREFIX%WITHOUTDOTPRODUCTVERSION-base"
+packagename = "%BASISPACKAGEPREFIX%PRODUCTVERSION-postgresql-sdbc"
+freebsdrequires = "%BASISPACKAGEPREFIX%PRODUCTVERSION-base"
+requires = "%BASISPACKAGEPREFIX%PRODUCTVERSION-base"
+copyright = "2000-2008 by Sun Microsystems, Inc.; 2011 by Lionel Elie Mamane and other LibreOffice contributors"
+solariscopyright = "solariscopyrightfile"
+vendor = "The Document Foundation"
+description = "PostgreSQL Connector extension for %PRODUCTNAME %PRODUCTVERSION"
+destpath = "/opt"
+packageversion = "%PACKAGEVERSION"
+End
-- 
1.7.7.5

_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to