blob: a2d46e3a39118a39a0eac7bd6a35c912db2827a9 (
plain)
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
|
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-libs/slang/slang-1.4.9-r1.ebuild,v 1.17 2004/11/07 10:36:44 usata Exp $
inherit eutils
# Patches are taken from http://www.suse.de/~nadvornik/slang/
# They were originally Red Hat and Debian's patches
DESCRIPTION="Console display library used by most text viewer"
HOMEPAGE="http://space.mit.edu/~davis/slang/"
SRC_URI="ftp://space.mit.edu/pub/davis/slang/v1.4/${P}.tar.bz2"
LICENSE="|| ( GPL-2 Artistic )"
SLOT="0"
KEYWORDS="alpha amd64 arm hppa ia64 mips ppc ppc64 ppc-macos s390 sparc x86"
IUSE="cjk unicode"
DEPEND=">=sys-libs/ncurses-5.2-r2"
src_unpack() {
unpack ${P}.tar.bz2
cd ${S}
epatch ${FILESDIR}/${P}.patch
use ppc-macos || epatch ${FILESDIR}/${P}-fsuid.patch
epatch ${FILESDIR}/${P}-autoconf.patch
if use unicode ; then
epatch ${FILESDIR}/slang-debian-utf8.patch
epatch ${FILESDIR}/slang-utf8-acs.patch
epatch ${FILESDIR}/slang-utf8-fix.patch
fi
if use cjk ; then
sed -i \
-e "/SLANG_HAS_KANJI_SUPPORT/s/0/1/" \
src/sl-feat.h
fi
}
src_compile() {
econf || die "econf failed"
emake -j1 all elf || die "make failed"
}
src_install() {
make install install-elf DESTDIR=${D} || die "make install failed"
if use ppc-macos ; then
chmod a+rx "${D}"/usr/$(get_libdir)/libslang*dylib || die "chmod failed"
else
chmod a+rx "${D}"/usr/$(get_libdir)/libslang*so* || die "chmod failed"
fi
if use unicode ; then
for i in ${D}/usr/$(get_libdir)/libslang-utf8* ; do
local libslang=${i/${D}/}
dosym ${libslang} ${libslang/-utf8/}
done
dosym /usr/$(get_libdir)/libslang{-utf8,}.a
fi
rm -rf ${D}/usr/doc
dodoc NEWS README *.txt
dodoc doc/*.txt doc/internal/*.txt doc/text/*.txt
dohtml doc/*.html
}
|