# Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 IUSE="pthreads orathreads" DESCRIPTION="libsqlora8 is a simple C-library to access Oracle databases via the OCI interface" SRC_URI="http://www.poitschke.de/libsqlora8/${P}.tar.gz" HOMEPAGE="http://www.poitschke.de/libsqlora8/index_noframe.html" LICENSE="BSD" SLOT="0" KEYWORDS="x86 ~ppc ~sparc ~mips ~alpha ~arm ~hppa ~amd64 ~ia64" DEPEND="" src_compile() { # Make sure ORACLE_HOME is set if [ -z $ORACLE_HOME ]; then einfo 'libsqlora8 requires that the ORACLE_HOME environment variable be set.' einfo 'Try: "export ORACLE_HOME=/usr/local/oracle" if you do not know what to do.' die 'ORACLE_HOME not set, see above' fi # Add $ORACLE_HOME/lib to LD_LIBRARY_PATH if [ -z $LD_LIBRARY_PATH ]; then LD_LIBRARY_PATH=$ORACLE_HOME/lib else LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH fi export LD_LIBRARY_PATH # Enable POSIX or Oracle threads? with='' if [ `use pthreads` ]; then with='--with-threads=posix' fi if [ `use orathreads` ]; then if [ -n "$with" ]; then einfo 'You cannot have your cake and eat it too!' einfo 'Enable the "pthreads" USE flag for POSIX threads,' einfo '*or* the "orathreads" USE flag for Oracle threads' die 'Both "pthreads" and "orathreads" USE flags set, see above' fi with='--with-threads=oracle' fi # Build econf $with || die "configure failed" make "DESTDIR=${D}" "docdir=${D}/usr/share/doc/${P}" || die "make failed" } src_install () { einstall mv ${D}/usr/share/doc/packages/${PN} ${D}/usr/share/doc/${P} }