Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 348140 - [Enh] app-office/openoffice: Include postgresql-sdbc-driver
Summary: [Enh] app-office/openoffice: Include postgresql-sdbc-driver
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Gentoo Office Team
URL: http://dba.openoffice.org/drivers/pos...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-08 13:03 UTC by Hugo Mildenberger
Modified: 2011-11-18 23:12 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
add support for postgres-sdbc driver to openoffice-3.2.1-r1.ebuild (postgres-sdbc-openoffice-3.2.1-r1.patch,2.10 KB, patch)
2010-12-08 13:06 UTC, Hugo Mildenberger
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Hugo Mildenberger 2010-12-08 13:03:41 UTC
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/ "
Comment 1 Hugo Mildenberger 2010-12-08 13:06:22 UTC
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
Comment 2 Hugo Mildenberger 2010-12-12 20:20:05 UTC
Removing this from hardened, as non-hardened users may want to use an appropriately compiled postgres sdbc driver too.
Comment 3 Tomáš Chvátal (RETIRED) gentoo-dev 2011-11-18 23:12:06 UTC
Fixed in live ebuild, will be shipped with 3.5 and later releases