/[gentoo-x86]/sys-libs/slang/slang-2.1.2.ebuild
Gentoo

Contents of /sys-libs/slang/slang-2.1.2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Sat Feb 9 06:38:09 2008 UTC (11 years, 11 months ago) by drac
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +1 -1 lines
FILE REMOVED
Remove unused version and fix quoting of stable.
(Portage version: 2.1.4.1)

1 # Copyright 1999-2007 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sys-libs/slang/slang-2.1.2.ebuild,v 1.2 2007/11/16 16:51:49 fmccor Exp $
4
5 inherit eutils
6
7 DESCRIPTION="Console display library used by most text viewer"
8 HOMEPAGE="http://www.s-lang.org/"
9 SRC_URI="ftp://space.mit.edu/pub/davis/slang/v${PV%.*}/${P}.tar.gz"
10
11 LICENSE="GPL-2"
12 SLOT="2"
13 KEYWORDS="~amd64 ~sparc ~x86"
14 # USE=cjk is broken; see http://www.jedsoft.org/pipermail/slang-users_jedsoft.org/2006/000399.html
15 IUSE="pcre png"
16
17 DEPEND=">=sys-libs/ncurses-5.2-r2
18 pcre? ( dev-libs/libpcre )
19 png? ( media-libs/libpng )"
20
21 MAKEOPTS="${MAKEOPTS} -j1"
22
23 src_unpack() {
24 unpack ${A}
25 cd "${S}"
26
27 epatch "${FILESDIR}/${P}-slsh-libs.patch"
28
29 sed -i -e '/^THIS_LIB/s/slang/slang-2/' src/Makefile.in || die
30
31 grep -rlZ -- '-lslang\>' "${S}" | xargs -0 sed -i -e 's:-lslang:-lslang-2:g'
32 }
33
34 src_compile() {
35 econf \
36 $(use_with pcre) \
37 $(use_with png) || die "econf failed"
38 emake all || die "make all failed"
39 cd slsh
40 emake slsh || die "make slsh failed"
41 }
42
43 src_install() {
44 emake DESTDIR="${D}" install install-static || die "make install failed"
45
46 # Move headers around
47 dodir /usr/include/slang-2
48 mv "${D}"/usr/include/*.h "${D}/usr/include/slang-2"
49
50 rm -rf "${D}/usr/share/doc/{slang,slsh}"
51
52 dodoc NEWS README *.txt
53 dodoc doc/*.txt doc/internal/*.txt doc/text/*.txt
54 dohtml doc/slangdoc.html
55 dohtml slsh/doc/html/*.html
56 }
57
58 pkg_postinst() {
59 elog "For compatibility reason slang 2.x is installed in Gentoo as libslang-2."
60 elog "This has the unfortunate consequence that if you want to build something"
61 elog "from sources that uses slang 2.x, you need to change the linking library"
62 elog "to -lslang-2 instead of simply -lslang."
63 elog "We're sorry for the inconvenience, but it's to overcome an otherwise"
64 elog "problematic situation."
65 }

  ViewVC Help
Powered by ViewVC 1.1.20