summaryrefslogtreecommitdiff
blob: 3ae01ec93a8dd0d224073f4a688e80c94e22b970 (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
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-libs/publib/publib-0.38.2.ebuild,v 1.2 2005/07/30 10:20:31 flameeyes Exp $

inherit versionator eutils

MY_P="${PN}-$(get_version_component_range 1-2)"
DEBIAN_SOURCE="${PN}_$(get_version_component_range 1-2).orig.tar.gz"
DEBIAN_PATCH="${PN}_$(replace_version_separator 2 '-').diff.gz"

DESCRIPTION="C library of misc utility functions (parsing, data structs, etc.)"
SRC_URI="mirror://debian/pool/main/p/publib/${DEBIAN_SOURCE}
	mirror://debian/pool/main/p/publib/${DEBIAN_PATCH}"
HOMEPAGE="http://packages.debian.org/testing/libdevel/publib-dev"

SLOT="0"
LICENSE="GPL-2"
KEYWORDS="~x86 ~amd64"
IUSE=""

DEPEND=""

S="${WORKDIR}/${MY_P}"

src_unpack() {
	unpack ${A}
	cd ${WORKDIR}

	epatch ${WORKDIR}/${DEBIAN_PATCH/.gz/}

	mkdir ${S}/objs
}

src_compile() {
	cd objs

	ECONF_SOURCE="../framework" \
		econf \
			--with-modules=${S}/liw \
			--with-library=publib \
			--with-libshort=pub || die "econf failed"

	emake || die "emake failed"
}

src_install() {
	# install extra docs
	dodoc Changes framework/README framework/TODO
	dodoc framework/Blurb debian/changelog

	# main install
	cd objs
	dodir /usr/share/man/mano /usr/$(get_libdir) /usr/include/publib

	make prefix=${D}/usr man3ext=o man3dir=${D}/usr/share/man/mano \
		libdir=${D}/usr/$(get_libdir) install || die "make install failed"

	# adjust man page titles to fit the "o" set above (instead of "3")
	sed -i -e 's/^\(\.TH [A-Z0-9]* \)3/\1o/' ${D}/usr/share/man/mano/*
}