Merge remote-tracking branch 'github/pr/760'.
[gentoo.git] / sys-auth / pam_mysql / pam_mysql-0.7_rc1-r5.ebuild
1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI=5
6 inherit autotools-utils pam
7
8 DESCRIPTION="pam_mysql is a module for pam to authenticate users with mysql"
9 HOMEPAGE="http://pam-mysql.sourceforge.net/"
10
11 SRC_URI="mirror://sourceforge/pam-mysql/${P/_rc/RC}.tar.gz"
12 DEPEND="
13         openssl? ( dev-libs/openssl:0= )
14         >=sys-libs/pam-0.72:0=
15         virtual/mysql:0=
16         "
17 RDEPEND="${DEPEND}"
18 LICENSE="GPL-2"
19 SLOT="0"
20 KEYWORDS="alpha amd64 ppc sparc x86"
21 IUSE="openssl"
22 S="${WORKDIR}/${P/_rc/RC}"
23
24 PATCHES=(
25         "${FILESDIR}/${P}-link-to-pam.diff"
26         "${FILESDIR}/${P}-memleak.diff"
27         )
28 DOCS=( CREDITS ChangeLog NEWS README )
29 AUTOTOOLS_AUTORECONF="yes"
30 AUTOTOOLS_PRUNE_LIBTOOL_FILES="modules"
31
32 src_prepare() {
33         # Update autotools deprecated file name and macro for bug 468750
34         mv configure.in configure.ac || die "configure rename failed"
35         sed -i s/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/ configure.ac || die "sed failed"
36         autotools-utils_src_prepare
37 }
38
39 src_configure() {
40         local myeconfargs=( $(use_with openssl) )
41         autotools-utils_src_configure
42 }
43
44 src_install() {
45         autotools-utils_src_install libdir="$(getpam_mod_dir)"
46 }