/[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.1 - (show annotations) (download)
Fri Jul 28 00:05:33 2006 UTC (13 years, 6 months ago) by flameeyes
Branch: MAIN
Version bump for slang, slotted to be installed side-by-side with slang 1.x. Thanks to Mark Lee and Alastair Tse in bug #95247 for the work and the brainstorm. Masked till bug #141947 is completed.
(Portage version: 2.1.1_pre3-r5)

1 # Copyright 1999-2006 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
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"
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
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 THIS_LIB="slang-2" all || die "make all failed"
39 emake THIS_LIB="slang-2" elf || die "make elf failed"
40 cd slsh
41 emake THIS_LIB="slang-2" slsh || die "make slsh failed"
42 }
43
44 src_install() {
45 emake THIS_LIB="slang-2" DESTDIR="${D}" install install-elf || die "make install failed"
46
47 # Move headers around
48 dodir /usr/include/slang-2
49 mv "${D}"/usr/include/*.h "${D}/usr/include/slang-2"
50
51 rm -rf "${D}/usr/share/doc/slang"
52 dodoc NEWS README *.txt
53 dodoc doc/*.txt doc/internal/*.txt doc/text/*.txt
54 dohtml doc/slangdoc.html
55 }
56
57 pkg_postinst() {
58 elog "For compatibility reason slang 2.x is installed in Gentoo as libslang-2."
59 elog "This has the unfortunate consequence that if you want to build something"
60 elog "from sources that uses slang 2.x, you need to change the linking library"
61 elog "to -lslang-2 instead of simply -lslang."
62 elog "We're sorry for the inconvenience, but it's to overcome an otherwise"
63 elog "problematic situation."
64 }

  ViewVC Help
Powered by ViewVC 1.1.20