/[gentoo-x86]/dev-lang/smlnj/smlnj-110.71.ebuild
Gentoo

Contents of /dev-lang/smlnj/smlnj-110.71.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Tue Jun 29 12:13:03 2010 UTC (3 years, 9 months ago) by ssuominen
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +17 -3 lines
Respect environment flags and targets wrt #243886 by Michael Weber.
(Portage version: 2.2_rc67/cvs/Linux x86_64)

1 # Copyright 1999-2010 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/dev-lang/smlnj/smlnj-110.71.ebuild,v 1.1 2009/10/09 14:33:22 hkbst Exp $
4
5 EAPI=2
6
7 inherit eutils
8
9 DESCRIPTION="Standard ML of New Jersey compiler and libraries"
10 HOMEPAGE="http://www.smlnj.org"
11
12 BASE_URI="http://smlnj.cs.uchicago.edu/dist/working/${PV}/"
13 #BASE_URI="mirror://gentoo/${P}-"
14
15 #Use the fetch_files.sh script in subdir files/ to fetch and
16 #version these files if they aren't on Gentoo mirrors.
17 #For example if you're doing a local bump.
18 FILES="
19 config.tgz
20
21 cm.tgz
22 compiler.tgz
23 runtime.tgz
24 system.tgz
25 MLRISC.tgz
26 smlnj-lib.tgz
27
28 ckit.tgz
29 nlffi.tgz
30
31 cml.tgz
32 eXene.tgz
33
34 ml-lex.tgz
35 ml-yacc.tgz
36 ml-burg.tgz
37 ml-lpt.tgz
38
39 pgraph.tgz
40 trace-debug-profile.tgz
41
42 heap2asm.tgz
43
44 smlnj-c.tgz
45 "
46
47 #use amd64 in 32-bit mode
48 SRC_URI="amd64? ( ${BASE_URI}boot.x86-unix.tgz -> ${P}-boot.x86-unix.tgz )
49 ppc? ( ${BASE_URI}boot.ppc-unix.tgz -> ${P}-boot.ppc-unix.tgz )
50 sparc? ( ${BASE_URI}boot.sparc-unix.tgz -> ${P}-boot.sparc-unix.tgz )
51 x86? ( ${BASE_URI}boot.x86-unix.tgz -> ${P}-boot.x86-unix.tgz )"
52
53 for file in ${FILES}; do
54 SRC_URI+=" ${BASE_URI}${file} -> ${P}-${file} "
55 done
56
57 LICENSE="BSD"
58 SLOT="0"
59 KEYWORDS="-* ~amd64 ~ppc ~x86"
60 IUSE=""
61
62 S=${WORKDIR}
63
64 src_unpack() {
65 mkdir -p "${S}"
66 for file in ${A}; do
67 [[ ${file} != ${P}-config.tgz ]] && cp "${DISTDIR}/${file}" "${S}/${file#${P}-}"
68 done
69 unpack ${P}-config.tgz && rm config/*.bat
70 echo SRCARCHIVEURL=\"file:/${S}\" > "${S}"/config/srcarchiveurl
71
72 # Required for sed in src_prepare
73 mkdir base || die
74 ./config/unpack "${S}" runtime || die
75 }
76
77 src_prepare() {
78 # Use environment wrt #243886
79 sed -i \
80 -e "/^AS/s:as:$(tc-getAS):" \
81 -e "/^CC/s:gcc:$(tc-getCC):" \
82 -e "/^CPP/s:gcc:$(tc-getCC):" \
83 -e "/^CFLAGS/{s:-O[0123s]:: ; s:=:= ${CFLAGS}:}" \
84 base/runtime/objs/mk.x86-linux || die
85 }
86
87 src_compile() {
88 SMLNJ_HOME="${S}" ./config/install.sh || die "compilation failed"
89 }
90
91 src_install() {
92 mkdir -p "${D}"/usr
93 mv {bin,lib} "${D}"/usr
94
95 for file in "${D}"/usr/bin/{*,.*}; do
96 [[ -f ${file} ]] && sed "2iSMLNJ_HOME=/usr" -i ${file}
97 # [[ -f ${file} ]] && sed "s:${WORKDIR}:/usr:" -i ${file}
98 done
99 }

  ViewVC Help
Powered by ViewVC 1.1.20