1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
5 inherit autotools eutils
7 DESCRIPTION="Multi-tabbed rxvt clone with XFT, transparent background and CJK support"
8 HOMEPAGE="http://materm.sourceforge.net/"
9 SRC_URI="mirror://sourceforge/materm/${P}.tar.gz"
13 KEYWORDS="~alpha amd64 ~mips ppc x86 ~amd64-linux ~x86-linux ~ppc-macos"
15 L10N_IUSE="l10n_el l10n_ja l10n_ko l10n_th l10n_zh-CN l10n_zh-TW"
16 IUSE="debug png jpeg session truetype menubar utempter xpm ${L10N_IUSE}"
18 RDEPEND="png? ( media-libs/libpng )
19 utempter? ( sys-libs/libutempter )
20 jpeg? ( virtual/jpeg )
21 truetype? ( x11-libs/libXft
24 elibc_uclibc? ( dev-libs/libiconv ) )
27 xpm? ( x11-libs/libXpm )
34 eapply "${FILESDIR}"/${P}-001-fix-segfault-when-wd-empty.patch
35 eapply "${FILESDIR}"/${P}-libpng14.patch
40 if use elibc_uclibc && use truetype; then
41 # It is stated in the README "Multichar support under XFT requires GNU iconv"
42 sed -i -e 's/LIBS = @LIBS@/LIBS = @LIBS@ -liconv/' "${S}/src/Makefile.in"
49 # if you want to pass any other flags, use EXTRA_ECONF.
51 myconf="${myconf} --enable-greek"
54 # --with-encoding=sjis
55 myconf="${myconf} --enable-kanji --with-encoding=eucj"
58 myconf="${myconf} --enable-kr --with-encoding=kr"
61 myconf="${myconf} --enable-thai"
63 if use l10n_zh-CN ; then
65 myconf="${myconf} --enable-gb --with-encoding=gb"
67 if use l10n_zh-TW ; then
68 myconf="${myconf} --enable-big5 --with-encoding=big5"
71 # 2006-03-13 gi1242: mrxvt works best with TERM=rxvt AND correctly set
72 # termcap / terminfo entries. If the rxvt termcap / terminfo entries are
73 # messed up then then it's better to set TERM=xterm.
75 # Provide support for this by setting the or RXVT_TERM environment variables
76 # before emerging, as done in the rxvt ebuild.
78 if [[ -n ${RXVT_TERM} ]]; then
79 myconf="${myconf} --with-term=${RXVT_TERM}"
84 --with-atab-extra=25 \
89 $(use_enable session sessionmgr) \
90 $(use_enable truetype xft) \
91 $(use_enable utempter) \
92 $(use_enable menubar) \
97 emake DESTDIR="${D}" docdir="${EPREFIX}"/usr/share/doc/${PF} install
98 # Give mrxvt perms to update utmp
99 fowners root:utmp /usr/bin/mrxvt
100 fperms g+s /usr/bin/mrxvt
101 dodoc AUTHORS CREDITS ChangeLog FAQ NEWS README* TODO
105 if [[ -z $RXVT_TERM ]]; then
107 einfo "If you experience problems with curses programs, then this is"
108 einfo "most likely because of incorrectly set termcap / terminfo"
109 einfo "entries. To fix this you can dry and run (as user)"
110 einfo " tic /usr/share/doc/${P}/etc/mrxvt.terminfo"
111 einfo "Alternately, run the offending programs with TERM=xterm."
113 einfo "To emerge mrxvt with TERM=xterm by default, set the RXVT_TERM"
114 einfo "environment variable to 'xterm', or your desired default"
115 einfo "terminal name. Alternately you can put 'Mrxvt.termName: xterm'"
116 einfo "in your ~/.mrxvtrc, or /etc/mrxvt/mrxvtrc."