summaryrefslogtreecommitdiff
blob: 3b73147fb9d358eba7f8255df2d50b207036a916 (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
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-arch/pdv/pdv-1.5.1-r1.ebuild,v 1.6 2005/11/29 02:59:56 vapier Exp $

inherit eutils

DESCRIPTION="build a self-extracting and self-installing binary package"
HOMEPAGE="http://pdv.sourceforge.net/"
SRC_URI="mirror://sourceforge/pdv/${P}.tar.gz"

LICENSE="MIT"
SLOT="0"
KEYWORDS="~hppa ~ppc ~x86"
IUSE="nomotif"

DEPEND=">=sys-devel/autoconf-2.58
	sys-devel/automake
	!nomotif? ( virtual/x11 x11-libs/openmotif )"

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

	# fix a size-of-variable bug
	epatch ${FILESDIR}/${P}-opt.patch
	# fix a free-before-use bug
	epatch ${FILESDIR}/${P}-early-free.patch
	# fix a configure script bug
	epatch ${FILESDIR}/${P}-x-config.patch
}

src_compile() {
	# re-build configure script since patch was applied to configure.in
	cd ${S}/X11
	export WANT_AUTOCONF=2.5
	aclocal
	automake -a -c
	autoconf

	cd ${S}
	local myconf=""
	use nomotif && myconf="--without-x" # configure script is broken, cant use use_with
	econf ${myconf} || die
	emake || die
}

src_install() {
	dobin pdv pdvmkpkg || die
	doman pdv.1 pdvmkpkg.1
	if ! use nomotif ; then
		dobin X11/xmpdvmkpkg || die
		doman xmpdvmkpkg.1 || die
	fi
	dodoc AUTHORS ChangeLog INSTALL NEWS README pdv.lsm
}