*/*: Bump copyright on files touched this year
[gentoo.git] / dev-db / libiodbc / libiodbc-3.52.12.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 inherit autotools multilib-minimal
7
8 MY_PN="iODBC"
9
10 DESCRIPTION="ODBC Interface for Linux"
11 HOMEPAGE="http://www.iodbc.org/"
12 SRC_URI="https://github.com/openlink/${MY_PN}/archive/v${PV}.zip -> ${P}.zip"
13
14 KEYWORDS="~alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 ~riscv s390 sh sparc x86 ~amd64-linux ~x86-linux ~ppc-macos"
15 LICENSE="|| ( LGPL-2 BSD )"
16 SLOT="0"
17 IUSE="gtk"
18
19 RDEPEND="gtk? ( x11-libs/gtk+:2[${MULTILIB_USEDEP}] )"
20 DEPEND="${RDEPEND}"
21
22 DOCS=( AUTHORS NEWS README )
23
24 S="${WORKDIR}/${MY_PN}-${PV}"
25
26 MULTILIB_CHOST_TOOLS=( /usr/bin/iodbc-config )
27
28 PATCHES=(
29         "${FILESDIR}"/libiodbc-3.52.12-multilib.patch
30         "${FILESDIR}"/libiodbc-3.52.7-debian_bug501100.patch
31         "${FILESDIR}"/libiodbc-3.52.7-debian_bug508480.patch
32         "${FILESDIR}"/libiodbc-3.52.7-unicode_includes.patch
33         "${FILESDIR}"/fix-runpaths-r1.patch
34 )
35
36 src_prepare() {
37         default
38         sed -i.orig \
39                 -e '/^cd "$PREFIX"/,/^esac/d' \
40                 iodbc/install_libodbc.sh || die "sed failed"
41
42         # Without this, automake dies. It's what upstream's autogen.sh does.
43         touch ChangeLog || die "failed to create empty ChangeLog"
44
45         eautoreconf
46 }
47
48 multilib_src_configure() {
49         ECONF_SOURCE="${S}" \
50         econf \
51                 --disable-static \
52                 --enable-odbc3 \
53                 --enable-pthreads \
54                 --with-layout=gentoo \
55                 --with-iodbc-inidir=yes \
56                 $(use_enable gtk gui)
57 }
58
59 multilib_src_install_all() {
60         einstalldocs
61         prune_libtool_files
62
63         # Install lintian overrides
64         insinto /usr/share/lintian/overrides
65         newins debian/iodbc.lintian-overrides iodbc
66         newins debian/libiodbc2.lintian-overrides libiodbc2
67 }