1 # Created by: gpalmer@FreeBSD.org
7 MASTER_SITES= http://dist.schmorp.de/rxvt-unicode/%SUBDIR%/
8 MASTER_SITE_SUBDIR= . Attic
10 MAINTAINER= thierry@FreeBSD.org
11 COMMENT= Clone of the terminal emulator rxvt modified to support Unicode
15 BUILD_DEPENDS= ${LOCALBASE}/libdata/pkgconfig/fontconfig.pc:x11-fonts/fontconfig
16 RUN_DEPENDS= ${LOCALBASE}/bin/fc-cache:x11-fonts/fontconfig
18 USES= cpe pkgconfig shebangfix tar:bzip2 terminfo
19 USE_XORG= xpm xft xrender
21 CPPFLAGS+= -I${LOCALBASE}/include
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
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 \
33 SHEBANG_FILES= ${WRKSRC}/src/perl/*
35 perl_CMD= ${SETENV} perl
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
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 \
59 PORTDOCS1= Changes README.FAQ README.configure
60 PORTDOCS= README.xvt ${PORTDOCS1}
62 .include <bsd.port.options.mk>
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
69 # disable the embedded perl interpreter
70 .if !${PORT_OPTIONS:MPERL}
71 CONFIGURE_ARGS+= --disable-perl
74 PLIST_SUB= PERL="@comment "
80 # disable XIM (X Input Method) protocol support
81 .if !${PORT_OPTIONS:MXIM}
82 CONFIGURE_ARGS+= --disable-xim
85 # disable support for Unicode codepoints above 65535
86 .if !${PORT_OPTIONS:MUNICODE3}
87 CONFIGURE_ARGS+= --disable-unicode3
90 # disable support for extended ISO 14755 modes
91 .if !${PORT_OPTIONS:MISO14755}
92 CONFIGURE_ARGS+= --disable-iso14755
95 # disable automatic composition of combining characters
96 # into composite characters
97 .if !${PORT_OPTIONS:MCOMBINING}
98 CONFIGURE_ARGS+= --disable-combining
101 # disable support for the original rxvt scrollbar
102 .if !${PORT_OPTIONS:MRXVT_SCROLLBAR}
103 CONFIGURE_ARGS+= --disable-rxvt-scroll
106 # disable support for a NeXT-like scrollbar
107 .if !${PORT_OPTIONS:MNEXT_SCROLLBAR}
108 CONFIGURE_ARGS+= --disable-next-scroll
111 # disable support for an Xterm-like scrollbar
112 .if !${PORT_OPTIONS:MXTERM_SCROLLBAR}
113 CONFIGURE_ARGS+= --disable-xterm-scroll
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
122 # disable any handling of the delete key by rxvt
123 .if !${PORT_OPTIONS:MDELETE_KEY}
124 CONFIGURE_ARGS+= --disable-delete-key
127 # enable scrolling via mouse wheel or buttons 4 & 5
128 .if !${PORT_OPTIONS:MMOUSEWHEEL}
129 CONFIGURE_ARGS+= --disable-mousewheel
132 # enable smart resize
133 .if !${PORT_OPTIONS:MSMART_RESIZE}
134 CONFIGURE_ARGS+= --disable-smart-resize
136 CONFIGURE_ARGS+= --enable-smart-resize
139 # enable integration with gdk-pixbuf for background images
140 .if !${PORT_OPTIONS:MGDK_PIXBUF}
141 CONFIGURE_ARGS+= --disable-pixbuf
143 USE_GNOME+= gdkpixbuf2
144 CONFIGURE_ARGS+= --enable-pixbuf
147 # enable startup notification
148 .if !${PORT_OPTIONS:MNOTIFY}
149 CONFIGURE_ARGS+= --disable-startup-notification
151 CONFIGURE_ARGS+= --enable-startup-notification
152 LIB_DEPENDS+= libstartup-notification-1.so:x11/startup-notification
155 # enable support for 256 colors
156 .if ${PORT_OPTIONS:M256_COLOR}
157 CONFIGURE_ARGS+= --enable-256-color
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})
169 . error Invalid encoding for WITH_ENCODING
172 . if defined(PACKAGE_BUILDING)
176 .if ${PORT_OPTIONS:MENCODING}
177 CONFIGURE_ARGS+= --with-codesets=${WITH_ENCODING}
178 .endif # WITH_ENCODING
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.'
193 .if ${PORT_OPTIONS:MIMLOCALE_FIX}
195 ${PATCH} ${PATCH_ARGS} < ${PATCHDIR}/extra-patch-imlocale
196 cd ${WRKSRC}/src && ./gentables
200 ${RM} ${WRKSRC}/src/perl/kuake.orig
203 .if ${PORT_OPTIONS:MDOCS}
204 ${CP} ${PORTDOCS1:S|^|${WRKSRC}/|} ${WRKSRC}/doc
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}."
216 .include <bsd.port.mk>