aboutsummaryrefslogtreecommitdiffstats
path: root/security/pam_krb5-rh/Makefile
blob: 17415f7d707502bd98e33ab5d7a3d8a090f6fa45 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# New ports collection makefile for:    pam_krb5
# Date created:             18 October 2011
# Whom:                 Ryan Steinmetz <zi@FreeBSD.org>
#
# $FreeBSD$
#

PORTNAME=   pam_krb5
DISTVERSION=    2.4.4
CATEGORIES= security
MASTER_SITES=   https://fedorahosted.org/released/${PORTNAME}/ \
        http://mirrors.rit.edu/zi/
PKGNAMESUFFIX=  -rh

MAINTAINER= zi@FreeBSD.org
COMMENT=    The Red Hat Pluggable Authentication Module for Kerberos 5

LICENSE=    LGPL21 BSD
LICENSE_COMB=   dual

CONFLICTS=  pam_krb5-4.*

USE_ICONV=  yes
GNU_CONFIGURE=  yes
CONFIGURE_ARGS+=--with-libiconv-prefix=${LOCALBASE} --without-afs \
        --with-libintl-prefix=${LOCALBASE} --with-krb4=no \
        --without-keyutils
LDFLAGS+=   -L${LOCALBASE}/lib

MAN5=       pam_krb5.5
MAN8=       pam_krb5.8 pam_krb5_cchelper.8

.if defined(WITHOUT_NLS)
PLIST_SUB+= NLS="@comment "
CONFIGURE_ARGS+=--disable-nls
.else
PLIST_SUB+= NLS=""
LDFLAGS+=   -lintl
USES+=      gettext
.endif

.include <bsd.port.pre.mk>

.if ${OSVERSION} < 800000
BROKEN=     does not build on FreeBSD 7.x
.endif

post-patch:
    @${REINPLACE_CMD} -e 's|libdir)/security|libdir)|g' ${WRKSRC}/src/Makefile.in
    @${REINPLACE_CMD} -e 's|/lib64/security|${LOCALBASE}/lib|g' \
        ${WRKSRC}/src/*.8
    @${REINPLACE_CMD} -e 's|-ldl||g' ${WRKSRC}/tests/tools/Makefile.in
    @${REINPLACE_CMD} -e 's|PAM_BAD_ITEM|PAM_SYMBOL_ERR|g' ${WRKSRC}/src/conv.c
    @${REINPLACE_CMD} -e 's|PAM_AUTHTOK_RECOVER_ERR|PAM_AUTHTOK_RECOVERY_ERR|g' \
        ${WRKSRC}/src/password.c

.include <bsd.port.post.mk>