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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Tue Sep 19 22:48:21 2006 UTC (13 years, 5 months ago) by liquidx
Branch: MAIN
Changes since 1.3: +4 -4 lines
add -j1 to src_compile emakes (#141990)
(Portage version: 2.1.1)

1 # Copyright 1999-2006 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.0.6.ebuild,v 1.3 2006/08/09 12:40:51 liquidx 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 ~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 src_unpack() {
22 unpack ${A}
23 cd "${S}"
24 sed -i \
25 -e '/^SLANG_INST_INC/s/-I@includedir@/-I@SRCDIR@ -I@includedir@/' \
26 -e '/^SLANG_INST_LIB/s/-L@libdir@/-L@OBJDIR@ -L@ELFDIR@ -L@libdir@/' \
27 slsh/Makefile.in || die
28
29 epatch "${FILESDIR}/${PN}-2.0.6-slsh-libs.patch"
30 epatch "${FILESDIR}/${PN}-2.0.6-foreground.patch"
31
32 grep -rlZ -- '-lslang\>' "${S}" | xargs -0 sed -i -e 's:-lslang:-lslang-2:g'
33 }
34
35 src_compile() {
36 econf \
37 $(use_with pcre) \
38 $(use_with png) || die "econf failed"
39 emake -j1 THIS_LIB="slang-2" all || die "make all failed"
40 emake -j1 THIS_LIB="slang-2" elf || die "make elf failed"
41 cd slsh
42 emake -j1 THIS_LIB="slang-2" slsh || die "make slsh failed"
43 }
44
45 src_install() {
46 emake -j1 THIS_LIB="slang-2" DESTDIR="${D}" install install-elf || die "make install failed"
47
48 # Move headers around
49 dodir /usr/include/slang-2
50 mv "${D}"/usr/include/*.h "${D}/usr/include/slang-2"
51
52 rm -rf "${D}/usr/share/doc/slang"
53 dodoc NEWS README *.txt
54 dodoc doc/*.txt doc/internal/*.txt doc/text/*.txt
55 dohtml doc/slangdoc.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