aboutsummaryrefslogtreecommitdiffstats
path: root/irc/ircII/Makefile
blob: ee99f1ad79466b6f4df8c44e8902bb25186360c9 (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
# Created by: torstenb
# $FreeBSD$

PORTNAME=   ircii
PORTVERSION=    20151120
PORTREVISION=   3
CATEGORIES= irc ipv6
MASTER_SITES=   http://ircii.warped.com/

MAINTAINER= andrew@tao11.riddles.org.uk
COMMENT=    Small and high extensible IRC client

LICENSE=    BSD3CLAUSE

GNU_CONFIGURE=  yes
DATADIR=    ${PREFIX}/share/irc
USES=       iconv ncurses tar:bzip2

OPTIONS_DEFINE= EMACS_KEYS HELP IRCBUG OPENSSL SCRIPTS
OPTIONS_DEFAULT=EMACS_KEYS HELP OPENSSL SCRIPTS
OPTIONS_SUB=    yes

HELP_DESC=  Install ircII help files
EMACS_KEYS_DESC=Use emacs meta keys
IRCBUG_DESC=    Install ircII bug-reporting script
SCRIPTS_DESC=   Install ircII script collection

EMACS_KEYS_CONFIGURE_WITH=  emacs-meta-keys
OPENSSL_USES=           ssl
OPENSSL_CONFIGURE_WITH=     openssl=${OPENSSLBASE}
OPENSSL_LDFLAGS=        -L${OPENSSLLIB}

.include <bsd.port.pre.mk>

# The ordering is very specific. This must come after pre.mk or
# ircII won't link against libssl from ports
CPPFLAGS+=  -I${ICONV_PREFIX}/include
LDFLAGS+=   -L${ICONV_PREFIX}/lib

post-patch:
    @${REINPLACE_CMD} -e '/^mandir =/s/@mandir@/$${DESTDIR}&/' \
        -e '/^LDFLAGS =/s/$$/ -s ${ICONV_LIB}/' \
        -e '/^INCLUDES =/s|$$| -I${ICONV_PREFIX}/include -DHAVE_ICONV_OPEN|' \
        ${WRKSRC}/Makefile.in
    @${REINPLACE_CMD} -e 's|PREFIX/|${PREFIX}/|' ${WRKSRC}/doc/ircII.1

post-install:
    ${MV} -f ${STAGEDIR}${PREFIX}/bin/irc-${PORTVERSION} ${STAGEDIR}${PREFIX}/bin/irc

.include <bsd.port.post.mk>