| 1 |
# Copyright 1999-2013 Gentoo Foundation |
| 2 |
# Distributed under the terms of the GNU General Public License v2 |
| 3 |
# $Header: $ |
| 4 |
|
| 5 |
EAPI="5" |
| 6 |
|
| 7 |
inherit autotools eutils |
| 8 |
|
| 9 |
MY_PN="iODBC" |
| 10 |
|
| 11 |
DESCRIPTION="ODBC Interface for Linux." |
| 12 |
HOMEPAGE="http://www.iodbc.org/" |
| 13 |
SRC_URI="https://github.com/openlink/${MY_PN}/archive/v${PV}.zip -> ${P}.zip" |
| 14 |
|
| 15 |
KEYWORDS="~amd64 ~x86" |
| 16 |
LICENSE="|| ( LGPL-2 BSD )" |
| 17 |
SLOT="0" |
| 18 |
IUSE="gtk static-libs" |
| 19 |
|
| 20 |
RDEPEND=">=sys-libs/readline-4.1 |
| 21 |
>=sys-libs/ncurses-5.2 |
| 22 |
gtk? ( x11-libs/gtk+:2 )" |
| 23 |
|
| 24 |
DEPEND="app-admin/chrpath |
| 25 |
${RDEPEND}" |
| 26 |
|
| 27 |
DOCS="AUTHORS ChangeLog NEWS README" |
| 28 |
|
| 29 |
S="${WORKDIR}/${MY_PN}-${PV}" |
| 30 |
|
| 31 |
src_prepare() { |
| 32 |
sed -i.orig \ |
| 33 |
-e '/^cd "$PREFIX"/,/^esac/d' \ |
| 34 |
iodbc/install_libodbc.sh || die "sed failed" |
| 35 |
epatch \ |
| 36 |
"${FILESDIR}"/libiodbc-3.52.7-debian_bug501100.patch \ |
| 37 |
"${FILESDIR}"/libiodbc-3.52.7-debian_bug508480.patch \ |
| 38 |
"${FILESDIR}"/libiodbc-3.52.7-gtk.patch \ |
| 39 |
"${FILESDIR}"/libiodbc-3.52.7-multilib.patch \ |
| 40 |
"${FILESDIR}"/libiodbc-3.52.7-unicode_includes.patch \ |
| 41 |
"${FILESDIR}"/libiodbc-3.52.8-gtk-parallel-make.patch \ |
| 42 |
"${FILESDIR}"/libiodbc-3.52.8-runtime-failures.patch |
| 43 |
chmod -x include/*.h || die |
| 44 |
eautoreconf |
| 45 |
} |
| 46 |
|
| 47 |
src_configure() { |
| 48 |
econf \ |
| 49 |
--enable-odbc3 \ |
| 50 |
--enable-pthreads \ |
| 51 |
--with-layout=gentoo \ |
| 52 |
--with-iodbc-inidir=yes \ |
| 53 |
$(use_enable gtk gui) \ |
| 54 |
$(use_enable static-libs static) |
| 55 |
} |
| 56 |
|
| 57 |
src_install() { |
| 58 |
default |
| 59 |
prune_libtool_files |
| 60 |
|
| 61 |
# Install lintian overrides |
| 62 |
insinto /usr/share/lintian/overrides |
| 63 |
newins debian/iodbc.lintian-overrides iodbc |
| 64 |
newins debian/libiodbc2.lintian-overrides libiodbc2 |
| 65 |
|
| 66 |
# Remove rpaths to fix insecure RUNPATHS - bug 421603 |
| 67 |
chrpath --delete "${D}"/usr/bin/iodbctest |
| 68 |
chrpath --delete "${D}"/usr/bin/iodbctestw |
| 69 |
} |