aboutsummaryrefslogtreecommitdiffstats
path: root/irc/hexchat/Makefile
blob: 63c6b160c92b36e6ad110358dc15b7b0c797e092 (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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
# Created by: nemysis <nemysis@gmx.ch>
# $FreeBSD$

PORTNAME=   hexchat
PORTVERSION=    2.9.5
CATEGORIES= irc gnome ipv6
MASTER_SITES=   http://dl.hexchat.org/${PORTNAME}/

MAINTAINER= nemysis@gmx.ch
COMMENT=    IRC chat program with GTK and Text Frontend

LICENSE=    GPLv2

LIB_DEPENDS=    proxy:${PORTSDIR}/net/libproxy

USE_XZ=     yes
USES=       desktop-file-utils pathfix pkgconfig
USE_GNOME=  gtk20 libxml2
WANT_PERL=  yes
USE_AUTOTOOLS=  automake autoconf libtool
GNU_CONFIGURE=  yes
CONFIGURE_ARGS+=--enable-gtkfe --disable-sysinfo
USE_GMAKE=  yes
INSTALLS_ICONS= yes

LDFLAGS+=   -pthread

MAN1=       hexchat.1

PORTDOCS=   *

OPTIONS_DEFINE=     NLS SOCKS XFT OPENSSL TEXTFE PYTHON PERL DOAT DBUS NOTIFY

OPTIONS_RADIO=      SPELL
OPTIONS_RADIO_SPELL=    LIBSEXY GTKSPELL STATIC

OPTIONS_DEFAULT=    SOCKS XFT OPENSSL PERL DOAT DBUS NOTIFY LIBSEXY

TEXTFE_DESC=        Build the Text frontend
DOAT_DESC=      Enable Do At plugin
STATIC_DESC=        Enable Spell checking
LIBSEXY_DESC=       Enable Spell checking through Libsexy
GTKSPELL_DESC=      Enable Spell checking through GTKSpell

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MNLS}
USES+=      gettext
PLIST_SUB+= NLS=""
.else
CONFIGURE_ARGS+=--disable-nls
PLIST_SUB+= NLS="@comment "
.endif

.if ! ${PORT_OPTIONS:MLIBSEXY} && ! ${PORT_OPTIONS:MGTKSPELL} && ! ${PORT_OPTIONS:MSTATIC}
CONFIGURE_ARGS+=--enable-spell=none
.endif

.if ${PORT_OPTIONS:MSTATIC}
CONFIGURE_ARGS+=--enable-spell=static
.endif

.if ${PORT_OPTIONS:MLIBSEXY}
LIB_DEPENDS+=   sexy:${PORTSDIR}/x11-toolkits/libsexy
CONFIGURE_ARGS+=--enable-spell=libsexy
.endif

.if ${PORT_OPTIONS:MGTKSPELL}
LIB_DEPENDS+=   gtkspell:${PORTSDIR}/textproc/gtkspell
CONFIGURE_ARGS+=--enable-spell=gtkspell
.endif

.if ${PORT_OPTIONS:MSOCKS}
LIB_DEPENDS+=   socks:${PORTSDIR}/net/dante
CONFIGURE_ARGS+=--enable-socks
.else
CONFIGURE_ARGS+=--disable-socks
.endif

.if ${PORT_OPTIONS:MXFT}
USE_XORG+=  xft
CONFIGURE_ARGS+=--enable-xft
.else
CONFIGURE_ARGS+=--disable-xft
.endif

.if ${PORT_OPTIONS:MOPENSSL}
CONFIGURE_ARGS+=--enable-openssl
PLIST_SUB+= OPENSSL=""
.else
CONFIGURE_ARGS+=--disable-openssl

PLIST_SUB+= OPENSSL="@comment "
.endif

.if ${PORT_OPTIONS:MTEXTFE}
CONFIGURE_ARGS+=--enable-textfe
PLIST_SUB+= TEXTFE=""
.else
CONFIGURE_ARGS+=--disable-textfe
PLIST_SUB+= TEXTFE="@comment "
.endif

.if ${PORT_OPTIONS:MPYTHON}
USE_PYTHON= yes
CONFIGURE_ARGS+=--enable-python
PLIST_SUB+= PYTHON=""
.else
CONFIGURE_ARGS+=--disable-python
PLIST_SUB+= PYTHON="@comment "
.endif

.if ${PORT_OPTIONS:MPERL}
USE_PERL5=  yes
CONFIGURE_ARGS+=--enable-perl
PLIST_SUB+= PERL=""
.else
CONFIGURE_ARGS+=--disable-perl
PLIST_SUB+= PERL="@comment "
.endif

.if ${PORT_OPTIONS:MDOAT}
CONFIGURE_ARGS+=--enable-doat
PLIST_SUB+= DOAT=""
.else
CONFIGURE_ARGS+=--disable-doat
PLIST_SUB+= DOAT="@comment "
.endif

.if ${PORT_OPTIONS:MDBUS}
LIB_DEPENDS+=   dbus-glib-1:${PORTSDIR}/devel/dbus-glib
CONFIGURE_ARGS+=--enable-dbus
USE_GNOME+= gconf2
GCONF_SCHEMAS+= apps_hexchat_url_handler.schemas
PLIST_SUB+= DBUS=""
.else
CONFIGURE_ARGS+=--disable-dbus
PLIST_SUB+= DBUS="@comment "
.endif

.if ${PORT_OPTIONS:MNOTIFY}
RUN_DEPENDS+=   notify-send:${PORTSDIR}/devel/libnotify
CONFIGURE_ARGS+=--enable-libnotify
PLIST_SUB+= NOTIFY=""
.else
CONFIGURE_ARGS+=--disable-libnotify
PLIST_SUB+= NOTIFY="@comment "
.endif

post-patch:
    @${REINPLACE_CMD} -e 's|/bin/bash|/bin/sh|g' ${WRKSRC}/autogen.sh
    @${REINPLACE_CMD} -e 's|po intl|po|g' ${WRKSRC}/Makefile.am

pre-configure:
    @(cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} ./autogen.sh)

post-install:
    ${LN} -sf ${PREFIX}/share/icons/hicolor/48x48/apps/${PORTNAME}.png ${PREFIX}/share/pixmaps

.if ${PORT_OPTIONS:MDOCS}
    @${MKDIR} ${DOCSDIR}
    ${INSTALL_DATA} ${WRKSRC}/share/doc/*.md ${DOCSDIR}
.endif
    @(cd ${PREFIX}/lib/hexchat/plugins/ && ${RM} -f *.a)

.include <bsd.port.mk>