/[gentoo-x86]/dev-lang/opendylan/opendylan-2013.2.ebuild
Gentoo

Contents of /dev-lang/opendylan/opendylan-2013.2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Mon Jun 23 08:41:34 2014 UTC (4 months, 1 week ago) by patrick
Branch: MAIN
Changes since 1.2: +2 -2 lines
Fix dependencies #514630

(Portage version: 2.2.10/cvs/Linux x86_64, unsigned Manifest commit)

1 # Copyright 1999-2014 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/dev-lang/opendylan/opendylan-2013.2.ebuild,v 1.2 2014/01/08 09:00:47 patrick Exp $
4 EAPI=4
5
6 inherit autotools
7
8 RESTRICT="test"
9
10 DESCRIPTION="OpenDylan language runtime environment"
11
12 HOMEPAGE="http://opendylan.org"
13 SRC_URI="http://opendylan.org/downloads/${PN}/${PV}/${P}-sources.tar.bz2"
14
15 LICENSE="Opendylan"
16 SLOT="0"
17
18 # not tested on x86
19 KEYWORDS="~amd64 ~x86"
20
21 IUSE=""
22
23 # the boehm-gc check is "wrong" and reported upstream
24 # but for now static-libs useflag is needed
25 DEPEND="app-arch/unzip
26 dev-libs/boehm-gc[threads]
27 dev-lang/perl
28 dev-perl/XML-Parser
29 || ( dev-lang/opendylan-bin dev-lang/opendylan )
30 x86? ( <dev-libs/mps-1.108 )"
31 RDEPEND="${DEPEND}"
32
33 # on x86 there's a dependency on mps, but the build system is a bit ... hmm ...
34 # let's give it more of a chance to survive then
35 NAUGHTY_FILES=(
36 sources/lib/run-time/collector.c.malloc
37 sources/lib/run-time/collector.c
38 sources/lib/run-time/pentium-win32/buffalo-collector.c
39 sources/lib/run-time/pentium-win32/heap-stats.c
40 sources/lib/run-time/heap-utils.h
41 )
42
43 NAUGHTY_HEADERS=(
44 mps.h
45 mpscmv.h
46 mpscamc.h
47 mpsavm.h
48 )
49
50 S="${WORKDIR}/${PN}"
51
52 src_prepare() {
53 mkdir -p build-aux
54 elibtoolize && eaclocal || die "Fail"
55 automake --foreign --add-missing # this one dies wrongfully
56 eautoconf || die "Fail"
57 # mps headers, included wrong
58 if use x86; then
59 for i in ${NAUGHTY_FILES[@]}; do
60 for header in ${NAUGHTY_HEADERS[@]}; do
61 sed -i -e "s:\"${header}\":<${header}>:" $i
62 done
63 done
64 fi
65 }
66
67 src_configure() {
68 if has_version =dev-lang/opendylan-bin-2013.2; then
69 PATH=/opt/opendylan-2013.2/bin/:$PATH
70 elif has_version =dev-lang/opendylan-bin-2013.1; then
71 PATH=/opt/opendylan-2013.1/bin/:$PATH
72 elif has_version =dev-lang/opendylan-bin-2012.1; then
73 PATH=/opt/opendylan-2012.1/bin/:$PATH
74 elif has_version =dev-lang/opendylan-bin-2011.1; then
75 PATH=/opt/opendylan-2011.1/bin/:$PATH
76 else
77 PATH=/opt/opendylan/bin:$PATH
78 fi
79 if use amd64; then
80 econf --prefix=/opt/opendylan || die
81 else
82 econf --prefix=/opt/opendylan --with-mps=/usr/include/mps/ || die
83 fi
84 if use x86; then
85 # Includedir, pointing at something wrong
86 sed -i -e 's:-I$(MPS)/code:-I$(MPS):' sources/lib/run-time/pentium-linux/Makefile || die "Couldn't fix mps path"
87 sed -i -e 's~(cd $(MPS)/code; make -f lii4gc.gmk mmdw.a)~:;~' sources/lib/run-time/pentium-linux/Makefile || die "Couldn't fix mps building"
88 sed -i -e 's~(cd $(MPS)/code; make -f lii4gc.gmk mpsplan.a)~:;~' sources/lib/run-time/pentium-linux/Makefile || die "Couldn't fix mps building"
89 sed -i -e 's~$(MPS_LIB)/mpsplan.a~/usr/lib/mpsplan.a~' sources/lib/run-time/pentium-linux/Makefile || die "Couldn't fix mps clone"
90 sed -i -e 's~$(MPS_LIB)/mmdw.a~/usr/lib/mmdw.a~' sources/lib/run-time/pentium-linux/Makefile || die "Couldn't fix mps clone"
91 fi
92 }
93
94 src_compile() {
95 ulimit -s 32000 # this is naughty build system
96 emake -j1 3-stage-bootstrap || die
97 }
98
99 src_install() {
100 ulimit -s 32000 # this is naughty build system
101 # because of Makefile weirdness it rebuilds quite a bit here
102 # upstream has been notified
103 emake -j1 DESTDIR="${D}" install
104 mkdir -p "${D}/etc/env.d/opendylan/"
105 echo "export PATH=/opt/opendylan/bin:\$PATH" > "${D}/etc/env.d/opendylan/99-opendylan" || die "Failed to add env settings"
106 }

  ViewVC Help
Powered by ViewVC 1.1.20