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

Contents of /dev-lang/opendylan/opendylan-2013.1-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Tue Nov 19 06:11:58 2013 UTC (14 months, 1 week ago) by patrick
Branch: MAIN
CVS Tags: HEAD
Fix up boehm-gc dependency, build system fix was applied already upstream

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

1 # Copyright 1999-2013 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.1.ebuild,v 1.1 2013/07/12 03:47:54 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
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.1; then
69 PATH=/opt/opendylan-2013.1/bin/:$PATH
70 elif has_version =dev-lang/opendylan-bin-2012.1; then
71 PATH=/opt/opendylan-2012.1/bin/:$PATH
72 elif has_version =dev-lang/opendylan-bin-2011.1; then
73 PATH=/opt/opendylan-2011.1/bin/:$PATH
74 else
75 PATH=/opt/opendylan/bin:$PATH
76 fi
77 if use amd64; then
78 econf --prefix=/opt/opendylan || die
79 else
80 econf --prefix=/opt/opendylan --with-mps=/usr/include/mps/ || die
81 fi
82 if use x86; then
83 # Includedir, pointing at something wrong
84 sed -i -e 's:-I$(MPS)/code:-I$(MPS):' sources/lib/run-time/pentium-linux/Makefile || die "Couldn't fix mps path"
85 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"
86 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"
87 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"
88 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"
89 fi
90 }
91
92 src_compile() {
93 ulimit -s 32000 # this is naughty build system
94 emake -j1 3-stage-bootstrap || die
95 }
96
97 src_install() {
98 ulimit -s 32000 # this is naughty build system
99 # because of Makefile weirdness it rebuilds quite a bit here
100 # upstream has been notified
101 emake -j1 DESTDIR="${D}" install
102 mkdir -p "${D}/etc/env.d/opendylan/"
103 echo "export PATH=/opt/opendylan/bin:\$PATH" > "${D}/etc/env.d/opendylan/99-opendylan" || die "Failed to add env settings"
104 }

  ViewVC Help
Powered by ViewVC 1.1.20