2018-01-04 12:44:39 +03:00
|
|
|
# Copyright 1999-2018 Gentoo Foundation
|
2014-12-10 12:21:41 +03:00
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
|
2017-06-07 11:43:44 +03:00
|
|
|
EAPI=6
|
2018-03-20 15:39:47 +03:00
|
|
|
inherit libtool multilib-minimal
|
2014-12-10 12:21:41 +03:00
|
|
|
|
|
|
|
DESCRIPTION="A complete ODBC driver manager"
|
|
|
|
HOMEPAGE="http://www.unixodbc.org/"
|
2017-06-07 11:43:44 +03:00
|
|
|
SRC_URI="ftp://ftp.unixodbc.org/pub/${PN}/${P}.tar.gz"
|
2014-12-10 12:21:41 +03:00
|
|
|
|
|
|
|
LICENSE="GPL-2 LGPL-2.1"
|
|
|
|
SLOT="0"
|
2018-03-20 15:39:47 +03:00
|
|
|
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
2014-12-10 12:21:41 +03:00
|
|
|
IUSE="+minimal odbcmanual static-libs unicode"
|
|
|
|
|
2017-06-07 11:43:44 +03:00
|
|
|
RDEPEND="
|
|
|
|
|| (
|
2014-12-10 12:21:41 +03:00
|
|
|
dev-libs/libltdl:0[${MULTILIB_USEDEP}]
|
|
|
|
>=sys-devel/libtool-2.4.2-r1[${MULTILIB_USEDEP}]
|
|
|
|
)
|
2016-09-19 18:28:09 +03:00
|
|
|
>=sys-libs/readline-6.2_p5-r1:0=[${MULTILIB_USEDEP}]
|
|
|
|
>=sys-libs/ncurses-5.9-r3:0=[${MULTILIB_USEDEP}]
|
2014-12-10 12:21:41 +03:00
|
|
|
>=virtual/libiconv-0-r1[${MULTILIB_USEDEP}]
|
2017-06-07 11:43:44 +03:00
|
|
|
"
|
2014-12-10 12:21:41 +03:00
|
|
|
DEPEND="${RDEPEND}
|
2017-06-07 11:43:44 +03:00
|
|
|
sys-devel/flex
|
|
|
|
"
|
2014-12-10 12:21:41 +03:00
|
|
|
|
|
|
|
MULTILIB_CHOST_TOOLS=( /usr/bin/odbc_config )
|
|
|
|
MULTILIB_WRAPPED_HEADERS=( /usr/include/unixodbc_conf.h )
|
|
|
|
|
2017-06-07 11:43:44 +03:00
|
|
|
multilib_src_configure() {
|
2014-12-10 12:21:41 +03:00
|
|
|
# --enable-driver-conf is --enable-driverc as per configure.in
|
|
|
|
myeconfargs=(
|
|
|
|
--sysconfdir="${EPREFIX}"/etc/${PN}
|
2017-06-07 11:43:44 +03:00
|
|
|
--disable-static
|
2014-12-10 12:21:41 +03:00
|
|
|
--enable-iconv
|
2017-06-07 11:43:44 +03:00
|
|
|
--enable-shared
|
2014-12-10 12:21:41 +03:00
|
|
|
$(use_enable static-libs static)
|
|
|
|
$(use_enable !minimal drivers)
|
|
|
|
$(use_enable !minimal driverc)
|
|
|
|
$(use_with unicode iconv-char-enc UTF8)
|
|
|
|
$(use_with unicode iconv-ucode-enc UTF16LE)
|
|
|
|
)
|
2018-03-20 15:39:47 +03:00
|
|
|
ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
|
2014-12-10 12:21:41 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
multilib_src_install_all() {
|
|
|
|
einstalldocs
|
|
|
|
|
2018-03-20 15:39:47 +03:00
|
|
|
if use odbcmanual ; then
|
|
|
|
# We could simply run "make install-html" if we'd not had
|
|
|
|
# out-of-source builds here.
|
|
|
|
docinto html
|
|
|
|
dodoc -r doc/.
|
|
|
|
find "${ED%/}/usr/share/doc/${PF}/html" -name "Makefile*" -delete || die
|
|
|
|
fi
|
2014-12-10 12:21:41 +03:00
|
|
|
|
2018-03-20 15:39:47 +03:00
|
|
|
use prefix && dodoc README*
|
|
|
|
find "${ED}" -name '*.la' -delete || die
|
2014-12-10 12:21:41 +03:00
|
|
|
}
|