On Gentoo hardened, precompiled postgres-sdbc drivers from oo aren't functional. In addition, the official site does only provide outdated and incomplete information on how to compile the postgres driver from source. Luckily, the driver is easily available when configures would ask for it. Here is a patch to openoffice-3.2.1-r1.ebuild. With having postgres in USE flags, the sdbc driver will appear in /usr/lib/openoffice/share/extension/install, and can be installed like all other oo extensions using "unopkg add" or using the extension manager built into all oo program. --- a/openoffice-3.2.1-r1.ebuild 2010-11-17 16:05:26.000000000 +0100 +++ b/openoffice-3.2.1-r1.ebuild 2010-12-08 13:45:50.000000000 +0100 @@ -11,7 +11,8 @@ inherit autotools bash-completion check-reqs db-use eutils fdo-mime flag-o-matic java-pkg-opt-2 kde4-base multilib python toolchain-funcs -IUSE="binfilter cups dbus debug eds gnome gstreamer gtk kde ldap nsplugin odk opengl pam templates" +IUSE="binfilter cups dbus debug eds gnome gstreamer gtk kde ldap nsplugin odk +opengl pam templates postgres" MY_PV=3.2.1.6 PATCHLEVEL=OOO320 @@ -136,7 +137,8 @@ sys-apps/shadow[pam] ) java? ( || ( =virtual/jdk-1.6* =virtual/jdk-1.5* ) >=dev-java/ant-core-1.7 ) - ldap? ( net-nds/openldap )" + ldap? ( net-nds/openldap ) + postgres? ( dev-db/postgresql-base )" PROVIDE="virtual/ooo" @@ -316,6 +318,12 @@ # Make sure gnome-users get gtk-support local GTKFLAG="--disable-gtk --disable-cairo --without-system-cairo" { use gtk || use gnome; } && GTKFLAG="--enable-gtk --enable-cairo --with-system-cairo" + + # adding --with-additional-sections=PostgreSQL to ${CONFFILE} has no effect + local WITH_ADDITIONAL_SECTIONS="" + if use postgres; then + WITH_ADDITIONAL_SECTIONS="--with-additional-sections=PostgreSQL" + fi cd "${S}" ./configure --with-distro="Gentoo" \ @@ -345,6 +353,7 @@ --with-system-libwpg \ --mandir=/usr/share/man \ --libdir=/usr/$(get_libdir) \ + ${WITH_ADDITIONAL_SECTIONS} \ || die "Configuration failed!" } @@ -362,6 +371,11 @@ einfo "Preparing Installation" make DESTDIR="${D}" install || die "Installation failed!" + if use postgres; then + cp "${S}/build/OOO320_m19/connectivity/unxlngx6.pro/lib/postgresql-sdbc-0.7.6a.zip" \ + "${D}"/usr/$(get_libdir)/openoffice/share/extension/install/ || die + fi + # Fix the permissions for security reasons chown -RP root:0 "${D}" @@ -393,6 +407,7 @@ elog " *) PDF Import " elog " *) Presentation Console " elog " *) Presentation Minimizer " + use postgres && elog " *) Postgresql sdbc driver " elog elog " Please use the packages provided in " elog " /usr/$(get_libdir)/openoffice/share/extension/install/ "
Created attachment 256633 [details, diff] add support for postgres-sdbc driver to openoffice-3.2.1-r1.ebuild For convience, this is the same patch as posted above, without any bugzilla induced linebreaks
Removing this from hardened, as non-hardened users may want to use an appropriately compiled postgres sdbc driver too.
Fixed in live ebuild, will be shipped with 3.5 and later releases