Bump x11/kde4-runtime to version 4.14.3_3
[dports.git] / x11 / rxvt-unicode / Makefile
1 # Created by: gpalmer@FreeBSD.org
2 # $FreeBSD$
3
4 PORTNAME=       rxvt-unicode
5 PORTVERSION=    9.22
6 CATEGORIES=     x11
7 MASTER_SITES=   http://dist.schmorp.de/rxvt-unicode/%SUBDIR%/
8 MASTER_SITE_SUBDIR=     . Attic
9
10 MAINTAINER=     thierry@FreeBSD.org
11 COMMENT=        Clone of the terminal emulator rxvt modified to support Unicode
12
13 LICENSE=        GPLv2
14
15 BUILD_DEPENDS=  ${LOCALBASE}/libdata/pkgconfig/fontconfig.pc:x11-fonts/fontconfig
16 RUN_DEPENDS=    ${LOCALBASE}/bin/fc-cache:x11-fonts/fontconfig
17
18 USES=                   cpe pkgconfig shebangfix tar:bzip2 terminfo
19 USE_XORG=               xpm xft xrender
20 GNU_CONFIGURE=          yes
21 CPPFLAGS+=              -I${LOCALBASE}/include
22 LIBS+=                  -lutil
23 CONFIGURE_ENV=          TIC=${LOCALBASE}/bin/tic
24 CONFIGURE_ARGS=         --enable-everything --with-term=rxvt    \
25                         --with-terminfo=${LOCALBASE}/share/misc/terminfo.db
26 CPE_VENDOR=             marc_lehmann
27
28 OPTIONS_DEFINE= PERL XIM UNICODE3 ISO14755 COMBINING RXVT_SCROLLBAR     \
29                 NEXT_SCROLLBAR XTERM_SCROLLBAR BACKSPACE_KEY DELETE_KEY \
30                 MOUSEWHEEL SMART_RESIZE IMLOCALE_FIX GDK_PIXBUF         \
31                 NOTIFY 256_COLOR DOCS
32
33 SHEBANG_FILES=  ${WRKSRC}/src/perl/*
34 perl_OLD_CMD=   perl
35 perl_CMD=       ${SETENV} perl
36
37 PERL_DESC=              Embedded Perl interpreter
38 XIM_DESC=               Support for XIM (X Input Method) protocol
39 UNICODE3_DESC=          Support Unicode codepoints above 65535
40 ISO14755_DESC=          Support for extended ISO 14755 modes
41 COMBINING_DESC=         Automatic composition of combining chars
42 RXVT_SCROLLBAR_DESC=    Support for the original rxvt scrollbar
43 NEXT_SCROLLBAR_DESC=    Support for a NeXT-like scrollbar
44 XTERM_SCROLLBAR_DESC=   Support for an Xterm-like scrollbar
45 BACKSPACE_KEY_DESC=     Handling of the backspace key by rxvt
46 DELETE_KEY_DESC=        Handling of the delete key by rxvt
47 MOUSEWHEEL_DESC=        Support for scrolling via mouse wheel
48 SMART_RESIZE_DESC=      Smart growth/shrink behaviour
49 IMLOCALE_FIX_DESC=      imlocale encoding conversion fix
50 GDK_PIXBUF_DESC=        Use gdk-pixbuf for background images
51 NOTIFY_DESC=            Freedesktop startup notification support
52 256_COLOR_DESC=         Support for 256 colors
53
54 OPTIONS_DEFAULT=PERL XIM UNICODE3 ISO14755 COMBINING RXVT_SCROLLBAR     \
55                 NEXT_SCROLLBAR XTERM_SCROLLBAR BACKSPACE_KEY DELETE_KEY \
56                 MOUSEWHEEL SMART_RESIZE IMLOCALE_FIX GDK_PIXBUF         \
57                 256_COLOR
58
59 PORTDOCS1=      Changes README.FAQ README.configure
60 PORTDOCS=       README.xvt ${PORTDOCS1}
61
62 .include <bsd.port.options.mk>
63
64 .if ${PORT_OPTIONS:MIMLOCALE_FIX}
65 PATCH_DEPENDS+= p5-Encode-HanExtra>=0:chinese/p5-Encode-HanExtra \
66                 p5-Encode-JIS2K>=0:converters/p5-Encode-JIS2K
67 .endif
68
69 # disable the embedded perl interpreter
70 .if !${PORT_OPTIONS:MPERL}
71 CONFIGURE_ARGS+=        --disable-perl
72 USES+=                  perl5
73 USE_PERL5=              build
74 PLIST_SUB=              PERL="@comment "
75 .else
76 USES+=                  perl5
77 PLIST_SUB=              PERL=""
78 .endif
79
80 # disable XIM (X Input Method) protocol support
81 .if !${PORT_OPTIONS:MXIM}
82 CONFIGURE_ARGS+=        --disable-xim
83 .endif
84
85 # disable support for Unicode codepoints above 65535
86 .if !${PORT_OPTIONS:MUNICODE3}
87 CONFIGURE_ARGS+=        --disable-unicode3
88 .endif
89
90 # disable support for extended ISO 14755 modes
91 .if !${PORT_OPTIONS:MISO14755}
92 CONFIGURE_ARGS+=        --disable-iso14755
93 .endif
94
95 # disable automatic composition of combining characters
96 # into composite characters
97 .if !${PORT_OPTIONS:MCOMBINING}
98 CONFIGURE_ARGS+=        --disable-combining
99 .endif
100
101 # disable support for the original rxvt scrollbar
102 .if !${PORT_OPTIONS:MRXVT_SCROLLBAR}
103 CONFIGURE_ARGS+=        --disable-rxvt-scroll
104 .endif
105
106 # disable support for a NeXT-like scrollbar
107 .if !${PORT_OPTIONS:MNEXT_SCROLLBAR}
108 CONFIGURE_ARGS+=        --disable-next-scroll
109 .endif
110
111 # disable support for an Xterm-like scrollbar
112 .if !${PORT_OPTIONS:MXTERM_SCROLLBAR}
113 CONFIGURE_ARGS+=        --disable-xterm-scroll
114 .endif
115
116 # disable any handling of the backspace key by rxvt
117 # let the X server do it
118 .if !${PORT_OPTIONS:MBACKSPACE_KEY}
119 CONFIGURE_ARGS+=        --disable-backspace-key
120 .endif
121
122 # disable any handling of the delete key by rxvt
123 .if !${PORT_OPTIONS:MDELETE_KEY}
124 CONFIGURE_ARGS+=        --disable-delete-key
125 .endif
126
127 # enable scrolling via mouse wheel or buttons 4 & 5
128 .if !${PORT_OPTIONS:MMOUSEWHEEL}
129 CONFIGURE_ARGS+=        --disable-mousewheel
130 .endif
131
132 # enable smart resize
133 .if !${PORT_OPTIONS:MSMART_RESIZE}
134 CONFIGURE_ARGS+=        --disable-smart-resize
135 .else
136 CONFIGURE_ARGS+=        --enable-smart-resize
137 .endif
138
139 # enable integration with gdk-pixbuf for background images
140 .if !${PORT_OPTIONS:MGDK_PIXBUF}
141 CONFIGURE_ARGS+=        --disable-pixbuf
142 .else
143 USE_GNOME+=             gdkpixbuf2
144 CONFIGURE_ARGS+=        --enable-pixbuf
145 .endif
146
147 # enable startup notification
148 .if !${PORT_OPTIONS:MNOTIFY}
149 CONFIGURE_ARGS+=        --disable-startup-notification
150 .else
151 CONFIGURE_ARGS+=        --enable-startup-notification
152 LIB_DEPENDS+=           libstartup-notification-1.so:x11/startup-notification
153 .endif
154
155 # enable support for 256 colors
156 .if ${PORT_OPTIONS:M256_COLOR}
157 CONFIGURE_ARGS+=        --enable-256-color
158 .endif
159
160 # compile in support for additional codeset groups
161 .if ${PORT_OPTIONS:MENCODING}
162 AVAIL_ENC=      jp jp_ext kr zh zh_ext all
163 . for ENC in ${AVAIL_ENC}
164 .  if (${WITH_ENCODING} == ${ENC})
165 _ENC=           ${ENC}
166 .  endif
167 . endfor
168 . if !defined(_ENC)
169 .  error        Invalid encoding for WITH_ENCODING
170 . endif
171 .else
172 . if defined(PACKAGE_BUILDING)
173 WITH_ENCODING=  all
174 . endif
175 .endif
176 .if ${PORT_OPTIONS:MENCODING}
177 CONFIGURE_ARGS+=        --with-codesets=${WITH_ENCODING}
178 .endif # WITH_ENCODING
179
180 pre-everything::
181 .ifndef(WITH_ENCODING)
182         @${ECHO_MSG} "==> You can compile in support for additional codeset groups by setting the WITH_ENCODING variable"
183         @${ECHO_MSG} '==> Options are: "jp"     common japanese encodings;'
184         @${ECHO_MSG} '                 "jp_ext" rarely used but big japanese encodings;'
185         @${ECHO_MSG} '                 "kr"     korean encodings;'
186         @${ECHO_MSG} '                 "zh"     common chinese encodings;'
187         @${ECHO_MSG} '                 "zh_ext" rarely used but very big chinese encodigs;'
188         @${ECHO_MSG} '                 "all"    all of the above;'
189         @${ECHO_MSG} '==> For example, "WITH_ENCODING=kr" for korean encodings.'
190         @${ECHO_MSG}
191 .endif
192
193 .if ${PORT_OPTIONS:MIMLOCALE_FIX}
194 post-patch:
195         ${PATCH} ${PATCH_ARGS} < ${PATCHDIR}/extra-patch-imlocale
196         cd ${WRKSRC}/src && ./gentables
197 .endif
198
199 pre-configure:
200         ${RM} ${WRKSRC}/src/perl/kuake.orig
201
202 post-build:
203 .if ${PORT_OPTIONS:MDOCS}
204         ${CP} ${PORTDOCS1:S|^|${WRKSRC}/|} ${WRKSRC}/doc
205 .endif
206
207 post-install:
208         ${INSTALL_DATA} ${WRKSRC}/doc/etc/rxvt-unicode.terminfo \
209                 ${STAGEDIR}${PREFIX}/share/misc/
210 .if ${PORT_OPTIONS:MDOCS}
211         ${MKDIR} ${STAGEDIR}${DOCSDIR}
212         ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/doc/|} ${STAGEDIR}${DOCSDIR}
213         @${ECHO_MSG} "===> Documentation installed in ${DOCSDIR}."
214 .endif
215
216 .include <bsd.port.mk>