summaryrefslogtreecommitdiff
blob: fca1d6b4f7814f10149e6a2eed81086fb5980d10 (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
61
62
63
64
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-arch/arj/arj-3.10.21.ebuild,v 1.4 2005/01/01 22:12:53 aliz Exp $

inherit gnuconfig eutils gcc

DESCRIPTION="Utility for opening arj archives"
HOMEPAGE="http://arj.sourceforge.net/"
SRC_URI="mirror://sourceforge/arj/${P}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86 ~ppc ~sparc amd64"
IUSE=""
RESTRICT="nostrip"

DEPEND="virtual/libc"

src_compile() {
        if [ -x /usr/sbin/gcc-config ]
        then
                # Do we have a gcc that use the new layout and gcc-config ?
                if /usr/sbin/gcc-config --get-current-profile &> /dev/null
                then
                        export GCC_PROFILE="$(/usr/sbin/gcc-config --get-current-profile)"

                        # Just recheck gcc version ...
                        if [ "$(gcc-version)" != "3.2" ] && [ "$(gcc-version)" != "3.3" ]
                        then
                                # See if we can get a gcc profile we know is proper ...
                                if /usr/sbin/gcc-config --get-bin-path ${CHOST}-3.3.4 &> /dev/null
                                then
                                        export PATH="$(/usr/sbin/gcc-config --get-bin-path ${CHOST}-3.3.4):${PATH}"
                                        export GCC_PROFILE="${CHOST}-3.3.4"
                                else
                                        eerror "This build needs gcc-3.2 or gcc-3.3!"
                                        eerror
                                        eerror "Use gcc-config to change your gcc profile:"
                                        eerror
                                        eerror "  # gcc-config $CHOST-3.3.4"
                                        eerror
                                        eerror "or whatever gcc version is relevant."
                                        die
                                fi
                        fi
                fi
        fi

	gnuconfig_update

	cd ${S}/gnu
	autoconf
	econf || die

	cd ${S}
	make prepare || die "make prepare failed"
	make package || die "make package failed"
}

src_install() {
	cd ${S}/linux-gnu/en/rs/u
	dobin bin/* || die
	dodoc doc/arj/* ${S}/ChangeLog
}